--------------4B80BEBEDE97C28C8B7B436D Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi Martin, I got tricked by this once before. The problem here is that, since you have not specified which file the field "stud_sex" is from, the second subfile statement assumes you are reffering to "stud_sex" from the nearest previous file definition, in this case your first subfile. It so happens that the only records that are written to the first subfile are those with "stud_sex" = "M", so when it tries to select from those records, records with "stud_sex" = "F", it finds none and so your second subfile is empty!!! Solution: change your code as follows: run subtest request subtest set proc limit 1000 access pen_master in pen subfile males keep if stud_sex of pen_master ='M' & include stud_no of pen_master, stud_sex of pen_master subfile females keep if stud_sex of pen_master ='F' & include stud_no of pen_master, stud_sex of pen_master build Regards, Arthur Kogan Westpac Financial Services Sydney, Australia Thomson, Martyn EDUC:EX wrote: > Perhaps somebody could shed some light on this? Why can I not have more > than one subfile in a request? > Consider the following simplified example - > > run subtest > request subtest > set proc limit 1000 > access pen_master in pen > subfile males keep if stud_sex='M' & > include stud_no of pen_master, stud_sex of pen_master > subfile females keep if stud_sex='F' & > include stud_no of pen_master, stud_sex of pen_master > build > > On running this, records are written to the first subfile , but not the > second! If I switch the order of the subfiles - same result. I've seen two > subfiles in a request before, but outputting at different control breaks. > If I put in a sort (say on stud_no), I don't get any output at all! What is > going on here? I can't see anything in the QTP manual or the 7.10F4 RBF > relating to this scenario. > Any help much appreciated. > Using 7.10E1 on OpenVMS 6.1 > > Regards, > Martyn Thomson > Ministry of Education, > B.C., Canada > > > > = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = > Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu > Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu > powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l > This list is closed, thus to post to the list, you must be a subscriber. --------------4B80BEBEDE97C28C8B7B436D Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Hi Martin,I got tricked by this once before. The problem here is that, since you have not specified which file the field "stud_sex" is from, the second subfile statement assumes you are reffering to "stud_sex" from the nearest previous file definition, in this case your first subfile. It so happens that the only records that are written to the first subfile are those with "stud_sex" = "M", so when it tries to select from those records, records with "stud_sex" = "F", it finds none and so your second subfile is empty!!!
Solution:
change your code as follows:
run subtest
request subtest
set proc limit 1000
access pen_master in pen
subfile males keep if stud_sex of pen_master ='M' &
include stud_no of pen_master, stud_sex of pen_master
subfile females keep if stud_sex of pen_master ='F' &
include stud_no of pen_master, stud_sex of pen_master
buildRegards,
Arthur Kogan
Westpac Financial Services
Sydney, AustraliaThomson, Martyn EDUC:EX wrote:
Perhaps somebody could shed some light on this? Why can I not have more
than one subfile in a request?
Consider the following simplified example -run subtest
request subtest
set proc limit 1000
access pen_master in pen
subfile males keep if stud_sex='M' &
include stud_no of pen_master, stud_sex of pen_master
subfile females keep if stud_sex='F' &
include stud_no of pen_master, stud_sex of pen_master
buildOn running this, records are written to the first subfile , but not the
second! If I switch the order of the subfiles - same result. I've seen two
subfiles in a request before, but outputting at different control breaks.
If I put in a sort (say on stud_no), I don't get any output at all! What is
going on here? I can't see anything in the QTP manual or the 7.10F4 RBF
relating to this scenario.
Any help much appreciated.
Using 7.10E1 on OpenVMS 6.1Regards,
Martyn Thomson
Ministry of Education,
B.C., Canada
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.