Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Submitted a job through REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
kokwind

New User


Joined: 22 May 2008
Posts: 15
Location: Singapore

PostPosted: Thu Dec 08, 2011 1:10 pm    Post subject: Submitted a job through REXX
Reply with quote

Hi,

I am submitting a job through REXX, but I got a error.
Code:

IKJ56709I INVALID DATA SET NAME, DATASET('ZETMPF')

I don't know How to put jcl to the 'ZETMPF' ?

Code:

/* REXX */                                         
Address ISPEXEC                                     
"FTOPEN TEMP"                                       
"FTINCL" TESTJCL                                   
"FTCLOSE"                                           
"VGET (ZTEMPF) SHARED"                             
ADDRESS TSO "SUBMIT DATASET('"ZETMPF"')"           
RETURN                                             
Back to top
View user's profile Send private message

vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1475
Location: Chennai

PostPosted: Thu Dec 08, 2011 1:18 pm    Post subject:
Reply with quote

I think ZETMPF has to be ZTEMPF. Is it?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Dec 08, 2011 1:27 pm    Post subject:
Reply with quote

What happens when you run with TRACE, what does it show you ?

I usually use the code here
Code:
"ISPEXEC  FTCLOSE"
"ISPEXEC  VGET (ZTEMPF)"
  "SUB '"ZTEMPF"'"
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


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

PostPosted: Thu Dec 08, 2011 3:43 pm    Post subject:
Reply with quote

vasanthz wrote:
I think ZETMPF has to be ZTEMPF.

That is correct.
Back to top
View user's profile Send private message
kokwind

New User


Joined: 22 May 2008
Posts: 15
Location: Singapore

PostPosted: Fri Dec 09, 2011 6:51 am    Post subject:
Reply with quote

Many thanks for the answer.
It works .
Code:

/* REXX */                                                     
ADDRESS ISPEXEC                                             
"FTOPEN TEMP"                                               
"FTINCL" TESTJCL                                             
"FTCLOSE"                                                   
"VGET (ZTEMPF) SHARED"                                       
ADDRESS TSO "SUB '"ZTEMPF"'"                                 
RETURN   


but when I exec this code
Code:

/* REXX */                                                   
ADDRESS ISPEXEC                                             
"FTOPEN TEMP"                                               
"FTINCL" TESTJCL                                           
"FTCLOSE"                                                   
"VGET (ZTEMPF) SHARED"                                     
                                                           
ADDRESS TSO                                                 
X = OUTTRAP('LOG.')                                         
"SUBMIT '"ZTEMPF"'"                                         
X = OUTTRAP('OFF')                                         
SAY LOG.2                                                   
PARSE VAR LOG.2 "JOB" JOBID MESSAGE                         
SAY "JOB "JOBNAME"("JOBID") "MESSAGE                       
ADDRESS TSO "STATUS " JOBID                                 


I got a msg:
Code:

LOG.2                                                                                                   
JOB JOBNAME()                                                                                           
IKJ56216I NO JOBS FOUND+                                                                               
IKJ56216I SYSTEM QUEUES WERE SEARCHED FOR JOBNAMES EQUAL TO YOUR USERID PLUS ONE CHARACTER             
10.20.20 JOB02173 $HASP165 DUMMYJ   ENDED AT N1  MAXCC=0 CN(INTERNAL)                                   
***                                                                                                     


If I want to get return Is this way right?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Dec 09, 2011 12:33 pm    Post subject:
Reply with quote

Would I be correct in thinking that you want to submit the job and then wait for its completion ?
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1475
Location: Chennai

PostPosted: Fri Dec 09, 2011 1:08 pm    Post subject:
Reply with quote

Quote:
Would I be correct in thinking that you want to submit the job and then wait for its completion ?

The STATUS command gives the status of jobs, if they are executing or in output queue after completion, So I think we don't have to wait till the job is completed.

@kokwind

In your code,
Code:
SAY LOG.2                                                   
PARSE VAR LOG.2 "JOB" JOBID MESSAGE                         
SAY "JOB "JOBNAME"("JOBID") "MESSAGE                       


OUTPUT:
Code:

LOG.2                                                                                                   
JOB JOBNAME()                                                                                         


2 SAY command output above shows that the jobname and its jobid are not present in the LOG.2 stem variable.

Should'nt it be LOG.1 in the PARSE command instead of LOG.2?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts JCL to get submitted once dataset has... vinu78 JCL & VSAM 17 Thu Feb 16, 2017 7:32 am
No new posts REXX compiled via RXTCOMP sergeyken CLIST & REXX 7 Tue Feb 07, 2017 9:41 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us