Getting issue for ZTEMPF



IBM's Command List programming language & Restructured Extended Executor

Getting issue for ZTEMPF

Postby nikesh_rai » Mon Jun 25, 2018 7:55 pm

Hi Friends,

I am trying to submit a JCL via REXX using file tailoring service. I have allocated personal ISPFILE to use.

TMPFIL = HLQ || '.' || UID || '.' || 'ISPFILE'

STATUS = SYSDSN("'"TMPFIL"'")

IF STATUS = 'OK' THEN
DO
  "DELETE '"TMPFIL"' "
END

"ALLOC FI(ISPFILE) DA('"TMPFIL"') NEW TRACKS SPACE(5,5) " ,
"RECFM(F,B) LRECL(80) BLKSIZE(3120)"


and then using below code snippet

ADDRESS
"ISPEXEC FTOPEN "
"ISPEXEC FTINCL MASED1SK"
"ISPEXEC FTINCL MASED3SK"
"ISPEXEC FTCLOSE"
"ISPEXEC VGET (ZTEMPF) SHARED"

X = OUTTRAP('VAR.')
ADDRESS TSO "SUBMIT" "'"ZTEMPF"'"
DO Z = 1 TO VAR.0
   JOBDET = WORD(VAR.Z,2)
END                        



This is the error I am getting

   97 *-*  "ISPEXEC FTCLOSE"                                          
       >L>    "ISPEXEC FTCLOSE"                                        
    98 *-*  "ISPEXEC VGET (ZTEMPF) SHARED"                            
       >L>    "ISPEXEC VGET (ZTEMPF) SHARED"                          
ISPF system data set allocation error - press Enter to continue.      
Temporary control card data set cannot be allocated.                  
Data set 'Txx.Txxxxx.SPFTEMP1.CNTL' in use by another user, try later.
   100 *-*  /* "ISPEXEC VIEW DATASET ('"ZTEMPF"')"  */                
   102 *-*  X = OUTTRAP('VAR.')                                        
       >L>    "VAR."                                                  
       >F>    "VAR."                                                  
   103 *-*  ADDRESS TSO "SUBMIT" "'"ZTEMPF"'"                          
       >L>    "SUBMIT"                                                
       >L>    "'"                                                      
       >O>    "SUBMIT '"                                              
       >V>    ""                                                      
       >O>    "SUBMIT '"                                              
       >L>    "'"                                                      
       >O>    "SUBMIT ''"                                              
      +++ RC(12) +++                                    
  104 *-*  DO Z = 1 TO VAR.0                            
      >L>    "1"                                        
      >V>    "1"                                        
  105 *-*   JOBDET = WORD(VAR.Z,2)                      
      >C>     "VAR.1"                                    
      >V>     "IKJ56709I INVALID DATA SET NAME, ''"      
      >L>     "2"                                        
      >F>     "INVALID"                                  
  106 *-*  END                                          
  104 *-*  DO Z = 1 TO VAR.0                            
  108 *-*  SAY "JOBDET:" JOBDET                          
      >L>    "JOBDET:"                                  
      >V>    "INVALID"                                  
      >O>    "JOBDET: INVALID"                          


I am not getting why temp dataset ''Txx.Txxxxx.SPFTEMP1.CNTL' is being used even I have allocated my own.

Please note the above REXX is being submitted via a JCL

the JCL looks like this

PS040    EXEC PGM=IKJEFT01,PARM='ISPSTART CMD(%MASCMPRX'    
SYSEXEC  DD DSN=Dxxx.Nxxxxx.Txxx.B1,DISP=SHR                
SYSTSPRT DD SYSOUT=A                                        
SYSTSIN  DD DUMMY                                            
MASCMPIN DD DISP=SHR,DSN=&HLQ..&LOGID..PARM.MASCMP          
SRCHLIST DD DISP=SHR,DSN=&HLQ..&LOGID..ENDV.SRCH.LIST        
ISPPROF  DD DSN=&&TEMP01,DISP=(,DELETE),SPACE=(TRK,(5,5,10)),
            DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=3120)    
ISPLOG   DD DSN=&&TEMP02,DISP=(,DELETE),SPACE=(TRK,(5,5,10)),
            DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=3120)    
ISPLLIB  DD DISP=SHR,DSN=LMQS.SYSB.MQSERIES.SCSQLOAD.FIR    
ISPPLIB  DD DISP=SHR,DSN=SYS2.SB01.DMSLIB
ISPPLIB  DD DISP=SHR,DSN=SYS2.SB01.DMSLIB
ISPSLIB  DD DISP=SHR,DSN=SYS1.SISPSLIB  
ISPTLIB  DD DISP=SHR,DSN=SYS1.SISPTENU  
ISPTABL  DD DISP=SHR,DSN=TIB.A.DMSTAB                      



Could you please help me to get what is wrong with this code.
Thanks
Nikesh Rai
nikesh_rai
 
Posts: 201
Joined: Tue Oct 18, 2011 1:27 am
Has thanked: 17 times
Been thanked: 0 time

Re: Getting issue for ZTEMPF

 

Re: Getting issue for ZTEMPF

Postby Pedro » Mon Jun 25, 2018 9:48 pm

Your tempfile ends with 'ISPFILE', while the error is with SPFTEMP1.CNTL. It is clearly not the same data set.

