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
 
How to insert a line in a JCL using REXX code

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
saagu

New User


Joined: 15 May 2008
Posts: 41
Location: Chennai

PostPosted: Mon Mar 09, 2009 3:47 pm    Post subject: How to insert a line in a JCL using REXX code
Reply with quote

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
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Mar 09, 2009 3:50 pm    Post subject:
Reply with quote

There are examples of doing inserts and deletes on the forum.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Mon Mar 09, 2009 3:51 pm    Post subject: Reply to: How to insert a line in a JCL using REXX code
Reply with quote

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
View user's profile Send private message
saagu

New User


Joined: 15 May 2008
Posts: 41
Location: Chennai

PostPosted: Mon Mar 09, 2009 3:52 pm    Post subject:
Reply with quote

I need a sample REXX code for the same.
Back to top
View user's profile Send private message
saagu

New User


Joined: 15 May 2008
Posts: 41
Location: Chennai

PostPosted: Mon Mar 09, 2009 3:54 pm    Post subject:
Reply with quote

Hi Kevin,

Yes you are write, but how to create a new line? I need this syntax please.

Regards,
Saagu
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Mar 09, 2009 4:06 pm    Post subject:
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Mon Mar 09, 2009 4:13 pm    Post subject: Reply to: How to insert a line in a JCL using REXX code
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
No new posts How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm

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