FileAid Batch - COPY-function



Compuware's data management products: File-AID for IMS, File-AID/MVS, File-AID for DB2 and DBA-XPERT for DB2

FileAid Batch - COPY-function

Postby LotharLochkarte » Thu Jul 14, 2011 7:49 pm

Hi,

I have the following code:
$$DD01     COPY IF=(5,EQ,C'SEG1'),
                MOVE=(01,10,17),     
                OUT=10               

How can I tell FileAid-Batch to print every record matching that IF-condition twice?

Best regards!
LotharLochkarte
 
Posts: 68
Joined: Fri Aug 27, 2010 6:51 pm
Has thanked: 0 time
Been thanked: 0 time

Re: FileAid Batch - COPY-function

Postby Ed Goodman » Thu Jul 14, 2011 8:08 pm

Do they need to be contiguous? If not, just list the file twice in the next step.

I don't think File-Aid CAN write twice. If any function can do it, it will be the USER function.

If you have sort available, you could use:

 SORT FIELDS=COPY
 INCLUDE COND=(5,4,CH,EQ,C'SEG1')
 OUTFIL OUTREC=(17,10,/,17,10)


That's if I remember my File-Aid format.

If it's a variable length file, you need to add 4 to all the positions, plus tell sort to make it fixed length:
 SORT FIELDS=COPY
 INCLUDE COND=(9,4,CH,EQ,C'SEG1')
 OUTFIL CONVERT,OUTREC=(21,10,/,21,10)
Ed Goodman
 
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times

Re: FileAid Batch - COPY-function

Postby LotharLochkarte » Fri Jul 15, 2011 1:03 pm

The USER function was a very good idea! I just have to specify WRITE=DD01O twice and the selected record will be printed twice! :-)

Nice!
LotharLochkarte
 
Posts: 68
Joined: Fri Aug 27, 2010 6:51 pm
Has thanked: 0 time
Been thanked: 0 time

Re: FileAid Batch - COPY-function

Postby Ed Goodman » Mon Jul 18, 2011 12:33 am

That's awesome. We just lost File-Aid here, so I couldn't test it.
Ed Goodman
 
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times

Re: FileAid Batch - COPY-function

Postby LotharLochkarte » Mon Jul 18, 2011 12:19 pm

I can't imagine working without FileAid... ;-)
LotharLochkarte
 
Posts: 68
Joined: Fri Aug 27, 2010 6:51 pm
Has thanked: 0 time
Been thanked: 0 time


Return to File-AID

 


  • Related topics
    Replies
    Views
    Last post