IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Submit a job by rexx program which is runing in batch


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
thesumitk

Active User


Joined: 24 May 2013
Posts: 156
Location: INDIA

PostPosted: Wed Aug 07, 2013 1:30 am
Reply with quote

My Requirement is like below

I am running a online rexx with panels and then submitting a job which will extract data from sar, now again I need a rexx program and sar job .. so I have to submit it in batch can I do it thru the rexx which I am runing in batch ?

thanks
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Aug 07, 2013 2:37 am
Reply with quote

Of course. If the script is running under the interpreter (PGM=IRXJCL), write the JCL to a file allocated to SYSOUT=(x,INTRDR) (x being the appropriate output class). If it is running under background TSO or ISPF (PGM=IKJEFTxx), use the SUBMIT command as you would on-line.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 07, 2013 11:37 am
Reply with quote

Of course you could also invoke ISPF file tailoring in batch mode too
Back to top
View user's profile Send private message
thesumitk

Active User


Joined: 24 May 2013
Posts: 156
Location: INDIA

PostPosted: Wed Aug 07, 2013 7:52 pm
Reply with quote

Thanks Akatsukami and Expat !!

I tried this as you suggested but i got below

Code:
71 *-*  Address ISPEXEC                                         
72 *-*  "LIBDEF ISPSLIB DATASET ID('ABCD.EFGH.ZZZZ')"     
   >>>    "LIBDEF ISPSLIB DATASET ID('ABCD.EFGH.ZZZZ')"   
   +++ RC(-3) +++                                               
73 *-*  "FTOPEN TEMP"                                           
   >>>    "FTOPEN TEMP"                                         
   +++ RC(-3) +++                                               
74 *-*  "FTINCL AGDEL1"                                         
   >>>    "FTINCL AGDEL1"                                       
   +++ RC(-3) +++                                               
75 *-*  "FTCLOSE"                                               
   >>>    "FTCLOSE"                                             
   +++ RC(-3) +++                                               
76 *-*  "VGET ZTEMPF"                                           
   >>>    "VGET ZTEMPF"                                         
    >>>    "VGET ZTEMPF"           
    +++ RC(-3) +++                 
 77 *-*  Address TSO               
 78 *-*  "SUBMIT" "'"ZTEMPF"'"     
    >>>    "SUBMIT 'ZTEMPF'
"
+++ RC(-3) +++
79 *-* /* X = outtrap('OFF') */
80 *-* end

The job was not submitted however my above rexx ranwith RC= 0 in batch but after that no activities
Back to top
View user's profile Send private message
thesumitk

Active User


Joined: 24 May 2013
Posts: 156
Location: INDIA

PostPosted: Wed Aug 07, 2013 8:05 pm
Reply with quote

I mistaken that I submit it theru SUBMIT command while I was runing with IRXJCL

but below is the output which I got when I used IKJEFT01

Code:
//JS001   EXEC PGM=IKJEFT01,REGION=0K,PARM='TEMP1'

Code:
  78 *-*  "SUBMIT" "'"ZTEMPF"'"                             
       >>>    "SUBMIT 'ZTEMPF'"                               
DATA SET ZTEMPF NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED
       +++ RC(12) +++                                         
    79 *-*  /* X = outtrap('OFF') */                         
    80 *-* end
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Aug 07, 2013 8:14 pm
Reply with quote

Remember that the file-tailoring (FT*) services and VGET are ISPF services; you must run your script in background ISPF, else you will get RC = -3 (environment not found) as in your previous post. In such a case, ZTEMPF will of course have no value set (and the value of an unused or dropped variable is the variable name).
Back to top
View user's profile Send private message
thesumitk

Active User


Joined: 24 May 2013
Posts: 156
Location: INDIA

PostPosted: Wed Aug 07, 2013 8:17 pm
Reply with quote

Ok..But what about whaen I ran it in correct env like my last post
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Aug 07, 2013 8:18 pm
Reply with quote

Well, you do not give much in the way of clues! What "temp1"? What is the rest of the JCL? ZTEMPF is usually holds the name an ISPF temporary dataset name. You appear to be trying to use it as a name. How about displaying it or even getting the whole thing to work in foreground first?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Aug 07, 2013 8:22 pm
Reply with quote

thesumitk wrote:
Ok..But what about whaen I ran it in correct env like my last post

You did not run it in the "correct environment"; I said "background ISPF", not "background TSO".

If your shop does not have a standard background ISPF proc, take your background TSO JCL, add DD statements for the ISPF libraries (ISP*LIB, ISPFILE, and ISPTABL), then run the script by adding a SYSTSIN DD * statement and placing ISPSTART CMD(%TEMP1) in the stream.
Back to top
View user's profile Send private message
thesumitk

Active User


Joined: 24 May 2013
Posts: 156
Location: INDIA

PostPosted: Thu Aug 08, 2013 7:34 pm
Reply with quote

Thanks for the information .. I tried it like below but getting error shown

