Passing paramter from REXX to JCL



IBM's Command List programming language & Restructured Extended Executor

Passing paramter from REXX to JCL

Postby zhinghur » Tue Apr 17, 2012 12:54 pm

Hi all,

I have a simple REXX that triggers a JCL(proc). My requirement is too pass 2 DSN names(pass some parameter).
I tried with one file pass first but couldn't.
I am new to REXX.
I searched this forum but couldn't find a solution.


REXX triggers JOB
/* SUBMITTING JOB THROUGH REXX */           
SAY 'ENTER QUALIFIER :'             
PULL TEST                                   
ADDRESS ISPEXEC "FTOPEN TEMP"               
ADDRESS ISPEXEC "FTINCL TSTSKEL"             
ADDRESS ISPEXEC "FTCLOSE"                   
ADDRESS ISPEXEC "VGET ZTEMPF"               
ENTER DATA SET NAME                         
ADDRESS TSO "SUBMIT 'ALLHEAD.JCL(PROCTEST)'" /* This is my jcl */
RETURN 0 


JCL triggers PROC[/b]
//testTEST JOB 1,'PROC CALL  ',MSGCLASS=Y,CLASS=1,REGION=7M,
//         NOTIFY=&SYSUID                                   
//         JCLLIB ORDER=(TESTLIB.test)                       
//PROC     EXEC CATALOG1,FIL1='&TEST'                       



PROC
//CATALOG1     PROC FIL1='&TEST'                           
//SORTSTEP     EXEC PGM=SORT                               
//SYSOUT       DD SYSOUT=*                                 
//SORTIN       DD DSN=test.input.file,DISP=SHR   
//SORTOUT      DD DSN=&FIL1..file1.OUTPUT,DISP=SHR 
//SYSIN        DD DSN=&FIL1..CATTEST.JOBS.OUTPUT.COND,DISP=SHR
zhinghur
 
Posts: 48
Joined: Sun Nov 20, 2011 12:25 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Passing paramter from REXX to JCL

Postby MrSpock » Tue Apr 17, 2012 3:48 pm

1. What does your skeleton TSTSKEL look like?
2. After you process the skeleton, I don't see where you submit it.
User avatar
MrSpock
Global moderator
 
Posts: 809
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

Re: Passing paramter from REXX to JCL

Postby zhinghur » Tue Apr 17, 2012 7:17 pm

I am not sure what you mean by TSTSKEL.

It is working fine, if I removed the parameter thing from JCL. I have no idea about REXX. But above code works fine for me, if I removed the paramter from jcl.
zhinghur
 
Posts: 48
Joined: Sun Nov 20, 2011 12:25 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Passing paramter from REXX to JCL

Postby Akatsukami » Tue Apr 17, 2012 7:34 pm

zhinghur wrote:I am not sure what you mean by TSTSKEL.

And yet, you posted:
/* SUBMITTING JOB THROUGH REXX */
SAY 'ENTER QUALIFIER :'
PULL TEST
ADDRESS ISPEXEC "FTOPEN TEMP"
ADDRESS ISPEXEC "FTINCL TSTSKEL"
ADDRESS ISPEXEC "FTCLOSE"
ADDRESS ISPEXEC "VGET ZTEMPF"
ENTER DATA SET NAME
ADDRESS TSO "SUBMIT 'ALLHEAD.JCL(PROCTEST)'" /* This is my jcl */
RETURN 0

Did you just blindly copy this script from somewhere, having no idea of what it was actually doing?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Passing paramter from REXX to JCL

Postby Pedro » Tue Apr 17, 2012 7:36 pm

What fails?
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: Passing paramter from REXX to JCL

Postby MrSpock » Wed Apr 18, 2012 6:40 am

Well, it would be nice to have more specfic details as to what you want to do and how you want to do it. My thought is:

1. Write the REXX exec to prompt for the two dataset names.
2. Have the exec write the specified dataset names to a dataset.
3. Use that same dataset in the JCL to define the dataset names.
4. Submit the job.
User avatar
MrSpock
Global moderator
 
Posts: 809
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post