Forcing a job - which uses ISPF - to error



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

Forcing a job - which uses ISPF - to error

Postby dohara » Tue Sep 22, 2009 2:45 am

Hello

I run a rexx pgm - which uses ISPF - from batch and however in the rexx code there is error handling, no matter if CC12 is produced, my job still completes with CC0
I guess it might be because i call ISPF and it takes over the error handling process.. (?)
Is there a way to force my job to error if the rexx code generates CC12 ? instead of having CC0?

Thanks,
David
dohara
 
Posts: 42
Joined: Thu Apr 09, 2009 3:15 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Forcing a job - which uses ISPF - to error

Postby expat » Tue Sep 22, 2009 11:46 am

Where does the error occur and what are you trying to do at that point ?
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: Forcing a job - which uses ISPF - to error

Postby dohara » Tue Sep 22, 2009 2:37 pm

Hi Expat

No matter where the error occurs i get CC0. For a test i run an EXIT 8 only.. with the same CC0 result.

Job that calls the rexx code:

//S002 EXEC PGM=IKJEFT01,DYNAMNBR=50
//SYSEXEC DD DSN=USERID.PROD.REXX,DISP=SHR
//ISPPLIB DD DSN=SYS1.SISPPENU,DISP=SHR
//ISPSLIB DD DSN=SYS1.SISPSENU,DISP=SHR
//ISPMLIB DD DSN=SYS1.SISPMENU,DISP=SHR
//ISPTLIB DD DSN=SYS1.SISPTENU,DISP=SHR
//ISPPROF DD DSN=&ISPPROF,
// DISP=(NEW,PASS),
// UNIT=VIO,
// SPACE=(TRK,(1,1,1)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=6160)
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTERM DD SYSOUT=*
//ISPCTL1 DD DUMMY
//ISPCTL2 DD DUMMY
//SYSIN DD DUMMY
//ISPLOG DD SYSOUT=*,DCB=(RECFM=VA,LRECL=125,BLKSIZE=129)
//SYSTSIN DD *
ISPSTART CMD(%REXTEST)
/*


REXTEST code:

/* REXX */
EXIT 8



It is only exiting with CC8 so i would expect my job to reflect to that but it does not.
In the output the following can be seen:

READY
ISPSTART CMD(%REXTEST)
ISPD117
The initially invoked CLIST ended with a return code = 8
READY

However, the job finishes with CC0

GSDMV20I JOBNAME- --STEP-- -PSTEP-- CCODE
GSDMV21I ISPFTEST S002 0



David
dohara
 
Posts: 42
Joined: Thu Apr 09, 2009 3:15 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Forcing a job - which uses ISPF - to error

Postby enrico-sorichetti » Tue Sep 22, 2009 2:53 pm

If   <your_error_condition_is_true> Then ,
   ZISPFRC = <Your_error_return_code>
Else ,
   ZISPFRC = 0
Address ISPEXEC "VPUT (ZISPFRC) SHARED "
Return 0
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

Re: Forcing a job - which uses ISPF - to error

Postby expat » Tue Sep 22, 2009 4:25 pm

For your test, try EXIT (8)
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: Forcing a job - which uses ISPF - to error

Postby dohara » Sat Sep 26, 2009 1:12 am

Hello all

(8) did not work for me but what Enrico suggested is fine, eventually i found it in the ISPF guide
Thanks for your help.

David
dohara
 
Posts: 42
Joined: Thu Apr 09, 2009 3:15 pm
Has thanked: 0 time
Been thanked: 1 time


Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post