add new lines at the end



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

add new lines at the end

Postby rajo1234 » Sun Sep 24, 2017 2:16 am

Hi All,
i need to add multiple lines at the end of all the members of a pds. i came up with the below code but using this i am able to update only a single member.
please help me with the changes needed so that all members of the pds can be updated.
below is the code:
js010 exec pgm=sort,region=4096k
sysprint dd sysout=*
sysout dd sysout=*
sortin dd dsn=igc.niloy.pds(membername),disp=shr
sortout dd dsn=igc.niloy.pds(membername),disp=shr
sysin dd *
option copy
outfil trailer1=('//step01 exec pgm=sort',/,
                       '//sysprint dd sysout=*',/,
                        '/*'),removecc


please help||||||||
rajo1234
 
Posts: 4
Joined: Sun Sep 24, 2017 2:02 am
Has thanked: 0 time
Been thanked: 0 time

Re: add new lines at the end

 

Re: add new lines at the end

Postby prino » Sun Sep 24, 2017 2:38 am

And what language is that "code below"???

Ah, I see, your site has a JCL submit exit that automagically adds '//' to every line.

Ah, no, that cannot be the case as that would not make sense for SYSIN.

Ah, it's an intelligent exit that You yourself wrote, and that caters for such matters.

Well, in that case, you're a real expert, and you can figure out yourself how to solve your problem.

Actually, probably not, because real experts would know that there is no flipping way for JCL to loop around all members in a PDS.

Ergo conclusio, write a program that generates your JCL for you for every member of the PDS.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 537
Joined: Wed Mar 11, 2009 12:22 am
Location: Oostende, Belgium
Has thanked: 3 times
Been thanked: 21 times

Re: add new lines at the end

Postby rajo1234 » Sun Sep 24, 2017 2:42 am

code is in jcl.
sorry sir i am unable to solve the issue :(
actually i need a code to update all members of pds but my code will only update one member.
i want to update all members at one go.
so need help :(
rajo1234
 
Posts: 4
Joined: Sun Sep 24, 2017 2:02 am
Has thanked: 0 time
Been thanked: 0 time

Re: add new lines at the end

Postby prino » Sun Sep 24, 2017 3:24 am

rajo1234 wrote:code is in jcl.

No, it's not!

rajo1234 wrote:sorry sir i am unable to solve the issue :(

We really feel for you...

rajo1234 wrote:actually i need a code to update all members of pds but my code will only update one member.
i want to update all members at one go.

You probably need IEHGOD for that.

rajo1234 wrote:so need help :(

You've set up some funny-language code for one member, just repeat that for all 42 gazillion members.

Now, was that so hard?
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 537
Joined: Wed Mar 11, 2009 12:22 am
Location: Oostende, Belgium
Has thanked: 3 times
Been thanked: 21 times

Re: add new lines at the end

Postby Robert Sample » Sun Sep 24, 2017 4:02 am

JCL is not code -- never has been and most likely never will be. JCL allocates resources and executes programs -- AND THAT IS ALL IT DOES! Do not confuse JCL (the way to run a program) with the program code being executed.

There are not really any utilities in z/OS to update all members of a PDS (other than utilities used by system programmers). As you have discovered, it is not hard to update a single member of the PDS but it becomes quite difficult to update all the members. If your site has SAS, you could find a SAS programmer to write you the code to update all members of the PDS -- it is not difficult coding but it is certainly not something for a rank novice (such as yourself) to undertake. If your site does not have SAS, IIRC it is possible to do what you want with a couple of different vendor programs; consult with your site support group to find out if your site has one of those programs.

Without SAS or the other vendor programs, you will need to code JCL to execute against each PDS member (or as was suggested, write a program to generate the JCL) -- remembering that if you have more than 255 members to update, you will have to have more than one job since a single job is limited to 255 program executions. Hint: read up on instream PROC (procedure).
Robert Sample
Global moderator
 
Posts: 3363
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 221 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post