View previous topic :: View next topic
|
Author |
Message |
radhakrishnan82
Active User
Joined: 31 Mar 2005 Posts: 435 Location: chennai, India
|
|
|
|
With reference to topic ibmmainframes.com/viewtopic.php?t=11350
I am getting the following meesage. Instead of returning RC, my shop cancels it. how do i handle this?
Code: |
[size=9]IAT6140 JOB ORIGIN FROM GROUP=ANYLOCAL, DSP=IR , DEVICE=INTRDR , 0000
07:31:45 ---- IAT6853 THE CURRENT DATE IS SATURDAY, 05 MAR 2011 ----
07:31:45 ************************************
07:31:45 LIAT040 - Allocating SWA > 16M line.
07:31:45 ************************************
07:31:45 IAT4401 LOCATE FOR STEP=STEP10 DD=FILEIN DSN=AAA.BBB.CCC.DDD1
07:31:45 IAT4404 DATASET NOT FOUND ON MAIN PROCESSOR WSTC
07:31:45 IAT4801 JOB XXXXXXXZ (XXXX11111) EXPRESS CANCELED BY INTERPRETER DSP [/size] |
|
|
Back to top |
|
|
radhakrishnan82
Active User
Joined: 31 Mar 2005 Posts: 435 Location: chennai, India
|
|
|
|
I am using the below code now.
Code: |
//STEP010 EXEC PGM=IDCAMS
//SYSUDUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
PRINT IDS('AAA.BBB') COUNT(1)
IF LASTCC=12 THEN SET MAXCC=4
/*
//*
// IF (STEP010.RC=0) THEN
//STEP020 EXEC PGM=PGM1
// ELSE
//STEP030 EXEC PGM=PGM2
// ENDIF
|
Even the file is empty, STEP020 is executing. It shouldnt execute as per the IF condition. STEP020 is executing and abends with file not located.
can anyone pls help why is it executing astep020 even if file in step010 doesnt exist. |
|
Back to top |
|
|
kratos86
Active User
Joined: 17 Mar 2008 Posts: 148 Location: Anna NGR
|
|
|
|
Are the first step returning non-zero return code?
Please post the log of your job for anyone to look and help you. |
|
Back to top |
|
|
radhakrishnan82
Active User
Joined: 31 Mar 2005 Posts: 435 Location: chennai, India
|
|
|
|
Quote: |
Even the file is empty, STEP020 is executing. It shouldnt execute as per the IF condition. STEP020 is executing and abends with file not located.
can anyone pls help why is it executing astep020 even if file in step010 doesnt exist. |
In step20, I want to use the file that I checked whether it is present or not.
Hence it has given me the error (file not foud) before going into the execution.
My reqmt is to check file 1whether a file is present or not.
If present, process file1 as input and create 2 output files
If not present, write "file not present' in file1. |
|
Back to top |
|
|
radhakrishnan82
Active User
Joined: 31 Mar 2005 Posts: 435 Location: chennai, India
|
|
|
|
Quote: |
Are the first step returning non-zero return code? |
I am using the non existing file in the second step. Hence it puts me in syntax error in the job that the file is not available. Job not executed.
How should I handle such case. |
|
Back to top |
|
|
kratos86
Active User
Joined: 17 Mar 2008 Posts: 148 Location: Anna NGR
|
|
|
|
Still you did not answer my question... What is the return code from the first step?? |
|
Back to top |
|
|
radhakrishnan82
Active User
Joined: 31 Mar 2005 Posts: 435 Location: chennai, India
|
|
|
|
The job didnt executed. If I run with other existing files, condition code is returning 4 for empty files. I verified. Problem with my code is that iam using the non-exsting file in the second step which results in "file not found error " job not executed.
Code: |
//STEP010 EXEC PGM=IDCAMS
//SYSUDUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
PRINT IDS('AAA.BBB') COUNT(1)
IF LASTCC=12 THEN SET MAXCC=4
/*
//*
// IF (STEP010.RC=0) THEN
//STEP020 EXEC PGM=SORT
//SORTIN DD DSN=AAA.BBB --> it says file not available, job not executed
// ELSE
//STEP030 EXEC PGM=PGM2
// ENDIF |
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
If you are running JES3 at your site, the entire job has data set verification done before the job starts running. JES2 does data set verification before each step -- one of the differences in the two. This means that under JES3, unlike JES2, the JCL you have will never work. You can split it into 2 steps, or find another approach, but the approach you are using will not work. |
|
Back to top |
|
|
|