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

Submitted a job through REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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: 1742
Location: Tirupur, India

PostPosted: Thu Dec 08, 2011 1:18 pm
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: 8797
Location: Welsh Wales

PostPosted: Thu Dec 08, 2011 1:27 pm
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: 1788
Location: Bloomington, IL

PostPosted: Thu Dec 08, 2011 3:43 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Fri Dec 09, 2011 12:33 pm
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: 1742
Location: Tirupur, India

PostPosted: Fri Dec 09, 2011 1:08 pm
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 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 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
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top