How to execute & pass a PDS from JCl to Rexx pgm



IBM's Command List programming language & Restructured Extended Executor

How to execute & pass a PDS from JCl to Rexx pgm

Postby prasanthgp » Tue May 17, 2016 11:55 am

Hi ,
I am a Beginner to Rexx program. I want to execute a file called "main.rexx"(rexx pgm module) through JCl.
and also I want to pass a PDS called (REXX.OUTPUT.REPORT) from JCl to this "main.rexx".
please can anyone help me out with this JCl code
prasanthgp
 
Posts: 4
Joined: Tue May 17, 2016 11:34 am
Has thanked: 1 time
Been thanked: 0 time

Re: How to execute & pass a PDS from JCl to Rexx pgm

 

Re: How to execute & pass a PDS from JCl to Rexx pgm

Postby prasanthgp » Tue May 17, 2016 2:35 pm

guys....."main.rexx" is a PDS name which as mainframe REXX code..,
prasanthgp
 
Posts: 4
Joined: Tue May 17, 2016 11:34 am
Has thanked: 1 time
Been thanked: 0 time

Re: How to execute & pass a PDS from JCl to Rexx pgm

Postby willy jensen » Tue May 17, 2016 4:05 pm

well, the standard JCL to execute a REXX program is something like this:
//GO      EXEC PGM=IKJEFT01                
//SYSTSPRT DD SYSOUT=*                      
//SYSEXEC  DD DISP=SHR,DSN=WJENSEN.LIB.EXEC
//SYSTSIN  DD *                            
 Hello                                      
 

where your program is stored as a member in the PDS referenced by the SYSEXEC JCL statement.
The program is normally named in the SYSTSIN JCL statement, though is can also be named by the JCL PARM statement. In this case the program is the member HELLO of the WJENSEN.LIB.EXEC PDS.
You say that you want to pass a PDS to the REXX, but not how you intend to use it. A PDS normally cannot be read by a REXX program, but a member of a PDS can. The JCL statement for allocating your PDS would most likely be
//PDS1 DD DISP=SHR,DSN=REXX.OUTPUT.REPORT

but it depends on the type of usage that you intend.

These users thanked the author willy jensen for the post:
prasanthgp (Tue May 17, 2016 6:16 pm)
willy jensen
 
Posts: 69
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 14 times

Re: How to execute & pass a PDS from JCl to Rexx pgm

Postby willy jensen » Tue May 17, 2016 4:07 pm

And by the way, MAIN.REXX is not a valid member name. If it is a dataset then you need to copy it to a PDS member in order to execute it.
willy jensen
 
Posts: 69
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 14 times

Re: How to execute & pass a PDS from JCl to Rexx pgm

Postby prasanthgp » Tue May 17, 2016 4:31 pm

thanks for the reply jensen...,

I used this jcl to execute rexx
//* INVOKE REXX IN BATCH...
//JS10 EXEC PGM=IRXJCL,REGION=0K,PARM='MAIN'
//SYSEXEC DD DSN=IDF.REXX.COCOV.DAUG15,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY,BLKSIZE=80
//


In this "MAIN" is member (which is rexx pgm) this only i want to execute through JCl and also this "main" will call many sub module programs
this sub modules uses EXECIO based Read and Write concepts....,
when i run this JCl i got the following error in spool

"the input or output file OUTDD is not allocated. It cannot be opened for I/O
EXECIO error while trying to GET or PUT a record "

please can u help out
prasanthgp
 
Posts: 4
Joined: Tue May 17, 2016 11:34 am
Has thanked: 1 time
Been thanked: 0 time

Re: How to execute & pass a PDS from JCl to Rexx pgm

Postby enrico-sorichetti » Tue May 17, 2016 6:02 pm

EXECIO is supported only in a FULL TSO environment

search the forum for examples on how to run in batch IKJEFT01
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: 2535
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 120 times

Re: How to execute & pass a PDS from JCl to Rexx pgm

Postby willy jensen » Tue May 17, 2016 7:37 pm

Actually my sample above is TSO batch using IKJEFT01.
But ant files that you want to access must have been allocated somehow. In batch the easiest method is a JCL statement like the PDS1in my first post. See the JCL Reference manual for details. And without knowing your program, I cannot advise further - I might give you some advise which would destroy your dataset.
willy jensen
 
Posts: 69
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 14 times

Re: How to execute & pass a PDS from JCl to Rexx pgm

Postby prino » Tue May 17, 2016 8:28 pm

willy jensen wrote:I might give you some advise which would destroy your dataset.

And the TS might loose his job. Now that would be really sad. :mrgreen:
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 484
Joined: Wed Mar 11, 2009 12:22 am
Location: Oostende, Belgium
Has thanked: 3 times
Been thanked: 19 times

Re: How to execute & pass a PDS from JCl to Rexx pgm

Postby prasanthgp » Wed May 18, 2016 11:10 am

ya k fine i understood....jensen...,
prasanthgp
 
Posts: 4
Joined: Tue May 17, 2016 11:34 am
Has thanked: 1 time
Been thanked: 0 time

Re: How to execute & pass a PDS from JCl to Rexx pgm

Postby NicC » Wed May 18, 2016 9:11 pm

ya k fine

Please write English - this is gobbledy-gook!
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2565
Joined: Sun Jul 04, 2010 12:13 am
Location: Down on the pig farm
Has thanked: 4 times
Been thanked: 90 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post