Error Resubmitting JOB without exiting screen



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

Error Resubmitting JOB without exiting screen

Postby somonline » Thu Nov 19, 2009 6:23 pm

I'm generating and submitting JCL through an ISPF panel. The job has 3 steps.

1st step executes the SUPERC utility
2nd step invokes a REXX module named process
3rd step deletes the file generated by SUPERC

Through a driver module the tool is executed. The jobcard is accepted from the panel and appended to the JOB.

The problem is that Its working fine submitting 1st time through the panel. But if I submit it again without exiting and opening the panel it's showing

IKJ56265I INPUT DATA SET xxxxxxx.SPFTEMP1.CNTL NOT USABLE+
IKJ56265I THE DATA SET IS EMPTY

But if I exit the panel and again execute the driver its working fine.
somonline
 
Posts: 3
Joined: Thu Nov 19, 2009 5:59 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Error Resubmitting JOB without exiting screen

Postby expat » Thu Nov 19, 2009 8:42 pm

somonline wrote:I'm generating and submitting JCL through an ISPF panel.

I somehow doubt that. I would guess that there is an uderlying REXX / CLIST / Utility driving the process.

I think that the error is in line 62 of your uderlying code.

But, unless you bother to post the code, how on earth do you expect us to know anything about what is going on.
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: Error Resubmitting JOB without exiting screen

Postby somonline » Mon Nov 23, 2009 1:08 pm

Very sorry about that...you are right I used an underlying REXX driver module. Below is the module(GENJ) which generates the JCL >

/* REXX */
ADDRESS ISPEXEC
  'VGET (JCL1 JCL2 JCL3 JCL4 JCL5) PROFILE'
  'VGET (ODSN NDSN OP1 MYLIB) PROFILE'
  'VGET (REPDSN) PROFILE'
  JC1 = JCL1
  JC2 = JCL2
  JC3 = JCL3
  JC4 = JCL4
  JC5 = JCL5
  ID=USERID()
   I = 0
 /* OPEN A TEMPORARY FILE TO STORE JCL */
 "FTOPEN TEMP"
 IF RC /= 0 THEN DO
    "FTCLOSE"
    "FTOPEN TEMP"
 END
 "FTINCL" JCARD
    CALL GenerateJcl
"VGET ZTEMPF"
 "FTCLOSE"
ADDRESS TSO "SUBMIT" "'"ZTEMPF"'"
IF RC = 0 THEN DO
   JCLSTAT = 'COMPLETED'
   'VPUT (JCLSTAT) PROFILE'
END
 "LIBDEF ISPSLIB"
RETURN 0
GenerateJcl:
  REXLIB = MYLIB
  SELECT
  WHEN OP1 = 2 THEN MYJCL = JOB1
  END
 "FTINCL" MYJCL
RETURN


The JCL is in the member JOB1. Here is the code >

//SUPERC  EXEC PGM=ISRSUPC,
//            PARM=(DELTAL,LINECMP,
//            ' COBOL',
//NEWDD  DD DSN=&NDSN,
//          DISP=SHR
//OLDDD  DD DSN=&ODSN,
//          DISP=SHR
//OUTDD  DD DSN=&ID..COMPARE.SUPERC,
//          DISP=(MOD,CATLG),UNIT=SYSDA,
//          SPACE=(0,(50,100),RLSE),
//          DCB=(BLKSIZE=0)
//SYSIN  DD DUMMY
//ISPF     EXEC PGM=IKJEFT01,DYNAMNBR=25
//SYSEXEC  DD   DSN=&REXLIB,DISP=SHR
//SYSPRINT DD   SYSOUT=*
//SYSTSPRT DD   SYSOUT=*
//SYSTSIN  DD   *
%PROCESS &ODSN &NDSN &REPDSN
//DEL      EXEC PGM=IDCAMS
//SYSIN DD *
   DELETE (&ID..COMPARE.SUPERC)
   SET MAXCC=0
//SYSPRINT DD   SYSOUT=*


Its giving error in GENJ....1st time working fine...without exiting screen running 2nd time giving RC4 in lines
"FTINCL" JCARD
and
ADDRESS TSO "SUBMIT" "'"ZTEMPF"'"
in GENJ
somonline
 
Posts: 3
Joined: Thu Nov 19, 2009 5:59 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Error Resubmitting JOB without exiting screen

Postby expat » Mon Nov 23, 2009 5:22 pm

Why are you doing a null LIBDEF for ISPSLIB in the "called code".

It is advisable to have your LIBDEFS / ALTLIBS in the start of controlling REXX or whatever, and then null LIBDEFS within the controlling REXX just before exit.

Where are the original LIBDEFs performed to allocate for ISPSLIB, are these reinvoked everytime that the subroutine is reinvoked.
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: Error Resubmitting JOB without exiting screen

Postby somonline » Tue Nov 24, 2009 11:22 am

Its resolved...thanks to expat....

The problem was in the driver module. I moved the libdef/altlibs and its working correctly now.
Thanks for your support.
somonline
 
Posts: 3
Joined: Thu Nov 19, 2009 5:59 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Error Resubmitting JOB without exiting screen

Postby dick scherrer » Wed Nov 25, 2009 12:29 am

Thank you for posting the resolution :)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post