IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

multiple COPY REPLACE using File-Aid batch?


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
gorman
Currently Banned

New User


Joined: 23 Sep 2008
Posts: 10
Location: Chennai

PostPosted: Mon Oct 13, 2008 4:26 pm
Reply with quote

Hi,

I am trying below file-aid batch job to replace multiple entries with multiple options but not able to succeed.

Code:

//STEP01  EXEC PGM=FILEAID       
//SYSPRINT DD SYSOUT=*           
//SYSLIST  DD SYSOUT=*           
//SYSTOTAL DD SYSOUT=*           
//SYSUDUMP DD SYSOUT=*           
//DD01     DD *                   
1234ABCD                         
2345BCDE                         
//DD01O    DD SYSOUT=*           
//SYSIN    DD  *                 
$$DD01 COPY REPL=(5,EQ,C'A',C'1')
$$DD01 COPY REPL=(5,EQ,C'B',C'2')
/*                               


Would you please tell me how to achieve it?

Thanks.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Mon Oct 13, 2008 5:00 pm
Reply with quote

Hi,

try this
Code:
$$DD01 COPY IF=(5,EQ,C'A'),     
             REPL=(5,C'1'),     
            IF=(5,EQ,C'B'),     
             REPL=(5,C'2')       



if I interpreted your request correctly.


Gerry
Back to top
View user's profile Send private message
gorman
Currently Banned

New User


Joined: 23 Sep 2008
Posts: 10
Location: Chennai

PostPosted: Mon Oct 13, 2008 5:12 pm
Reply with quote

Gerry, though I get correct results with the solution you've suggested, the job ends with MAXCC=4 and below info was shown in SYSOUT:

Quote:

CONTROL CARD DOES NOT BEGIN WITH $$DD
.....SKIPPING TO NEXT $$DD CARD


May I know how to copy the unchanged records also to output along with changed ones?

Thanks.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Mon Oct 13, 2008 5:19 pm
Reply with quote

Hi,

I'm not sure why you are getting a MAXCC=4, you may need to post your entire job output and code.

In the meantime you can try this in order to copy unchanged records as well
Code:
$$DD01 COPYALL IF=(5,EQ,C'A'),   
             REPL=(5,C'1'),     
            IF=(5,EQ,C'B'),     
             REPL=(5,C'2')       


Gerry
Back to top
View user's profile Send private message
gorman
Currently Banned

New User


Joined: 23 Sep 2008
Posts: 10
Location: Chennai

PostPosted: Mon Oct 13, 2008 6:56 pm
Reply with quote

Gerry, thank you very much.............
Now, I am able to copy all records (changed + unchanged). Job ends with MAXCC=0. icon_biggrin.gif
The problem was I had a blank line after the code in the SYSIN icon_surprised.gif

Thanks.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 3
Search our Forums:

Back to Top