To add a override statement in JCL

JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...
Ashu07
Posts: 4
Joined: Tue Feb 05, 2019 12:50 pm
Skillset: Mainframe COBOL
Referer: Google

To add a override statement in JCL

Postby Ashu07 » Tue Feb 05, 2019 1:07 pm

Hi all,
I've a requirement,where I need to add override statement to pick the proc from another library for 3k jobs.Is their any way,where I can say add below statement only before first exec statement in a JCL.

// JCLLIB ORDER=userid.test.proclib

Is there any way/utility we can achieve this.Any inputs will be helpful.

NicC
Global moderator
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
Referer: Google
Location: Pushing up the daisies (almost)

Re: To add a override statement in JCL

Postby NicC » Tue Feb 05, 2019 4:49 pm

Yes. Refer to similar requirements in the forum.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic

Ashu07
Posts: 4
Joined: Tue Feb 05, 2019 12:50 pm
Skillset: Mainframe COBOL
Referer: Google

Re: To add a override statement in JCL

Postby Ashu07 » Tue Feb 05, 2019 5:05 pm

Hi NIck,

I searched the forum with all the possible keywords,couldn't find what I was looking for,that's the reason I posted this question.

NicC
Global moderator
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
Referer: Google
Location: Pushing up the daisies (almost)

Re: To add a override statement in JCL

Postby NicC » Tue Feb 05, 2019 7:38 pm

The name is Nic or NicC not Nick.
You need to write a program in the language of your choice - probably Rexx - to read each job and insert the new JCLLIB statement. Depending on the EXACT change tobe made it could be done with a simple edit macro.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic

User avatar
prino
Posts: 641
Joined: Wed Mar 11, 2009 12:22 am
Skillset: PL/I - CICS - DB2 - IDMS - REXX - JCL, most in excess of three decades
Referer: Google
Location: Vilnius, Lithuania
Contact:

Re: To add a override statement in JCL

Postby prino » Tue Feb 05, 2019 7:41 pm

Ashu07 wrote:Hi all,
I've a requirement,where I need to add override statement to pick the proc from another library for 3k jobs.Is their any way,where I can say add below statement only before first exec statement in a JCL.

// JCLLIB ORDER=userid.test.proclib

Is there any way/utility we can achieve this.Any inputs will be helpful.

An override for 3k jobs is insane. Which PHB has decided to do this? Do your auditors agree with it?
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy

Ashu07
Posts: 4
Joined: Tue Feb 05, 2019 12:50 pm
Skillset: Mainframe COBOL
Referer: Google

Re: To add a override statement in JCL

Postby Ashu07 » Tue Feb 05, 2019 8:20 pm

We are doing this for test environment.so they are fine with it.

willy jensen
Posts: 474
Joined: Thu Mar 10, 2016 5:03 pm
Skillset: assembler rexx zOS ispf racf smf
Referer: saw it in the experts foprum thought I could help here

Re: To add a override statement in JCL

Postby willy jensen » Tue Feb 05, 2019 9:37 pm

This is the simplest 'Edit all' command I could find. It doesnt do much in the way of error checking and such, I will leave that up to the user..

Code: Select all

/*                                                                 rexx
  Run an ISPF Edit Macro against every member of named pds              
  Syntax:    %Editall dsname edit-macro                                
*/                                                                      
                                                                       
 arg dsn mac                                                            
 zz=outtrap('lst.')                                                    
 "LISTDS" requote(dsn) "MEMBERS"                                        
 zz=outtrap('off')                                                      
                                                                       
 dsn = unquote(dsn)                                                    
 do n = 7 to lst.0                                                      
   Address ISPEXEC "EDIT DATASET('"dsn"("strip(lst.n)")') MACRO("mac")"
 end                                                                    
 exit                                                                  
                                                                       
Requote: if arg(1)='' then return '';else return "'"Unquote(arg(1))"'"  
Unquote: return strip(space(translate(arg(1)," ","'")))                

Sample edit macro

Code: Select all

/*  ISPF edit macro          rexx */
 Address Isredit "MACRO NOPROCESS(P)"
 Address Isredit                      
 l='Just testing'                    
 "line_after 1 = (l)"                
 "save"                              
 "cancel"                            

3000 members, it's going to run for a while, so it might be worth your while to look at alternatives like File Manager (dont know if that can do this kind of change). Other consideration, if this is just one PDS and not PDS/E then you could run into space problems.

willy jensen
Posts: 474
Joined: Thu Mar 10, 2016 5:03 pm
Skillset: assembler rexx zOS ispf racf smf
Referer: saw it in the experts foprum thought I could help here

Re: To add a override statement in JCL

Postby willy jensen » Tue Feb 05, 2019 10:01 pm

By the way, the sample does not do screen display , so could be run as an ISPF batch job.

Ashu07
Posts: 4
Joined: Tue Feb 05, 2019 12:50 pm
Skillset: Mainframe COBOL
Referer: Google

Re: To add a override statement in JCL

Postby Ashu07 » Wed Feb 06, 2019 1:32 pm

Thanks Willy,Let me try this out.


  • Similar Topics
    Replies
    Views
    Last post