<!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> </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) 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 with output subfile is that it didn't 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> </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 quiz programs that use the prompted parameters 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> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=294560215-14022007>this
is what 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> </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>
Lorry</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=294560215-14022007></SPAN></FONT> </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 &<BR>parm prompt "Enter Therapist Number (4-digit
max) : " &<BR>on errors reprompt 3 times<BR>global temp t_start_dt date
century included &<BR>parm prompt "Enter start date for the report
(YYYYMMDD) : " &<BR>on errors reprompt 3 times<BR>global temp t_stop_dt date
century included &<BR>parm prompt "Enter stop date for the report
(YYYYMMDD) : " &<BR>on errors reprompt 3 times</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </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> </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 &<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> </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> </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 in
db1</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=294560215-14022007>sel
tbl1 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>
<BR>SORT ON patientnum OF tbl1</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </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> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=294560215-14022007>OUTPUT
*THER-20 UPDATE AT FINAL<BR> item tot_appt sub kount<BR> item
tot_canpc sub kount &<BR> if acknowledge_cd = "PC" <BR> item
tot_canpcmr sub kount &<BR> if acknowledge_cd = "PCMR"<BR> 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> </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> </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> </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> </DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2> GLOBAL TEMP T-Therapist CHARACTER * 10 &</FONT></SPAN></DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2> PARM PROMPT "Therapist
"</FONT></SPAN></DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2> GLOBAL TEMP T-StartDate DATE CENTURY INCLUDED
&</FONT></SPAN></DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2> PARM PROMPT "Selection From
(YYYYMMDD) "</FONT></SPAN></DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2> GLOBAL TEMP T-EndDate DATE CENTURY INCLUDED
&</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> 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> </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> </DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2>ACCESS systemdefaults ; single record
file</FONT></SPAN></DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2> TEMP T-Total</FONT></SPAN></DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2>SUBFILE sfabc &</FONT></SPAN></DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2> KEEP
&</FONT></SPAN></DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2> AT
FINAL &</FONT></SPAN></DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2> INCLUDE T-Therapist
alias Therapist, &</FONT></SPAN></DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2>
T-StartDate alias SelectionFrom, &</FONT></SPAN></DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2>
T-EndDate alias SelectionThru, &</FONT></SPAN></DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2>
T-Total alias TotalCount</FONT></SPAN></DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2></FONT></SPAN> </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> </DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2>ACCESS *sfabc &</FONT></SPAN></DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2> LINK Therapist OF sfabc &</FONT></SPAN></DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2> TO Therapist &</FONT></SPAN></DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2> OF mydatafile</FONT></SPAN></DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2> TEMP T-Counter COUNT </FONT></SPAN></DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2></FONT></SPAN> </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 &</FONT></SPAN></DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2> UPDATE &</FONT></SPAN></DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2> AT FINAL</FONT></SPAN></DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=464444101-14022007><FONT face="Courier New" color=#0000ff
size=2> ITEM TotalCount of sfabc
FINAL T-Counter</FONT></SPAN></DIV>
<DIV><SPAN class=464444101-14022007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=464444101-14022007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=464444101-14022007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </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> 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>