View previous topic :: View next topic
|
Author |
Message |
Sabry Krishnan L
New User
Joined: 30 Dec 2006 Posts: 11 Location: Chennai-India
|
|
|
|
I have a request as to modify a job card value in 1000 jcls under a PDS. Different value needs to replaced instead of a word for different conditions. For Example,
//Jobname JOB (XXX,YYYY-YYY,ZZZZ,AAAA)
For this job card ZZZZ should be replaced with RRRR if the last value is AAAA. it should be replaced with SSSS if the last value is BBBB.
Can i uses the below function?
// DD01 COPYMEM IF=(34.EQ,C'AAAA'),REPL=(29,C'RRRR'),
IF=(34.EQ,C'BBBB'),REPL=(29,C'SSSS')
Will this statement work?
can there be more appropriate solution other than this for this requirement? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
First i suggest making a copy of the entire pds - just in case.
Then you could globally change ',ZZZZ,AAAA)' to ',RRRR,AAAA)'.
Next globally change ',ZZZZ,BBBB)' to 'SSSS,BBBB)'.
If you aren't familiar with making a global change, talk with your system support people and they can tell what options you have at your site.
Check a few members to ensure you have what you want.
I'm not familiar with the jcl/code you posted, but it does not look like jcl that would run in a vanilla mvs environment. If your site has an add-on that would intercept this, maybe. . . . |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
dick scherrer wrote: |
Then you could globally change ',ZZZZ,AAAA)' to ',RRRR,AAAA)'.
Next globally change ',ZZZZ,BBBB)' to 'SSSS,BBBB)'. |
Sabry Krishnan L... If you have any question on how to implement this... You may want to look here.... |
|
Back to top |
|
|
Sabry Krishnan L
New User
Joined: 30 Dec 2006 Posts: 11 Location: Chennai-India
|
|
|
|
I got the solution using FILEAID batch.... As follows...
$$DD01 UPDATEALL IF=(1,80,EQ,C'AAAA'),
REPLACE=(1,80,EQ,C'ZZZZ',C'RRRR'),
IF=(1,80,EQ,C'BBBB'),
REPLACE=(1,80,EQ,C'ZZZZ',C'SSSS'),
This is the control card to be used in the fileaid batch job. And multiple IF conditions can be added. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello Sabry,
Thank you for posting your solution. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Very diplomatic, Dick..... |
|
Back to top |
|
|
sowjanya_mainframe
New User
Joined: 09 Dec 2006 Posts: 4 Location: pune
|
|
|
|
I need to checkout component from PDS to changeman package.how i can gohead.i tried with option 6(stage)->option 1(dev)->next i entered pds name ,lib name.it is coming open error.
can u pls give quick solution. |
|
Back to top |
|
|
Sabry Krishnan L
New User
Joined: 30 Dec 2006 Posts: 11 Location: Chennai-India
|
|
|
|
Sowjanya! I think you can start a new discussion about the same query under changeman! |
|
Back to top |
|
|
|