<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.5730.11" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=294560215-14022007>Hi 
Ken,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=294560215-14022007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=294560215-14022007>this 
helps I didn't think of creating the subfile first and then output to 
it.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=294560215-14022007>what I 
still can't get working (I rarely use qtp)&nbsp;is the output part since I don't 
access the subfile in the qtp program</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=294560215-14022007>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=294560215-14022007>the 
first error I ran into&nbsp;with output subfile is that it didn't&nbsp;know 
about the subfile, ie subfile not found, so I added the asterisk in front of the 
subfile name which then produced the error of not being able to find the linkage 
for the subfile.</SPAN></FONT></DIV></SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=294560215-14022007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=294560215-14022007>I 
don't access the subfile in the qtp program. in the second request I am 
accessing a couple other database tables and then do a select, which may result 
in records found or not. I use the subfile that's created here in a couple 
other&nbsp;quiz programs that use the prompted parameters&nbsp;stored in this 
subfile and other data if it exists.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=294560215-14022007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=294560215-14022007>this 
is what&nbsp;the code looks like (i didn't include all the temps for 
counting/totaling)</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=294560215-14022007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=294560215-14022007>Thanx</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=294560215-14022007>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Lorry</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=294560215-14022007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=294560215-14022007>run 
Therapist_appts<BR></SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=294560215-14022007>global 
temp t_ther_no num * 4 &amp;<BR>parm prompt "Enter Therapist Number (4-digit 
max) : " &amp;<BR>on errors reprompt 3 times<BR>global temp t_start_dt date 
century included &amp;<BR>parm prompt "Enter start date for the report 
(YYYYMMDD) : " &amp;<BR>on errors reprompt 3 times<BR>global temp t_stop_dt date 
century included &amp;<BR>parm prompt "Enter stop&nbsp; date for the report 
(YYYYMMDD) : " &amp;<BR>on errors reprompt 3 times</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=294560215-14022007>request create_empty_subfile<BR>;access single record 
file to create empty subfile<BR>access PATIENT_NEXTNUM</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=294560215-14022007>temp 
tot_appt <BR>temp tot_canpc<BR>temp tot_canpcmr<BR>temp 
tot_pat<BR></SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=294560215-14022007>SUB 
THER-20 KEEP AT FINAL &amp;<BR>INCLUDE 
T_THER_NO,TOT_APPT,TOT_CANPC,TOT_CANPCMR,TOT_PAT,T_STOP_DT,T_START_DT</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=294560215-14022007>request Retrieve_appointments</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=294560215-14022007>acc 
tbl1 in db1 link cola,colb,colc to cola,colb,colc of tbl2&nbsp;in 
db1</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=294560215-14022007>sel 
tbl1&nbsp;if col_dt ge t_start_dt and col_dt le t_stop_dt<BR>sel tbl2 if 
col_therapist eq 
t_ther_no<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<BR>SORT ON patientnum OF tbl1</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=294560215-14022007>DEF 
KOUNT = 1</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=294560215-14022007>OUTPUT 
*THER-20 UPDATE AT FINAL<BR>&nbsp;item tot_appt sub kount<BR>&nbsp;item 
tot_canpc sub kount &amp;<BR>&nbsp;if acknowledge_cd = "PC" <BR>&nbsp;item 
tot_canpcmr sub kount &amp;<BR>&nbsp;if acknowledge_cd = "PCMR"<BR>&nbsp;item 
tot_pat subtotal kount at psy_pat_no</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=294560215-14022007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=294560215-14022007>build</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=294560215-14022007></SPAN></FONT><FONT face=Arial color=#0000ff 
size=2><SPAN class=294560215-14022007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=294560215-14022007></SPAN></FONT><FONT face=Tahoma size=2>-----Original 
Message-----<BR><B>From:</B> Ken Langendock 
[mailto:Ken@Langendock.com]<BR><B>Sent:</B> February 13, 2007 7:52 
PM<BR><B>To:</B> Lorry Litman; 'PowerHouse listserver 
(E-mail)'<BR><B>Subject:</B> RE: QTP to always create 
subfile<BR><BR></DIV></FONT>
<BLOCKQUOTE>
  <DIV><SPAN class=464444101-14022007><FONT face=Arial color=#0000ff 
  size=2>Lorry you can do this many ways.</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face=Arial color=#0000ff size=2>I 
  always use this method:</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face=Arial color=#0000ff 
  size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>RUN abc</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>&nbsp; GLOBAL TEMP T-Therapist CHARACTER * 10 &amp;</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PARM PROMPT "Therapist 
  "</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>&nbsp; GLOBAL TEMP&nbsp;T-StartDate DATE CENTURY INCLUDED 
  &amp;</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PARM PROMPT "Selection From 
  (YYYYMMDD) "</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>&nbsp; GLOBAL TEMP&nbsp;T-EndDate DATE CENTURY INCLUDED 
  &amp;</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PARM PROMPT "Selection From 
  (YYYYMMDD) "</FONT></SPAN></DIV></FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>REQUEST create-empty-subfile</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>ACCESS&nbsp;systemdefaults&nbsp;; single record 
