Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

multiple COPY REPLACE using File-Aid batch?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools
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    Post subject: multiple COPY REPLACE using File-Aid batch?
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: 1703
Location: Australia

PostPosted: Mon Oct 13, 2008 5:00 pm    Post subject:
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    Post subject:
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: 1703
Location: Australia

PostPosted: Mon Oct 13, 2008 5:19 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us