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 for external Sub-routine

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
shreejita

New User


Joined: 16 Aug 2009
Posts: 60
Location: chennai

PostPosted: Tue Sep 28, 2010 2:24 pm    Post subject: JCL for external Sub-routine
Reply with quote

Hi All,

I tried executing REXX program using following jcl and it works fine.

Code:
//USERAA JOB (),NOTIFY=&SYSUID
//**********************************************************
//* JCL TO CALL REXX IN BATCH
//**********************************************************
//TSO EXEC PGM=IKJEFT01,PARM='%MAIN'
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
//SYSEXEC DD DSN=USERAA.MYPDS.REXX,DISP=SHR
//

My Question is for EXTERNAL SUBROUTINE concept it does not work.When i run MAIN program it says SOC4 , subpogram not linked .

My MAIN program is

/* REXX MAIN PROGRAM*/

SAY "BEFORE subpgm CALLED "
CALL MYSUB
SAY " I AM IN MAIN AGAIN "
EXIT

/* REXX SUBPROGRAM mysub */

SAY 'SUB PROGRAM'
RETURN

help Me.
Back to top
View user's profile Send private message

kacks7

New User


Joined: 22 Sep 2010
Posts: 33
Location: chennai(india)

PostPosted: Tue Sep 28, 2010 2:47 pm    Post subject:
Reply with quote

hi
its executing fine.

my o/p is

BEFORE SUBPGM CALLED
SUB PROGRAM
I AM IN MAIN AGAIN
READY
END

Quote:
//USERAA JOB (),NOTIFY=&SYSUID
//**********************************************************
//* JCL TO CALL REXX IN BATCH
//**********************************************************
//TSO EXEC PGM=IKJEFT01,PARM='%MAIN'
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
//SYSEXEC DD DSN=USERAA.MYPDS.REXX,DISP=SHR
//


check with this jcl


Code:

//*                                                               
//* ENTER YOUR JOB CARD HERE                                     
//***************************************************************
//* JCL TO CALL REXX IN BATCH                                     
//***************************************************************
//*                                                               
//* CHANGE TO BE MADE :                                           
//* XXXXXX.YYYYYY - THE LIBRARY WHERE YOUR REXX PGM EXISTS       
//* PPPPPP - THE MEMBER NAME OF YOUR REXX PROGRAM                 
//*                                                               
//***************************************************************
//RXNBATCH   EXEC PGM=IKJEFT01                                   
//SYSEXEC    DD  DSN=XXXXXX.YYYYYY,DISP=SHR                       
//SYSTSPRT   DD  SYSOUT=*                                         
//SYSTSIN    DD  *                                               
 %PPPPPPPP                                                       
/*                                                               
//                                                               
Back to top
View user's profile Send private message
shreejita

New User


Joined: 16 Aug 2009
Posts: 60
Location: chennai

PostPosted: Tue Sep 28, 2010 2:54 pm    Post subject: Reply to: JCL for external Sub-routine
Reply with quote

HI,

Yes i tried that too but no changes. Same error with SOC4 error, subprogram is not linked.

Thanks
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Sep 28, 2010 2:57 pm    Post subject: Reply to: JCL for external Sub-routine
Reply with quote

there is nothing wrong with the initial jcl
( apart the odd name MAIN for the rexx )

kacks7 suggestion was lets' say irrelevant

use the trace statement to see what is going on in Your rexx
Back to top
View user's profile Send private message
shreejita

New User


Joined: 16 Aug 2009
Posts: 60
Location: chennai

PostPosted: Tue Sep 28, 2010 3:12 pm    Post subject: Reply to: JCL for external Sub-routine
Reply with quote

HI,

I tried both having in one PDS member , it works correctly , but my question is both MAIN and SUB are in different member of same PDS.

Please reply...
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Sep 28, 2010 3:14 pm    Post subject: Reply to: JCL for external Sub-routine
Reply with quote

I just checked...
it works also if the main and the subroutine are in different members
Back to top
View user's profile Send private message
shreejita

New User


Joined: 16 Aug 2009
Posts: 60
Location: chennai

PostPosted: Tue Sep 28, 2010 3:23 pm    Post subject: Reply to: JCL for external Sub-routine
Reply with quote

Thanks a lot everybody...

It is working.....Great to have this forum ...all credit goes to you for prompt reply.

Thanks
Back to top
View user's profile Send private message
kacks7

New User


Joined: 22 Sep 2010
Posts: 33
Location: chennai(india)

PostPosted: Tue Sep 28, 2010 3:29 pm    Post subject:
Reply with quote

hi,
may i know wat problem causing the SOC4 error???
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 Sep 28, 2010 3:42 pm    Post subject: Reply to: JCL for external Sub-routine
Reply with quote

Hmm, odd, it worked just fine for me, with MAIN and MYSUB being two different members in the same PDS.
Back to top
View user's profile Send private message
kacks7

New User


Joined: 22 Sep 2010
Posts: 33
Location: chennai(india)

PostPosted: Tue Sep 28, 2010 3:52 pm    Post subject: Re: Reply to: JCL for external Sub-routine
Reply with quote

enrico-sorichetti wrote:

kacks7 suggestion was lets' say irrelevant



i just executed by keeping the main and sub program in diff members of a pds and showed my output what i got. is this irrelavent???
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Sep 28, 2010 5:50 pm    Post subject: Reply to: JCL for external Sub-routine
Reply with quote

Looks like You didn' t read my post with the due attention !
and also You posted a suggestion about changing the JCL
the above suggestion was ... useless
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT - E15 and E35 using same user ex... Abhi Nature DFSORT/ICETOOL 12 Mon Oct 03, 2016 4:33 pm
No new posts Compiler option for override the exte... muralikrishnan_new COBOL Programming 9 Fri Jul 08, 2016 12:09 pm
No new posts How to pass a structure to external p... Pedro PL/I & Assembler 8 Tue Jan 19, 2016 7:05 am
No new posts VB File Matching using User Exit rout... syprakash DFSORT/ICETOOL 2 Fri Oct 10, 2014 4:24 pm
No new posts LOAD TIMESTAMP EXTERNAL: CONVERSION E... Auryn DB2 8 Wed Jul 02, 2014 3:36 pm


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