View previous topic :: View next topic
|
Author |
Message |
saagu
New User
Joined: 15 May 2008 Posts: 41 Location: Chennai
|
|
|
|
Hi,
How to insert a new line in a JCL using REXX. I need sample code for this.
If JCl is as shown below....
//SOMP0001 JOB (11111,TEST,PROG1),'SOMP0001',
// CLASS=7,
// MSGCLASS=X,
........
//*
Now i need to insert a line with NOTIFY=&SYSUID as shown below using REXX
//SOMP0001 JOB (11111,TEST,PROG1),'SOMP0001',
// CLASS=7,
// NOTIFY=&SYSUID,
// MSGCLASS=X,
........
//* |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
There are examples of doing inserts and deletes on the forum. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
saagu, you read the first line, thern write it out. You read the second line, then write it out. You create a new third line, then write it out. From there, you just read and write every other line until you reach the end.
Personally, I think youd be better off editing the file and easily inserting that new record. |
|
Back to top |
|
|
saagu
New User
Joined: 15 May 2008 Posts: 41 Location: Chennai
|
|
|
|
I need a sample REXX code for the same. |
|
Back to top |
|
|
saagu
New User
Joined: 15 May 2008 Posts: 41 Location: Chennai
|
|
|
|
Hi Kevin,
Yes you are write, but how to create a new line? I need this syntax please.
Regards,
Saagu |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
saagu wrote: |
I need a sample REXX code for the same. |
Supplied - tested and documented - only 750 euro.
Please do not ask for code unless you are willing to pay for it. This is a help forum, not a do it for you forum.
As stated before, there are examples on the forum, please search for them. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Code: |
/* REXX */
cnt = 0
Do Forever
"EXECIO 1 DISKR i"
If rc <> 0 Then Leave
Parse Pull jcl
cnt = cnt + 1
Push jcl
"EXECIO 1 DISKW o"
If cnt = 3 Then
Do
Push "// NOTIFY=&SYSUID,"
"EXECIO 1 DISKW o"
End
End
"EXECIO 0 DISKR i (FINIS"
"EXECIO 0 DISKW o (FINIS"
Exit 0
|
|
|
Back to top |
|
|
|