Page 1 of 1

need help to create a rexx which can give the jcl override

PostPosted: Tue Sep 20, 2016 11:14 am
by arya_starc
hi guys,

I am beginner in rexx, I want to create a rexx by which I can give the input like dd name, step name and dsn and it creates a another with jcl override with the given inputs.
Help me if you have any idea?

Re: need help to create a rexx which can give the jcl overri

PostPosted: Tue Sep 20, 2016 2:21 pm
by NicC
Learn the basics of Rexx first. Start with "hello World" and work up. You can do quite a lot with knowing the basics in cluding what you want (as far as I can tell). You can do even more if you learn about the various services including File Tailoring which is what you really need for what you are doing.

However, it is up to you to teach yourself. Come back with any questions when reading the manual and experimentation does not get you anywhere.

Re: need help to create a rexx which can give the jcl overri

PostPosted: Wed Sep 21, 2016 12:02 am
by enrico-sorichetti
post a sample of the input data , and of the expected output

Re: need help to create a rexx which can give the jcl overri

PostPosted: Wed Sep 21, 2016 1:40 pm
by willy jensen
Sounds like a bad use of REXX only. My preference would be to use one ISPF panel plus one ISPF skeleton glued together with a few REXX statements. See 'ISPF Dialog Developers Guide and Reference' and 'TSOE REXX Reference' manuals for details. However if this is purely for educational purposes then I suppose that pure REXX is ok. But whatever the case, you need to read the manuals, start building the program and then come back here for answers to specific questions.

As a broad outline for doing what you ask for, you'd need something like this:

Prompt the user, using the SAY instruction.
Read the response, using the PULL instruction.
Build the JCL lines using the QUEUE instruction, using concatenation to build data records.
Since it is JCL I assume that you eventually must send it to the JES, for that use ALLOC and EXECIO.

Of course,that is just one way of doing it.

Re: need help to create a rexx which can give the jcl overri

PostPosted: Wed Sep 21, 2016 3:12 pm
by arya_starc
NicC wrote:Learn the basics of Rexx first. Start with "hello World" and work up. You can do quite a lot with knowing the basics in cluding what you want (as far as I can tell). You can do even more if you learn about the various services including File Tailoring which is what you really need for what you are doing.

However, it is up to you to teach yourself. Come back with any questions when reading the manual and experimentation does not get you anywhere.


yes..i start reading manual

Re: need help to create a rexx which can give the jcl overri

PostPosted: Wed Sep 21, 2016 3:40 pm
by arya_starc
enrico-sorichetti wrote:post a sample of the input data , and of the expected output


input is like as I am thinking now

first we give the 'ex' command in front of some pds like this

ex       AYXVPEG.PDS.SUSHIL.REXX                  
 

In the pds I kept one jcl

000001 //LTHTTEST JOB (0000,0000),'OMARI J',                                  
000002 //         CLASS=W,                                                    
000003 //         MSGCLASS=X,                                                  
000004 //         MSGLEVEL=(1,1)                                              
000005 //*                                                                    
000006 //**********************************************************************
000007 //PROCLIB  JCLLIB ORDER=LVPS.V839.PROCLIB                              
000008 //**********************************************************************
000009 //$JOBLIB  INCLUDE MEMBER=$LTHLOAD                                      
000010 //**********************************************************************
000011 //*                                                                    
000012 //INHBYDH  EXEC INHBYDH,                                                
000013 //         HLQ=LVPS                                                                      
 


In output
I get the same jcl with jcl override and the stepname and dd name I passed after I executing the rexx

000001 //LTHTTEST JOB (0000,0000),'OMARI J',                                  
000002 //         CLASS=W,                                                    
000003 //         MSGCLASS=X,                                                  
000004 //         MSGLEVEL=(1,1)                                              
000005 //*                                                                    
000006 //**********************************************************************
000007 //PROCLIB  JCLLIB ORDER=LVPS.V839.PROCLIB                              
000008 //**********************************************************************
000009 //$JOBLIB  INCLUDE MEMBER=$LTHLOAD                                      
000010 //**********************************************************************
000011 //*                                                                    
000012 //INHBYDH  EXEC INHBYDH,                                                
000013 //         HLQ=LVPS                                                    
000014 //STEP040.HMCD DD DSN=&HLQ..HCS.HMCD.KE,DISP=SHR                
 
 


