Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts CA Intertest Batch 555shanth CA Products 0 Tue Nov 28, 2017 11:10 am
No new posts How to query MAXGENS of an existing P... Chuchulo Hatyzak JCL & VSAM 4 Wed Nov 22, 2017 10:23 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us