View previous topic :: View next topic
|
Author |
Message |
kokwind
New User
Joined: 22 May 2008 Posts: 15 Location: Singapore
|
|
|
|
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 |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
I think ZETMPF has to be ZTEMPF. Is it? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
vasanthz wrote: |
I think ZETMPF has to be ZTEMPF. |
That is correct. |
|
Back to top |
|
|
kokwind
New User
Joined: 22 May 2008 Posts: 15 Location: Singapore
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Would I be correct in thinking that you want to submit the job and then wait for its completion ? |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
|