Writing out multiple records to a subfile from a single recor d

Latimer, Richard richard.latimer@airways.co.nz
Thu, 7 Jun 2001 08:56:36 +1200


Hi,

I agree with John - use QTP to do it. The code snippet below is from our
production code where we are editing the fields in an input record and
subfiling the output for subsequent reporting. 

The only thing to watch is that there is a FILE limit on the number of OPEN
FILES in QTP, and each alias in the output subfile counts as 1. I can't find
it quickly in the manual but a comment in the source code for the example
says:
"NOTES: Keep the number of outputs per REQUEST <= 30 Keep the number of
outputs per RUN <= 60 This one has 1 output left...    "  

We are 6.07 on AS/400  

regards
Richard Latimer
Wellington MIS Manager
Airways New Zealand

    
Sample Code:

;1      ERR_0001                             
;---------------                             
ITEM t_occur = 0                             
ITEM t_error = 1                             
                                             
SUBFILE EDT132B ALIAS err_0001 KEEP  &       
   IF err_0001 OF edt132e <> 0    &          
   INCLUDE t_occur, edt132e, t_error         
                                             
;2      ERR_0002                             
;---------------                             
ITEM t_occur = 0                             
ITEM t_error = 2                             
                                             
SUBFILE EDT132B ALIAS err_0002 KEEP APPEND & 
   IF err_0002 OF edt132e <> 0    &          
   INCLUDE t_occur, edt132e, t_error