Error in executing SYSDSN in batch mode



IBM's Command List programming language & Restructured Extended Executor

Error in executing SYSDSN in batch mode

Postby swetha489 » Tue Nov 20, 2012 12:34 pm

I have a Rexx which has to check the availability of a dataset (which is as used as input) before proceeding.

Following is the snippet of the code that performs this function:
CHECKAVAIL:                                                       
   'TS'                                                           
   STROBEDS = "'" || USERID() || ".STROBES.INPUT.PHASE2" || "'"   
   SAY SYSDSN(STROBEDS)                                           
   IF SYSDSN(STROBEDS) <> 'OK' THEN DO                           
      SAY "STROBE INPUT NOT FOUND."                               
      EXIT                                                       
   END                                                           
   RETURN                                                         
                                                                 

The dataset AAAA.STROBES.INPUT.PHASE2 is available. And this particular code works perfectly when executed in online mode.
However, when executed in batch, this code fails.

Here is the trace output when executed in Batch:
READY                                                                     
  ISPSTART CMD(EXEC 'AAAA.STROBE.PHASE2.TOOL.BACKUP(PHASE2)')           
    47 *-*   STROBEDS = "'" || USERID() || ".STROBES.INPUT.PHASE2" || "'" 
       >>>     "'AAAA.STROBES.INPUT.PHASE2'"                             
+++ Interactive trace.  TRACE OFF to end debug, ENTER to continue. +++     
    48 *-*   SAY SYSDSN(STROBEDS)                                         
       >>>     "DATASET NOT FOUND"                                         
DATASET NOT FOUND                                                         
    49 *-*   IF SYSDSN(STROBEDS) <> 'OK'                                   
       >>>     "1"                                                         
       *-*    THEN                                                         
       *-*    DO                                                           
    50 *-*     SAY "STROBE INPUT NOT FOUND."                               
       >>>       "STROBE INPUT NOT FOUND."                                 
STROBE INPUT NOT FOUND.                                                   
    51 *-*     EXIT                                                       


The JCL:
//TSOEXEC  JOB (TEST),'TEST2',MSGLEVEL=(1,1),CLASS=A,
//         MSGCLASS=A,NOTIFY=&SYSUID
//STEP0010 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSPROC  DD DSN=AAAA.STROBE.PHASE2.TOOL.BACKUP,DISP=SHR
//ISPPROF  DD DSN=&&ISPPROF,DISP=(,DELETE),
//            UNIT=SYSDA,SPACE=(CYL,(1,1,10),RLSE),
//            RECFM=FB,LRECL=80
//*ISPTLIB  DD DSN=&&ISPPROF,DISP=(,DELETE),
//*            UNIT=SYSDA,SPACE=(CYL,(1,1,10),RLSE),
//*            RECFM=FB,LRECL=80
//*        DD DSN=SYNA2.ISPF.ISPPROF.ST06,DISP=SHR
//ISPTLIB  DD DSN=SYS2.TCS.TABLE,DISP=SHR
//         DD DSN=ISP.SISPTENU,DISP=SHR
//         DD DSN=IMSV10.IMS1010.SDFSTLIB,DISP=SHR
//         DD DSN=ISF.SISFTLIB,DISP=SHR
//         DD DSN=SYS1.SBPXTENU,DISP=SHR
//         DD DSN=EOY.SEOYTENU,DISP=SHR
//         DD DSN=FMN.SFMNTENU,DISP=SHR
//         DD DSN=SYS1.SERBTENU,DISP=SHR
//ISPPLIB  DD DSN=SYS2.TCS.PANEL,DISP=SHR
//         DD DSN=ISF.SISFPLIB,DISP=SHR
//         DD DSN=IMSV10.IMS1010.SDFSPLIB,DISP=SHR
//         DD DSN=ISP.SISPPENU,DISP=SHR
//         DD DSN=SYS1.SBPXPENU,DISP=SHR
//         DD DSN=EOY.SEOYPENU,DISP=SHR
//         DD DSN=FMN.SFMNPENU,DISP=SHR
//         DD DSN=SYS1.SERBPENU,DISP=SHR
//ISPMLIB  DD DSN=SYS2.TCS.MSG,DISP=SHR
//         DD DSN=ISF.SISFMLIB,DISP=SHR
//         DD DSN=IMSV10.IMS1010.SDFSMLIB,DISP=SHR
//         DD DSN=ISP.SISPMENU,DISP=SHR
//         DD DSN=EOY.SEOYMENU,DISP=SHR
//         DD DSN=SYS1.SBPXMENU,DISP=SHR
//         DD DSN=DSN810.SDSNSPFM,DISP=SHR
//         DD DSN=FMN.SFMNMENU,DISP=SHR
//         DD DSN=SYS1.SERBMENU,DISP=SHR
//ISPSLIB  DD DSN=SYS2.TCS.SKEL,DISP=SHR
//         DD DSN=ISP.SISPSENU,DISP=SHR
//         DD DSN=ISP.SISPSLIB,DISP=SHR
//         DD DSN=DSN810.SDSNSPFS,DISP=SHR
//         DD DSN=FMN.SFMNSLIB,DISP=SHR
//ISPLOG   DD SYSOUT=*,DCB=(LRECL=125,RECFM=VBA)
//SYSTSIN  DD *
  ISPSTART CMD(EXEC AAAA.STROBE.PHASE2.TOOL.BACKUP(PHASE2)')



I went through the forum for similar posts, and came across one here: http://ibmmainframes.com/about54723.html
The topic starter mentioned the use of DYNMNBR parameter helped him, so I tried this
//STEP0010 EXEC PGM=IKJEFT01,DYNMNBR=30

But of no use.

Could anyone help me out with this? Please could you tell me where I am wrong.
swetha489
 
Posts: 10
Joined: Wed Mar 14, 2012 4:16 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Error in executing SYSDSN in batch mode

Postby Pandora-Box » Tue Nov 20, 2012 12:55 pm

Please show the trace output when executing in foreground
User avatar
Pandora-Box
 
Posts: 65
Joined: Fri Feb 10, 2012 8:30 pm
Location: Mars
Has thanked: 3 times
Been thanked: 6 times

Re: Error in executing SYSDSN in batch mode

Postby mongan » Tue Nov 20, 2012 1:24 pm

Maybe you are missing the ISPF libraries?
//ISPPLIB DD DSN=ISP.SISPPENU,DISP=SHR
//ISPTLIB DD DSN=ISP.SISPTENU,DISP=SHR
//ISPMLIB DD DSN=ISP.SISPMENU,DISP=SHR
//ISPSLIB DD DSN=ISP.SISPSLIB,DISP=SHR
User avatar
mongan
 
Posts: 211
Joined: Tue Jan 11, 2011 8:32 pm
Has thanked: 1 time
Been thanked: 5 times

Re: Error in executing SYSDSN in batch mode

Postby swetha489 » Tue Nov 20, 2012 1:50 pm

Pandora-Box and Mongan, thanks a lot for taking some time to reply.

This might seem absolutely silly. I ran the job again, and it executed perfectly. I didn't make a single change to the JCL or the Rexxes or the input file. Sorry for wasting your time.
swetha489
 
Posts: 10
Joined: Wed Mar 14, 2012 4:16 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Error in executing SYSDSN in batch mode

Postby enrico-sorichetti » Tue Nov 20, 2012 2:33 pm

the REXX script should check the existance of a dataset and proceed acordingly

You complained about a <normal> event :mrgreen:
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: 3002
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post