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



IBM's Command List programming language & Restructured Extended Executor

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

Postby arya_starc » Tue Sep 20, 2016 11:14 am

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?
arya_starc
 
Posts: 60
Joined: Mon Sep 21, 2015 1:39 pm
Has thanked: 3 times
Been thanked: 0 time

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

 

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

Postby NicC » Tue Sep 20, 2016 2:21 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2531
Joined: Sun Jul 04, 2010 12:13 am
Location: Down on the pig farm
Has thanked: 4 times
Been thanked: 88 times

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

Postby enrico-sorichetti » Wed Sep 21, 2016 12:02 am

post a sample of the input data , and of the expected output
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2519
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 120 times

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

Postby willy jensen » Wed Sep 21, 2016 1:40 pm

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

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

Postby arya_starc » Wed Sep 21, 2016 3:12 pm

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
arya_starc
 
Posts: 60
Joined: Mon Sep 21, 2015 1:39 pm
Has thanked: 3 times
Been thanked: 0 time

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

Postby arya_starc » Wed Sep 21, 2016 3:40 pm

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
arya_starc
 
Posts: 60
Joined: Mon Sep 21, 2015 1:39 pm
Has thanked: 3 times
Been thanked: 0 time

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

Postby arya_starc » Wed Sep 21, 2016 3:54 pm

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
arya_starc
 
Posts: 60
Joined: Mon Sep 21, 2015 1:39 pm
Has thanked: 3 times
Been thanked: 0 time

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

Postby NicC » Wed Sep 21, 2016 3:55 pm

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
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2531
Joined: Sun Jul 04, 2010 12:13 am
Location: Down on the pig farm
Has thanked: 4 times
Been thanked: 88 times

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

Postby arya_starc » Wed Sep 21, 2016 3:57 pm

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
arya_starc
 
Posts: 60
Joined: Mon Sep 21, 2015 1:39 pm
Has thanked: 3 times
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post