subfile name

David Morrison - Corporate dmorrison@mcbrideelectric.com
Tue, 12 Oct 2004 12:10:56 -0700


Viet,

How about something like

RUN xxx
GLOBAL TEMP xMonth CHAR * 2
;
REQUEST get_global_temp
  ITEM xMonth ...
;
REQUEST write_to_tempfile	
  SUBFILE tempfile INCLUDE ...
;
REQUEST January EXECUTE IF xMonth = "01"
ACCESS tempfile
SUBFILE SAVE01 KEEP INCLUDE tempfile
;
REQUEST Februay EXECUTE IF xMonth = "02"
ACCESS tempfile
SUBFILE SAVE02 KEEP INCLUDE tempfile

etc.

David Morrison

-----Original Message-----
From: Viet Nguyen [mailto:VNguyen@wsboces.org]
Sent: Tuesday, October 12, 2004 12:06 PM
To: David Morrison - Corporate; powerh-l@lists.sowder.com
Subject: RE: subfile name


Hi, thanks for the suggestions but I still am running into how to pick
which file to run for a particular month! 

-----Original Message-----
From: David Morrison - Corporate [mailto:dmorrison@mcbrideelectric.com] 
Sent: Tuesday, October 12, 2004 3:00 PM
To: Viet Nguyen; powerh-l@lists.sowder.com
Subject: RE: subfile name

Viet,

Note that this is not a terribly elegant solution, but it should work in
any PH environment.

If you're using QTP (rather than QUIZ) and you're only worrying about
the 12 months (not years), then you could 

1. Execute request(s) to produce a temporary subfile, with the desired
data, then 
2. Create 12 requests that are conditioned on your global temporary
variable xMonth (example:  REQUEST xxx EXECUTE IF xMonth = "01"), with a
different hard-coded subfile name in each request.  In each of these
requests, copy the data from your temporary subfile to the permanent
one.

David Morrison
McBride Electric

-----Original Message-----
From: powerh-l-admin@lists.sowder.com
[mailto:powerh-l-admin@lists.sowder.com]On Behalf Of Viet Nguyen
Sent: Tuesday, October 12, 2004 11:41 AM
To: powerh-l@lists.sowder.com
Subject: subfile name


Hi All,
   How do I set subfile name based on a variable
   For Example: Every Month we run a report and I want to save data to a
file name with the month as part of the file name i.e SAVE01, SAVE02,
SAV03 etc... Let's say the variable is xMonth - values 01,02,03...etc...
Thanks in advance.
Viet.