Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

JCL to submit REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
tecnokrat
Warnings : 1

Active User


Joined: 22 May 2009
Posts: 158
Location: Bangalore

PostPosted: Mon Aug 30, 2010 9:52 pm    Post subject: JCL to submit REXX
Reply with quote

Hi,
i have requirement to submit the REXX in JCL. Here the REXX intakes the 3 input parameters.

In the JCL how to specify these parameters to run the REXX program.

I tried the JCL by giving the parms in the //SYSIN DD * but the program is giving a JCL error.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Aug 30, 2010 9:57 pm    Post subject:
Reply with quote

Hello,

By now you know how to present a question. . .

Post the submitted job and the diagnostic info. . .
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Tue Aug 31, 2010 5:40 am    Post subject: Reply to: JCL to submit REXX
Reply with quote

Usually, parameters are passed to a program via the PARM= statement in that step of the JCL. The fact that the program is written in REXX does't change that fact. Does that help?
Back to top
View user's profile Send private message
tecnokrat
Warnings : 1

Active User


Joined: 22 May 2009
Posts: 158
Location: Bangalore

PostPosted: Tue Aug 31, 2010 9:00 am    Post subject:
Reply with quote

Hi below is my JCL

Code:
//RUNREXX JOB (0000),'RUN FOR LOCCID',MSGCLASS=X,CLASS=B,       
//            MSGLEVEL=(1,1),NOTIFY=&SYSUID                     
//TSOBATCH EXEC PGM=IKJEFT1A,DYNAMNBR=200,PARM='LOCCID'         
//SYSTSPRT DD   SYSOUT=*                                         
//SYSTSIN  DD   DUMMY                                           
//SYSEXEC  DD   DSN=LST.CLIST,DISP=SHR                           
//SYSPRINT DD   SYSOUT=*                                         


when submitting this Job i get a MAXCC = 0 but the SYSOUT has this

Code:
PFKEY PARA
READY     
END       



The input parameters to this JCL are PDS name and String.Please let me know as where these inputs can be specified in the JCL.
Back to top
View user's profile Send private message
tecnokrat
Warnings : 1

Active User


Joined: 22 May 2009
Posts: 158
Location: Bangalore

PostPosted: Tue Aug 31, 2010 9:49 am    Post subject:
Reply with quote

here in the code of the program LOCCID contains a segment as below

Code:

 SELECT                                                 
   WHEN ZPFKEY  == 'PF04' THEN CALL REFRESH_PARA         
   WHEN ZPFKEY  == 'PF00' THEN CALL INPUT_VALIDATION_PARA
   WHEN ZPFKEY  == 'PF03' THEN EXIT                     
   OTHERWISE SIGNAL VALID_PFKEY_PARA                     
 END                                                     


When the above JOB is submitted always the VALID_PFKEY_PARA is performed and hence giving me the result as below
Code:
PFKEY PARA
READY     
END       


Can i skip the call to the VALID_PFKEY_PARA by routing the call to INPUT_VALIDATION_PARA by giving the PF00 key.

Please can you tell me where to give this as an input so the proper input parameters are taken by the TOOL.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Aug 31, 2010 11:22 am    Post subject:
Reply with quote

Hello. Are you being serious here.

How about something useful like the OUTPUT showing the JCL error.

Psychic day was Monday this week.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Tue Aug 31, 2010 11:30 am    Post subject: Reply to: JCL to submit REXX
Reply with quote

how can You expect to write TOOLS as You say
when You are not even capable of describing the issues You are facing

Your REXX completed successfully ...
somewhere You have a statement along the lines of
Code:
SAY PFKEY PARA

that gets executed and then the script exits

as far as passing parameters ...

Code:
// ... ,PARM='LOCCID par1 par2 ... parn'   
Back to top
View user's profile Send private message
tecnokrat
Warnings : 1

Active User


Joined: 22 May 2009
Posts: 158
Location: Bangalore

PostPosted: Tue Aug 31, 2010 12:42 pm    Post subject:
Reply with quote

Sorry for misleading you

Actually the REXX TOOL gets me the count of the strings provided by me in a PS file at the end of the execution,when the input is given thru a PANEL.

Now that the inputs are to be given to a PARM= keyword i tried in giving as
Code:
 PARM ='LOCCID,PDS.REXX,STRING1'


But still the JCL is submitted succesfully and the output has
Code:
READY
END
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Aug 31, 2010 12:51 pm    Post subject:
Reply with quote

Have you used TRACE
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Tue Aug 31, 2010 1:23 pm    Post subject: Reply to: JCL to submit REXX
Reply with quote

Quote:
Actually the REXX TOOL gets me the count of the strings provided by me in a PS file at the end of the execution,when the input is given thru a PANEL.


any reason to reinvent the wheel when there are already utilities that can do that

also what is the business need for such <tool> ?
Back to top
View user's profile Send private message
icetigerfan

New User


Joined: 08 Mar 2010
Posts: 11
Location: Nuremberg, Germany

PostPosted: Tue Aug 31, 2010 1:37 pm    Post subject:
Reply with quote

Hi,

my JCL for calling REXX looks a little bit different
Code:

