View previous topic :: View next topic
|
Author |
Message |
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
By now you know how to present a question. . .
Post the submitted job and the diagnostic info. . . |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
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 |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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
that gets executed and then the script exits
as far as passing parameters ...
Code: |
// ... ,PARM='LOCCID par1 par2 ... parn' |
|
|
Back to top |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
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
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Have you used TRACE |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
icetigerfan
New User
Joined: 08 Mar 2010 Posts: 13 Location: Nuremberg, Germany
|
|
|
|
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 |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
How do you read these values into variables within the REXX code. |
|
Back to top |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
did You care to look at my <sample>
there are no intervening commas, the tokens are separated by spaces |
|
Back to top |
|
|
Kjeld
Active User
Joined: 15 Dec 2009 Posts: 365 Location: Denmark
|
|
|
|
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 |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
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 |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
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 |
|
|
icetigerfan
New User
Joined: 08 Mar 2010 Posts: 13 Location: Nuremberg, Germany
|
|
|
|
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 |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
Hi all,
Thanks for your valuable suggestions and help
The following was to be added in the REXX program
Code: |
PARSE ARG PDS STRING1
|
This solved the problem to replace the values from the JCL to REXX. |
|
Back to top |
|
|
|