To add a override statement in JCL



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

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.
Ashu07
 
Posts: 4
Joined: Tue Feb 05, 2019 12:50 pm
Has thanked: 0 time
Been thanked: 0 time

Re: To add a override statement in JCL

 

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
NicC
Global moderator
 
Posts: 2849
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 121 times

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.
Ashu07
 
Posts: 4
Joined: Tue Feb 05, 2019 12:50 pm
Has thanked: 0 time
Been thanked: 0 time

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
NicC
Global moderator
 
Posts: 2849
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 121 times

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
User avatar
prino
 
Posts: 571
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 24 times

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.
Ashu07
 
Posts: 4
Joined: Tue Feb 05, 2019 12:50 pm
Has thanked: 0 time
Been thanked: 0 time

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..
/*                                                                 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
/*  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: 210
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 31 times

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.
willy jensen
 
Posts: 210
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 31 times

Re: To add a override statement in JCL

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

Thanks Willy,Let me try this out.
Ashu07
 
Posts: 4
Joined: Tue Feb 05, 2019 12:50 pm
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post