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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm


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