Code:
PS030    EXEC PGM=IKJEFT1B,DYNAMNBR=20           
//SYSEXEC  DD DISP=SHR,DSN=AAAA.EXECS         
//SYSPROC  DD DISP=SHR,DSN=AAAA.EXECS         
//ISPPLIB  DD DISP=SHR,DSN=AAAA.PANELS         
//ISPMLIB  DD DISP=SHR,DSN=AAAA.MSGS           
//ISPSLIB  DD DISP=SHR,DSN=AAAA.SKELS         
//ISPTLIB  DD DISP=SHR,DSN=AAAA.TABLES         
//ISPTABL  DD DSN=AAAA.TABLES,DISP=SHR         
//ISPPROF  DD DSN=&&TEMP,DISP=(,DELETE),           
//         UNIT=SYSDA,SPACE=(TRK,(1,1,5),RLSE),     
//         DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120)     
//ISPLOG   DD DSN=&&TEMP,DISP=(,DELETE),           
//         UNIT=SYSDA,SPACE=(TRK,(1,1,5),RLSE),     
//         DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120)     
//SYSPRINT DD SYSOUT=*                             
//SYSTSPRT DD SYSOUT=*                             
//SYSTSIN  DD DISP=SHR,DSN=AAAA.CTC(TEMPREX)




Code:
 EDIT       AAAA.CTC(TEMPREX) - 01.00                  Columns 00001 00072
 Command ===>                                                  Scroll ===> CSR
 ****** ***************************** Top of Data **************
ISPSTART CMD(%TEMP1--> (This is my rexx program resides in the SYSEXEC library mentioned above)                                                   
 ****** **************************** Bottom of Data ************



I am getting below error

Code:
READY                                                                     
 ISPSTART CMD(%TEMP1)                                                     
CMG999   Message ISPV010 - ISPV010  message not found in 'ISPMLIB' library


Can you please put some light on this .. I am not familier withruning rexx under Background ISPF or TSO

Thanks[/code]
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Aug 08, 2013 7:58 pm
Reply with quote

The message is fairly self-explanatory; the message ISPV010 could not be found in the libraries concatenated to ISPMLIB. Why it could not found is slightly more interesting; your JCL shows only your user message library allocated to ISPMLIB. You must also concatenate the system message libraries to it (and perhaps likewise for skeletons and tables).

To find out what those libraries are, log on to TSO, start ISPF, and execute TSO LISTALC STATUS on any command line. You will get a display like
Code:
SYS6.ISPCLIB       
           KEEP     
C00880.RAT.ISPMLIB 
  ISPMLIB  KEEP     
FDP.TOOLS.ISPMLIB   
           KEEP     
FDP.ISP.ISPMLIB     
           KEEP     
SYS1.EXTEND.ISPMLIB
           KEEP     
SYS1.SYSSOFT.ISPMLIB
           KEEP     
SYS1.STARTOOL.MSGS 
           KEEP     
SYS1.ISP.SISPMENU   
           KEEP     
SYS1.SBPXMENU       
           KEEP     
SYS2.ISPMLIB       
           KEEP     
SYS3.ISPMLIB       
           KEEP     
SYS6.ISPMLIB       
           KEEP     
C00880.RAT.ISPPLIB 
  ISPPLIB  KEEP     

Each library from and including the one on the line preceding ISPMLIB, up to but excluding the one on the line preceding the next DDname, may need to be concatenated to ISPMLIB (since I know that the C00880.RAT and the FDP.TOOLS libraries contain components for tools that I use on-line, I need not include them in my batch ISPF JCL).

ISPV010, BTW, is as follows:
Quote:
ISPV010 Profile not loaded - Profile table 'aaaaaaaa' not read. Table service RC=bbbbbbbb.

Explanation:

An error occurred while trying to open a profile table for a new application.

User response:
Contact your system programmer.

System programmer response:
Check out the ISPTLIB allocations for possible problems. Possible return codes are:

8 The profile table was not found. Check the ISPTLIB concatenation for allocation errors. ISPTLIB will be used for default profile tables when the profile table is not found in ISPPROF.

12 An enqueue error occurred. Check the ISPPROF and ISPTLIB allocations for contention problems.
20 A severe error was encountered. The user may have a bad profile table. Restore the table or delete the profile in question and retry.
Back to top
View user's profile Send private message
thesumitk

Active User


Joined: 24 May 2013
Posts: 156
Location: INDIA

PostPosted: Fri Aug 09, 2013 3:51 pm
Reply with quote

I added all the libraries as you suggested .. but this time the error is diffrent icon_sad.gif


Code:
READY                                                                         
 ISPSTART CMD(%TEMP1)                                                         
  ISPV010 Profile not loaded      -/-Profile table 'ISPSPROF' not read. Table service RC=8


I am surprised .. why profile is not loaded .. I am runing one more screen using diffrent lpar.. will that cause this problem?

PLease suggest
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Fri Aug 09, 2013 5:52 pm
Reply with quote

Quote:
but this time the error is diffrent

Actually, it is the same problem but you can now see the message text. See the second post up.

Quote:
System programmer response:
Check out the ISPTLIB allocations for possible problems. Possible return codes are:

8 The profile table was not found. Check the ISPTLIB concatenation for allocation errors. ISPTLIB will be used for default profile tables when the profile table is not found in ISPPROF.
Back to top
View user's profile Send private message
thesumitk

Active User


Joined: 24 May 2013
Posts: 156
Location: INDIA

PostPosted: Fri Aug 09, 2013 5:55 pm
Reply with quote

It Started working fine now icon_smile.gif

I added all ISPTLIB and ISPSLIBs ..

Thanks for the help !!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Using API Gateway from CICS program CICS 0
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top