STEP40 step name and HMCD dd name is present inside the proc used in the jcl.
Let me know in case you

Re: need help to create a rexx which can give the jcl overri

PostPosted: Wed Sep 21, 2016 3:54 pm
by arya_starc
willy jensen wrote:Sounds like a bad use of REXX only. My preference would be to use one ISPF panel plus one ISPF skeleton glued together with a few REXX statements. See 'ISPF Dialog Developers Guide and Reference' and 'TSOE REXX Reference' manuals for details. However if this is purely for educational purposes then I suppose that pure REXX is ok. But whatever the case, you need to read the manuals, start building the program and then come back here for answers to specific questions.

As a broad outline for doing what you ask for, you'd need something like this:

Prompt the user, using the SAY instruction.
Read the response, using the PULL instruction.
Build the JCL lines using the QUEUE instruction, using concatenation to build data records.
Since it is JCL I assume that you eventually must send it to the JES, for that use ALLOC and EXECIO.

Of course,that is just one way of doing it.


I am thinking using rexx with ISPF commands.
Please correct me if I am wrong

Re: need help to create a rexx which can give the jcl overri

PostPosted: Wed Sep 21, 2016 3:55 pm
by NicC
Simple:
1-Prompt for override details
2-Read member from PDS into a stem
3-Create your override as the last member in the stem
4-Move the entire stem to queue
5-Submit
There are recent references to the last two steps within the forum

More complex and professional
1-Get override details from panel
2-Use file tailoring to update the member
3-Submit

Re: need help to create a rexx which can give the jcl overri

PostPosted: Wed Sep 21, 2016 3:57 pm
by arya_starc
arya_starc wrote:
enrico-sorichetti wrote:post a sample of the input data , and of the expected output


input is like as I am thinking now

first we give the 'ex' command in front of some pds like this

ex       AYXVPEG.PDS.SUSHIL.REXX      
after executing the rexx it will ask for the below inputs like this:-
ENTER DD NAME          
                       
ENTER STEP NAME        
                       
ENTER DSN NAME        
                       
***                               
 

In the pds I kept one jcl

000001 //LTHTTEST JOB (0000,0000),'OMARI J',                                  
000002 //         CLASS=W,                                                    
000003 //         MSGCLASS=X,                                                  
000004 //         MSGLEVEL=(1,1)                                              
000005 //*                                                                    
000006 //**********************************************************************
000007 //PROCLIB  JCLLIB ORDER=LVPS.V839.PROCLIB                              
000008 //**********************************************************************
000009 //$JOBLIB  INCLUDE MEMBER=$LTHLOAD                                      
000010 //**********************************************************************
000011 //*                                                                    
000012 //INHBYDH  EXEC INHBYDH,                                                
000013 //         HLQ=LVPS                                                                      
 


In output
I get the same jcl with jcl override and the stepname and dd name I passed after I executing the rexx

000001 //LTHTTEST JOB (0000,0000),'OMARI J',                                  
000002 //         CLASS=W,                                                    
000003 //         MSGCLASS=X,                                                  
000004 //         MSGLEVEL=(1,1)                                              
000005 //*                                                                    
000006 //**********************************************************************
000007 //PROCLIB  JCLLIB ORDER=LVPS.V839.PROCLIB                              
000008 //**********************************************************************
000009 //$JOBLIB  INCLUDE MEMBER=$LTHLOAD                                      
000010 //**********************************************************************
000011 //*                                                                    
000012 //INHBYDH  EXEC INHBYDH,                                                
000013 //         HLQ=LVPS                                                    
000014 //STEP040.HMCD DD DSN=&HLQ..HCS.HMCD.KE,DISP=SHR                
 
 


STEP40 step name and HMCD dd name is present inside the proc used in the jcl.
Let me know in case you