file</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>&nbsp; TEMP&nbsp;T-Total</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>SUBFILE&nbsp;sfabc &amp;</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;KEEP 
  &amp;</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AT 
  FINAL&nbsp;&amp;</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;INCLUDE T-Therapist 
  alias Therapist, &amp;</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  T-StartDate alias SelectionFrom, &amp;</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  T-EndDate alias SelectionThru, &amp;</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  T-Total alias TotalCount</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>REQUEST Subtotal-my-records</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>ACCESS *sfabc &amp;</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>&nbsp;&nbsp;LINK&nbsp;Therapist OF sfabc &amp;</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;TO Therapist &amp;</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;OF mydatafile</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>&nbsp; TEMP&nbsp;T-Counter COUNT </FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=464444101-14022007><FONT color=#0000ff 
  size=2></FONT></SPAN><SPAN class=464444101-14022007><FONT face="Courier New" 
  color=#0000ff size=2>OUTPUT sfabc &amp;</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UPDATE &amp;</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AT FINAL</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff 
  size=2>&nbsp; ITEM&nbsp;TotalCount of sfabc 
  FINAL&nbsp;T-Counter</FONT></SPAN></DIV>
  <DIV><SPAN class=464444101-14022007><FONT face=Arial color=#0000ff 
  size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=464444101-14022007><FONT face=Arial color=#0000ff 
  size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=464444101-14022007><FONT face=Arial color=#0000ff 
  size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV></DIV>
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT 
  face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> 
  powerh-l-bounces+ken.langendock=rogers.com@lists.sowder.com 
  [mailto:powerh-l-bounces+ken.langendock=rogers.com@lists.sowder.com] <B>On 
  Behalf Of </B>Lorry Litman<BR><B>Sent:</B> February 13, 2007 6:50 
  PM<BR><B>To:</B> PowerHouse listserver (E-mail)<BR><B>Subject:</B> QTP to 
  always create subfile<BR><BR></FONT></DIV><!-- Converted from text/rtf format -->
  <P><FONT face=Arial size=2>Hi,</FONT> </P>
  <P><FONT face=Arial size=2>I'm using PH 7.10G and VMS 7.3-1</FONT> <BR><FONT 
  face=Arial size=2>I have a small qtp program that prompts for a therapist 
  number, start and end dates. It then does some counting of items and writes to 
  a subfile. The problem I'm having is the subfile is only created if records 
  are found, however, I need the subfile to always be created and include the 
  items prompted for because this file is then accessed by a quiz program that 
  does some reporting.</FONT></P>
  <P><FONT face=Arial size=2>Thanx</FONT> <BR><FONT face=Arial 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lorry</FONT> </P><BR>This e-mail 
  and/or any documents in this transmission is intended for the address(s) only 
  and may contain legally privileged or confidential information. Any 
  unauthorized use, disclosure, distribution, copying or dissemination is 
  strictly prohibited. If you receive this transmission in error, please notify 
  the sender immediately and return the original. </BLOCKQUOTE>
This e-mail and/or any documents in this transmission is intended for the address(s) only and may contain legally privileged or confidential information.  Any unauthorized use, disclosure, distribution, copying or dissemination is strictly prohibited.  If you receive this transmission in error, please notify the sender immediately and return the original.</BODY></HTML>