View previous topic :: View next topic
|
Author |
Message |
ziddiguy
New User
Joined: 20 Jul 2007 Posts: 14 Location: Germany
|
|
|
|
Hello Everybody,
I have a PDS with thousand members(JCL), now i want to add a steplib in all 1000 members which has IKJEFT01 as the program name, around all 1000 members has 2 steps of IKJEFT01 and I also want to add a proc name before all steps
e.g. //SYSOUT DD *
//PROCNAME.SYSOUT DD *
Could some one tell me how can i do it using IBM utilities as I don't want to use REXX
Thanks in advance |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Quote: |
Could some one tell me how can i do it using IBM utilities as I don't want to use REXX |
Is there any good reason why you would not want to use the easiest solution available ? |
|
Back to top |
|
|
ziddiguy
New User
Joined: 20 Jul 2007 Posts: 14 Location: Germany
|
|
|
|
Thanks for your reply
The reason is that I don't know REXX and I am trying to find the solution through IBM Utilities only if its feasible
I am sure and confident that the moderators and users of this forum are amazing and would give me the best solution
Thanks |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Here's a post from earlier .................. hope it helps you out.
Where it says "ISREDIT COPY member BEFORE "CRSLINE
member is a member in the base PDS that is being edited.
I don't usually post too much code these days, but having already done something very similar ..... If I have the code and it can be changed in seconds then I am happy to post. ..... Just amended my current version, and have Not tested it
Obviously in batch you will need to allocate all of the required ISPF libraries.
1) Main REXX EXEC
Code: |
/* REXX *** LIST PDS AND INVOKE EDIT MACRO TO UPDATE MEMBERS */
Address Ispexec "Control Errors Return"
Pds = "pds name"
mac = 'UPDATPD1'
x = msg('off')
x=outtrap(list.)
"LISTDS '"Pds"' MEM "
x=outtrap(off)
Do aa = 7 to list.0
"Ispexec edit dataset('"Pds"("Strip(list.aa)")') MACRO("mac")"
End
|
The Macro
Code: |
/* REXX *** ISPF EDIT MACRO */
Address Ispexec "Control Errors Return"
"ISREDIT MACRO"
"ISREDIT F 'PGM=NOB' FIRST"
Rcx = RC
"ISREDIT F 'PGM=NEM' FIRST"
Rcy = RC
If Rcx = 0 & Rcy = 4 then do
"ISREDIT F 'PGM=' LAST"
"ISREDIT (CRSLINE) = " CURSOR
"ISREDIT COPY member BEFORE "CRSLINE
End
|
|
|
Back to top |
|
|
ziddiguy
New User
Joined: 20 Jul 2007 Posts: 14 Location: Germany
|
|
|
|
Thanks a lot for the reply
But I really didn't understand much as i had told i don't know much REXX
I just want to confirm that is it possible to use utilities like IEBUPDTE and some other in JCL to get the same task done
Thanks a lot |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
What programming languages do you know?
You could use a combination of utilities and some of your own code to do what you want. You could unload the pds. Make changes via code. Then reload the pds.
Whatever you do, you want to make a backup before you begin. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
If you have FileAid at your shop, you can try this:
Code: |
//INSRTLN JOB (888),'INSRTLN',CLASS=C,MSGCLASS=X,
// NOTIFY=XXX
//*
//STEP01 EXEC PGM=FILEAID
//DD01 DD DISP=SHR,DSN=yrjcllib
//NEWDSN DD DISP=SHR,DSN=newjcllib
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//SYSIN DD *
$$DD01 USER F=JCL,WRITE=NEWDSN,
IF=(1,20,C' EXEC '),
you may want to change 20 to a larger # - I used this to ID job card
MOVE=(1,80C' '),
MOVE=(1,C'// JCLLIB ORDER=(PA.BASE.PROCLIB)'),
chang the above stmt to your needs
WRITE=NEWDSN |
|
|
Back to top |
|
|
ozgurseyrek
New User
Joined: 22 Feb 2008 Posts: 70 Location: Turkey
|
|
|
|
I have rafined the rexx and macro but It takes error;
Code: |
/* REXX *** LIST PDS AND INVOKE EDIT MACRO TO UPDATE MEMBERS */
Pds = 'SHR.XXXXX.YYYYY'
mac = 'MASSUPDT'
x = msg('off')
x=outtrap(list.)
"LISTDS '"Pds"' MEM "
x=outtrap(off)
Do aa = 7 to list.0
"Ispexec edit dataset('"Pds!!"("!!Strip(list.aa)!!")') MACRO("mac")"
End |
MASSUPDT MACRO;
Code: |
/* REXX *** ISPF EDIT MACRO */
Address Ispexec "Control Errors Return"
"ISREDIT C 'test string' 'test replace' all"
End |
THE ERROR:
Code: |
6 +++
4 +++ x = msg('off')
IRX0013I Error running LISTUPDT, line 6: Invalid character in program |
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
You can remove that line and see what happens, it isn't a required line.
Also I think that you forgot to include in the macro
"ISREDIT MACRO"
The code shown will also need as the last line
"ISREDIT END"
Sorry, I'd forgotten that |
|
Back to top |
|
|
ozgurseyrek
New User
Joined: 22 Feb 2008 Posts: 70 Location: Turkey
|
|
|
|
Hi expat,
I have write a rexx and a macro, Rexx works but doesn't call macro?
Also macro is a member at the rexx library with my rexx. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Take a look at the ALTLIB statement in the manuals or google, and it will work once you define your own library. |
|
Back to top |
|
|
ozgurseyrek
New User
Joined: 22 Feb 2008 Posts: 70 Location: Turkey
|
|
|
|
I Couldn't run Rexx, something is wrong but I don't know what...
For testing I have write a simple rexx but it doesnt't work;
member XXX.YYY.CLIB(TESTR)
Code: |
/* REXX *** LIST PDS AND INVOKE EDIT MACRO TO UPDATE MEMBERS */
Say 'Hello World1'
ÜIspexec edit dataset(SHR.XXX.YYYY(MEMBER1)) MACRO(TESTM)Ü |
member XXX.YYY.CLIB(TESTM)
Code: |
/* REXX *** LIST PDS AND INVOKE EDIT MACRO TO UPDATE MEMBERS */
Say 'Hello World2' |
At the output Only "Hello World1" printing.
I could't achieve call TESTM rexx member in TESTR rexx member.
Please help... |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Try using this instead .......... with ALTLIB
Code: |
/* REXX *** LIST PDS AND INVOKE EDIT MACRO TO UPDATE MEMBERS */
"ALTLIB ACTIVATE APPL(EXEC) DA('Your REXX library')"
Say 'Hello World1'
"Ispexec edit dataset(SHR.XXX.YYYY(MEMBER1)) MACRO(TESTM)"
"ALTLIB DEACTIVATE APPL(EXEC) " |
|
|
Back to top |
|
|
ozgurseyrek
New User
Joined: 22 Feb 2008 Posts: 70 Location: Turkey
|
|
|
|
It didn't work
Are there any problem in my JCL that calls that Rexx?
Code: |
//* REXX for MASS Update on A PDS
/*
//REXX EXEC PGM=IKJEFT01,DYNAMNBR=30,REGION=4096K,PARM='TESTR'
//SYSEXEC DD DSN=XXX.YYY.CLIB,DISP=SHR
//SYSPROC DD DSN=XXX.YYY.CLIB,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSIN DD *
/* |
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Yes, you are executing basic TSO in batch. You will need to add the relevant ISPF DD names and libraries into your batch job to enable it to work.
There are many topics on running ISPF in batch on the forum / internet. |
|
Back to top |
|
|
|