CallinG REXX thru JCL



IBM's Command List programming language & Restructured Extended Executor

CallinG REXX thru JCL

Postby arya_starc » Thu Feb 09, 2017 4:18 pm

I written a simple rexx for listds.
I am pass the dataset thru JCL, but on execution jcl will give the return code of 12.

Below is the rexx code

000100 /*REXX*/                                                                

000200 ADDRESS TSO                                                            

000700     "LISTDS" FILEI "MEMBERS"                                            

002900 SAY "MEMBERS SUCCESSFULLY DISPLAY"                                        

003000 EXIT  
 


Below is the JCL ERROR message

******************************** Top of Data ***********************************

IKJ56701I MISSING DATA SET NAME                                                

READY                                                                          

END                                                                            

 ******************************* Bottom of Data ********************************
 


Please help me so that I will pass the datset thru the JCL
arya_starc
 
Posts: 136
Joined: Mon Sep 21, 2015 1:39 pm
Has thanked: 5 times
Been thanked: 0 time

Re: CallinG REXX thru JCL

Postby Akatsukami » Thu Feb 09, 2017 7:31 pm

And where is the value of filei supposed to be coming from?
"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: CallinG REXX thru JCL

Postby NicC » Thu Feb 09, 2017 8:50 pm

Search the forum for running Rexx programs in batch.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: CallinG REXX thru JCL

Postby Pedro » Thu Feb 09, 2017 10:30 pm

Show us your JCL.
Pedro Vera
User avatar
Pedro
 
Posts: 684
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: CallinG REXX thru JCL

Postby arya_starc » Fri Feb 10, 2017 3:41 pm

below is the jcl


//PAFKREX2 JOB (0000,REXX),'DEV11',CLASS=Y,MSGCLASS=A            
//STEP30 EXEC PGM=IKJEFT01,PARM='LISTDS'                        
//SYSEXEC DD DSN=TS.PAFK.SUSHIL.PDS,DISP=SHR                    
//*OU1    DD DSN=VM.PAC9.OUT.SE1,DISP=SHR                        
//FILEI   DD DSN=VM.LAT.D10A010.PF.JCLLIB.SASH,DISP=SHR          
//SYSPRINT DD SYSOUT=*                                          
//SYSTSPRT DD SYSOUT=*                                          
//SYSTSIN  DD DUMMY                                              
 


edited to remove blank lines and sequence numbers
arya_starc
 
Posts: 136
Joined: Mon Sep 21, 2015 1:39 pm
Has thanked: 5 times
Been thanked: 0 time

Re: CallinG REXX thru JCL

Postby NicC » Fri Feb 10, 2017 3:53 pm

So have you looked in the manual to see how you get your parm (clue: argument) into your program?

And, have you looked through the forum to find the examples that are in here?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: CallinG REXX thru JCL

Postby willy jensen » Fri Feb 10, 2017 10:14 pm

Ok, to get you started.
The JCL parm should have the datasetname i.e. PARM='%LISTDS SYS1.HELP'
In your program after the first line you should have FILEI="'"translate(arg(1))"'"
The assignment of 'filei' from the parm field can be done in many ways, the above is just one. Note that it put quotes around the argument, those are required for the LISTDS command. Also note the percentage sign in the parm field. In my opinion it is bad practice to have a REXX (or CLIST for that matter) with the same name as a program, but the percentage sign tells the interpreter that the name in the parm field is a REXX or CLIST.
willy jensen
 
Posts: 455
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 69 times

Re: CallinG REXX thru JCL

Postby arya_starc » Mon Feb 13, 2017 12:20 pm

Akatsukami wrote:And where is the value of filei supposed to be coming from?


I am passing thru the jcl in the dd name
arya_starc
 
Posts: 136
Joined: Mon Sep 21, 2015 1:39 pm
Has thanked: 5 times
Been thanked: 0 time

Re: CallinG REXX thru JCL

Postby willy jensen » Mon Feb 13, 2017 2:12 pm

in that case you can use the LISTDSI function to get the dsname, i.e.:
cc=ListDsi('filei file')
filei="'"sysdsname"'"

refer to the REXX manual for details.
willy jensen
 
Posts: 455
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 69 times

Re: CallinG REXX thru JCL

Postby arya_starc » Tue Feb 14, 2017 6:39 pm

Hi Willy,

I changed the previously coded rexx to below rexx, but still I am getting the same error by submitting the same JCL


****** ***************************** Top of Data ******************************
 000100 /*REXX*/                                                                
 000200 ADDRESS TSO                                                            
 000300  CC=LISTDSI('FILEI FILE')                                              
 000400  FILEI="'"SYSDSNAME"'"                                                  
 000700     "LISTDS" FILEI "MEMBERS"                                            
 002900 SAY "MEMBERS SUCCESSFULLY WRITE"                                        
 003000 EXIT                                                                    
 ****** **************************** Bottom of Data ****************************
 


JCL is same

//PAFKREX2 JOB (0000,REXX),'DEV11',CLASS=Y,MSGCLASS=A            
//STEP30 EXEC PGM=IKJEFT01,PARM='LISTDS'                        
//SYSEXEC DD DSN=TS.PAFK.SUSHIL.PDS,DISP=SHR                    
//FILEI   DD DSN=VM.LAT.D10A010.PF.JCLLIB.SASH,DISP=SHR          
//SYSPRINT DD SYSOUT=*                                          
//SYSTSPRT DD SYSOUT=*                                          
//SYSTSIN  DD DUMMY                                              
 
arya_starc
 
Posts: 136
Joined: Mon Sep 21, 2015 1:39 pm
Has thanked: 5 times
Been thanked: 0 time

Next

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post