//****************************************************************** 
//*CALLING REXX-PROC                                                   
//* ---------------------------------                                 
//stepname  EXEC PGM=IKJEFT01,DYNAMNBR=200                             
//SYSEXEC  DD DISP=SHR,DSN=privateRexxLibrary
//         DD DISP=SHR,DSN=publicRexxLibrary
//SYSTSPRT DD SYSOUT=*                                               
//SYSTSIN  DD *                                                       
%REXXPROC  -                                                         
dataset1 -                                               
dataset2                                               
/*                                                                   

Please notice the continuation sign (the minus) in the SYSTSIN data and the % before the name of the REXX procedure.
In the procedure the SYSTSIN has to be read by
Code:

PARSE ARG dataset1 dataset2
Back to top
View user's profile Send private message
tecnokrat
Warnings : 1

Active User


Joined: 22 May 2009
Posts: 158
Location: Bangalore

PostPosted: Tue Aug 31, 2010 3:21 pm    Post subject:
Reply with quote

Thanks all for the help

Code:
//RUNREXX JOB (0000),'RUN FOR LOCCID',MSGCLASS=X,CLASS=B,     
//            MSGLEVEL=(1,1),NOTIFY=&SYSUID                   
//*ISPF EDIT OF LST.C40083.JCL(RNJREXX)                       
//TSOBATCH EXEC PGM=IKJEFT01,DYNAMNBR=200,PARM=('LOCCIDJ',   
//  'PDS.COBOL',331080)                           
//SYSTSPRT DD   SYSOUT=*                                     
//SYSTSIN  DD   DUMMY                                         
//SYSEXEC  DD   DSN=LST.CLIST,DISP=SHR                       
//SYSPRINT DD   SYSOUT=*                                     
//SYSIN    DD *                                               
/*                     
                                       


here in the parms PARM=('LOCCIDJ','PDS.COBOL',331080')

LOCCIDJ - REXX PROGRAM
'PDS.COBOL' - input to my REXX program
331080 - string to search

but the REXX is unable to take in these two as its inputs.

the variable PDS should have been substituted by the 'PDS.COBOL'
and variable CCID with 331080.

Can anyone help in replacing the variables of the REXX program with the PARM fields.suggest me with your help.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Aug 31, 2010 3:30 pm    Post subject:
Reply with quote

How do you read these values into variables within the REXX code.
Back to top
View user's profile Send private message
tecnokrat
Warnings : 1

Active User


Joined: 22 May 2009
Posts: 158
Location: Bangalore

PostPosted: Tue Aug 31, 2010 3:37 pm    Post subject:
Reply with quote

Hi Expat,
when the REXX LOCCIDJ code is triggered it in turn pops-up a PANEL where i give in the input PDS and STRINGS to search in for.

Now that its being submitted thru a JCL i need a feasible way where in the values can be replaced directly to those variables.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Tue Aug 31, 2010 7:05 pm    Post subject: Reply to: JCL to submit REXX
Reply with quote

did You care to look at my <sample>
there are no intervening commas, the tokens are separated by spaces
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Wed Sep 01, 2010 5:00 am    Post subject:
Reply with quote

You are talking about displaying panels and checking PFkey input in REXX execs called from a batch TSO environment. To my best knowledge this cannot be accomplished, since no display terminal is available for a batch job
Back to top
View user's profile Send private message
tecnokrat
Warnings : 1

Active User


Joined: 22 May 2009
Posts: 158
Location: Bangalore

PostPosted: Wed Sep 01, 2010 8:42 am    Post subject:
Reply with quote

Hi kjeld,
The display of panel was done at the REXX invocation but in the invocation thru JCL the REXX is customized to take in the values from the batch Job.
Back to top
View user's profile Send private message
tecnokrat
Warnings : 1

Active User


Joined: 22 May 2009
Posts: 158
Location: Bangalore

PostPosted: Wed Sep 01, 2010 9:00 am    Post subject:
Reply with quote

Hi Expat,
I tried in the format as suggested by you but still the PARM is not replacing the values to fields in the rexx program.

Below is my JCL:
Code:
//RUNREXX JOB (0000),'RUN FOR LOCCID',MSGCLASS=X,CLASS=B,       
//            MSGLEVEL=(1,1),NOTIFY=&SYSUID                                 
//TSOBATCH EXEC PGM=IKJEFT01,DYNAMNBR=200,                     
//             PARM='LOCCIDJ  PDS.COBOL 331080'     
//SYSTSPRT DD   SYSOUT=*                                       
//SYSTSIN  DD   DUMMY                                           
//SYSEXEC  DD   DSN=PDS.REXX,DISP=SHR                         
//SYSPRINT DD   SYSOUT=*                                       
//SYSIN    DD *                                                 
/*                                                             


The parm2 = PDS.COBOL is still not substituted in the REXX program.
here is the output:
Code:

   do                                   
    IF SYSDSN("'"PDS"'") = OK           
      "0"                               
    ELSE                                 
     DO                                 
      ZEDLMSG = "DATASET NOT PRESENT"   
        "DATASET NOT PRESENT"           
      "ISPEXEC SETMSG MSG(ISRZ000)"     
        "ISPEXEC SETMSG MSG(ISRZ000)"   
 RC(20) +++                             
     END                                 
   end                                   
   RETURN                               
 RETURN                               


Do we need to specify in the REXX as a temp variable as &&PDS so that it senses the values from the JCL.
Back to top
View user's profile Send private message
icetigerfan

New User


Joined: 08 Mar 2010
Posts: 11
Location: Nuremberg, Germany

PostPosted: Wed Sep 01, 2010 10:52 am    Post subject:
Reply with quote

Reading variables into a batch-Rexx can be done by parsing
Code:

PARSE ARG var1 var2


And don't forget to replace all ISPF routine calls through TSO calls
Back to top
View user's profile Send private message
tecnokrat
Warnings : 1

Active User


Joined: 22 May 2009
Posts: 158
Location: Bangalore

PostPosted: Wed Sep 01, 2010 11:17 am    Post subject:
Reply with quote

Hi all,
Thanks for your valuable suggestions and help

The following was to be added in the REXX program


Code:

PARSE ARG PDS STRING1


icon_smile.gif icon_biggrin.gif

This solved the problem to replace the values from the JCL to REXX.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us