You showed us your JCL, but probably ISPF allocates some other DD names if it needs to, using a naming convention. In your batch job, you need to explicitly allocate ISPCTL1 with a different data set name so there is not a collision with your logged on self and your batch self.
Pedro Vera
User avatar
Pedro
 
Posts: 580
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 41 times

Re: Getting issue for ZTEMPF

Postby willy jensen » Mon Jun 25, 2018 10:28 pm

Your program is missing a 'X = OUTTRAP('OFF') after the SUBMIT command. Then perhaps you will get a usefull message in the VAR. stem. I suggest that you test the 'RC' variable after SUBMIT and if not 0 then SAY the VAR. stem.
willy jensen
 
Posts: 162
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 23 times

Re: Getting issue for ZTEMPF

Postby expat » Tue Jun 26, 2018 11:33 am

If you want to use ISPFILE why are you getting and submitting the SPFTEMP1.CNTL ?
What is in ISPFILE and what is in the SPFTEMP1.CNTL datasets

Usually when I have allocated an ISPFILE that is all that I use

Maybe issue an EDIT command to check out what is in each file
expat
 
Posts: 407
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 4 times

Re: Getting issue for ZTEMPF

Postby nikesh_rai » Tue Jun 26, 2018 12:46 pm

Thanks Pedro, Willy and Expat for your responses,

I tried to allocate temp files in my JCL via ISPCTL1 DD and worked fine for me.

//PS040    EXEC PGM=IKJEFT01,PARM='ISPSTART CMD(%MASCMPRX'      
//SYSEXEC  DD DSN=Dxxx.Nxxxxx.Txxxx.B1,DISP=SHR                  
//SYSTSPRT DD SYSOUT=A                                          
//SYSTSIN  DD DUMMY                                              
//MASCMPIN DD DISP=SHR,DSN=&HLQ..&LOGID..PARM.MASCMP            
//SRCHLIST DD DISP=SHR,DSN=&HLQ..&LOGID..ENDV.SRCH.LIST          
//ISPCTL0  DD DISP=NEW,SPACE=(TRK,(1,1)),                        
//            DCB=(LRECL=80,BLKSIZE=800,RECFM=FB)                
//ISPCTL1  DD DISP=NEW,SPACE=(TRK,(1,1)),                        
//            DCB=(LRECL=80,BLKSIZE=800,RECFM=FB)                
//ISPCTLW  DD DISP=NEW,SPACE=(TRK,(1,1)),                        
//            DCB=(LRECL=80,BLKSIZE=800,RECFM=FB)                
//ISPPROF  DD DSN=&&TEMP01,DISP=(,DELETE),SPACE=(TRK,(5,5,10)),  
//            DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=3120)      
//ISPLOG   DD DSN=&&TEMP02,DISP=(,DELETE),SPACE=(TRK,(5,5,10)),  
//            DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=3120)      
//ISPLLIB  DD DISP=SHR,DSN=LMQS.SYSB.MQSERIES.SCSQLOAD.FIR      
//ISPMLIB  DD DISP=SHR,DSN=SYS1.SISPMENU                        
//         DD DISP=SHR,DSN=SYS1.SBPXMENU                        


But I am still unable to get why it didn't worked when I have allocated ISPFILE. My JCL was being stored in ISPFILE but I wasn't able to submit the JCL with ZTEMPF.
I was getting Invalid length error while submitting JCL from ISPFILE with ADDRESS TSO SUBMIT option.

After allocating temp file via JCL with ISPCTL1 DD, it's working fine but I still can give a try with ISPFILE. :)


Thanks
Nikesh
Thanks
Nikesh Rai
nikesh_rai
 
Posts: 201
Joined: Tue Oct 18, 2011 1:27 am
Has thanked: 17 times
Been thanked: 0 time

Re: Getting issue for ZTEMPF

Postby expat » Tue Jun 26, 2018 1:27 pm

The reason is that the two files and associated datasets are completely different

I use "ISPEXEC EDIT DATASET('"SYSUID".ISPFILE"')" so that I can check the JCL before submission,
or for a bypass of eyeball checks, or in batch, to submit it anyway I use "SUBMIT '"SYSUID".ISPFILE'"
expat
 
Posts: 407
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 4 times

Re: Getting issue for ZTEMPF

Postby willy jensen » Tue Jun 26, 2018 1:48 pm

As expat indicates, you must do "SUBMIT '"TMPFIL"'", not "SUBMIT '"ZTEMPF"'" when you write the skeleton to ISPFILE.
willy jensen
 
Posts: 162
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 23 times

Re: Getting issue for ZTEMPF

Postby nikesh_rai » Wed Jul 04, 2018 5:29 pm

Sorry for the delayed response.

Thanks Expat and Willy,

I updated the code as you suggested and it's working fine for me. :)

ADDRESS
"ISPEXEC FTOPEN "
"ISPEXEC FTINCL MASED1SK"
"ISPEXEC FTINCL MASED3SK"
"ISPEXEC FTCLOSE"

/* "ISPEXEC VIEW DATASET ('"TMPFIL"')"  */    

X = OUTTRAP('VAR.')
ADDRESS TSO "SUBMIT" "'"TMPFIL"'"
DO Z = 1 TO VAR.0
   JOBDET = WORD(VAR.Z,2)
END                        


Thanks
Nikesh
Thanks
Nikesh Rai
nikesh_rai
 
Posts: 201
Joined: Tue Oct 18, 2011 1:27 am
Has thanked: 17 times
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post