IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Neep help in replacing 1 line in all PDS member with 5 lines


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mambopras

New User


Joined: 11 Nov 2008
Posts: 52
Location: Hyderabad

PostPosted: Mon Sep 05, 2011 3:02 pm
Reply with quote

Hi,

I have a PDS containing many JCL members along with other type of members (sort cards etc). I have a requirement to replace a single line of all the JCL members with 5 lines: Example is as given below

// SET SMTX=XR is the line that needs to be repalced by

// SET SMTA = '01'
// SET SMTB = '02'
// SET SMTC = '03'
// SET SMTD = '04'
// SET SMTE = '05'

I have tried doing this using 'FIND/CHANGE' utility (online) in FM but I get an error quoting 'Too many parameters' - Even the batch version is not allowing this.

Can somebody help me in meeting this requirement ? Thanks for your help!!!
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Sep 05, 2011 3:09 pm
Reply with quote

Search on ISREDIT macros

There are many examples on this forum
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Sep 05, 2011 3:09 pm
Reply with quote

You will have to write an edit macro to do it..
there are quite a few samples around in the forums
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Mon Sep 05, 2011 3:32 pm
Reply with quote

If you could use:
Code:
//  SET  SMTA=01,SMTB=02,SMTC=03,SMTD=04,SMTE=05
That would make it easier, no?

Oh, wait... You can!!!
Back to top
View user's profile Send private message
mambopras

New User


Joined: 11 Nov 2008
Posts: 52
Location: Hyderabad

PostPosted: Mon Sep 05, 2011 5:32 pm
Reply with quote

Enrico, Escapa

Thank you for the suggestion, I will search the forums more for the sampels

Marso,

The one I had given was just an example (as quoted) - the actual content is different. But the final thing to achieve is to replace one line by five lines!! However thank you for the suggestion, I would remember this while replacing any SET statements in future!!!
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Sep 06, 2011 12:07 am
Reply with quote

Hello,

Quote:
the actual content is different.
What a waste of people's time. . . icon_sad.gif

There is no good reason to post something other than what is needed. If the "real" values should be protected - fine - subsittute something similar.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Tue Sep 06, 2011 1:05 pm
Reply with quote

In that case, I will rephrase:

You still can use FIND/CHANGE without the need to add new lines if you use, FOR EXAMPLE
Code:
C 'SMTX=XR' 'SMTA=01,SMTB=02,SMTC=03,SMTD=04,SMTE=05'

If that string is too long to fit in the command line, you can use any trick you want like, FOR EXAMPLE
Code:
C 'SMTX=XR' 'SMTA=01,SMTB=02,SMTC=03,@@X'
C '@@X' 'SMTD=04,SMTE=05'

Of course, you can add parameters to the CHANGE command, FOR EXAMPLE:
Code:
ALL FIRST NEXT PREV WORD
and so on.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Tue Sep 06, 2011 8:14 pm
Reply with quote

Does your shop have Jobscan installed? It's what runs if you enter "JEM" to check your JCL.

It has a really nice batch JCL editor built in that can do EXACTLY what you're looking for.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Tue Sep 06, 2011 9:03 pm
Reply with quote

Ed Goodman wrote:
Does your shop have Jobscan installed? It's what runs if you enter "JEM" to check your JCL.

It has a really nice batch JCL editor built in that can do EXACTLY what you're looking for.

The same is true of JCLPREP. Beware, however; the control language for JPEDMCR (the JCLPREP batch editor) is a programming language in itself, and not to be mastered by asking a few questions in a forum such as this. I haven't been at a shop that used JOBSCAN in nearly a decade, and do not recall if the same is true of it or not.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts rewrite same SAY line CLIST & REXX 8
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
Search our Forums:

Back to Top