REXX with JCL doesn't work correctly

Ask/Clarify the questions on TSO, CLIST & REXX

Moderators: Veera, Moderator Group

Post Reply
simo78
Member
Posts: 35
Joined: Tue Aug 11, 2009 12:20 am
Location: Munich

REXX with JCL doesn't work correctly

Post by simo78 » Tue Aug 11, 2009 12:30 am

Hello together,

I've a problem when I try to start my rexx script from a job.


When I start my rexx with TSO %myrexx

Code: Select all

/*REXX*/                           
TRACE ?R                           
PDSNAME = 'mypds'       
IF SYSDSN(PDSNAME) = "OK" THEN DO 
SAY "PDS:" PDSNAME IS THERE       
EXIT 12                           
END                               
I get this result:
3 *-* PDSNAME = 'JVW.APRE.IST.DA'
>>> "mypds"
IRX0100I +++ Interactive trace. TRACE OFF to end debug, ENTER to continue. +++


4 *-* IF SYSDSN(PDSNAME) = "OK"
>>> "1"

*-* THEN
*-* DO

5 *-* SAY "PDS:" PDSNAME IS THERE
>>> "PDS: mypds IS THERE"
PDS: mypds IS THERE

6 *-* EXIT 12
>>> "12"
***


when I do that with JCL:

Code: Select all

//*                                                                   
//REXX     EXEC PGM=IKJEFT1B,PARM='%myrexx'                             
//SYSEXEC  DD DSN=mylibrary,DISP=SHR                             
//SYSTSPRT DD SYSOUT=*                                               
//SYSTSIN  DD DUMMY                                                   
I get another result:

*********** TOP OF DATA **************
3 *-* PDSNAME = 'mypds'
>>> "mypds"
IRX0100I +++ Interactive trace. TRACE OFF to end debug, ENTER to continue. +++
4 *-* IF SYSDSN(PDSNAME) = "OK"
>>> "0"
READY
END
********BOTTOM OF DATA ***********
**



Can someone help me,please?

Thanks in advance

MrSpock
Active Member
Posts: 273
Joined: Wed Jun 27, 2007 5:37 pm

Post by MrSpock » Tue Aug 11, 2009 1:23 am

Normally you'd fully qualify the dataset name, i.e.:

Code: Select all

PDSNAME = "'"mypds"'"
just to be safe under any condition.

Is there a difference in the PROFILE PREFIX settings between your foreground TSO session and your background batch TSO session?

simo78
Member
Posts: 35
Joined: Tue Aug 11, 2009 12:20 am
Location: Munich

Post by simo78 » Tue Aug 11, 2009 1:54 pm

Hello MrSpock,

the problem was really that I didn't fully qualify the dataset name.

Thanks a lot. :D

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others