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

jcl error when submitting the same job with a change


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nandeshwar

New User


Joined: 11 Oct 2010
Posts: 45
Location: Delhi

PostPosted: Tue Nov 30, 2010 12:26 pm
Reply with quote

Hi I have written a JCL for loading records into table . This job is file triggered and once the job runs the file has to be deleted itself. For this also code has been written in the same jcl.


Code:
//***********************************************************
//* DELETE THE INPUT FILE WHICH TRIGGERS THIS JOB                     
//***********************************************************
//SZ20133  EXEC PGM=IEFBR14                                           
//DD1      DD   DSN=CPABC.BCKUP.SZ20131,                               
//         DISP=(MOD,DELETE,DELETE),SPACE=(TRK,(0,0))                 
// ENDIF                                                               
//***********************************************************

The code has been moved to AD. Now when i m running this job the RC =0 but when i m changing the file name in view mod and then submitting the job its telling JCL error . And the same job return RC=0 if the delete stament is modifide(see underlined) as below:


Code:
//***********************************************************
//* DELETE THE INPUT FILE WHICH TRIGGERS THIS JOB             
//***********************************************************
//SZ20133  EXEC PGM=IEFBR14                                   
//DD1      DD   DSN=CPS1R.BCKUP.SZ20131,                       
//         DISP=([u]SHR,KEEP,KEEP[/u]),SPACE=(TRK,(0,0))             
// ENDIF                                                       
//***********************************************************

but the table is successfully loaded with records in all cases. Can any one tell why so ??

Edited: Please use BBcode when You post some code/error, that's rather readable, Thanks... Anuj
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Nov 30, 2010 1:53 pm
Reply with quote

You're not telling us all the things, for sure.

1. You've changed your DISP to have (SHR,KEEP,KEEP) - IEFBR14, does nothing, you know - so what exactly you intend to do with such a DISP? It will actually do nothing!

2. I execute this job and the RC was equal to zero. After all IEBR14 is executing, so what other RC should I expect in this case!
Code:
//job  JOB (@),'TEMP',CLASS=Z,               
//            MSGLEVEL=(1,1),MSGCLASS=H,     
//            NOTIFY=&SYSUID                 
//*                                         
//STEP0010 EXEC PGM=IEFBR14                 
//DD1     DD  DSN=HLQ.FIRST.FILE.IEFBR14,   
//            DISP=(SHR,KEEP,KEEP)           
//*                                         


3. What is that stray ENDIF doing in your post?
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Nov 30, 2010 2:11 pm
Reply with quote

Supply the output NOT the input.

The output, which YOU should have checked first will tell us what is wrong, the input will not
Back to top
View user's profile Send private message
Abhishek_Indore

New User


Joined: 20 Oct 2010
Posts: 6
Location: INDIA->US->UK

PostPosted: Tue Nov 30, 2010 2:14 pm
Reply with quote

Hi

Quote:
when i m changing the file name in view mod and then submitting the job its telling JCL error .


I would suggest to check the error message in JCL.

Quote:
but the table is successfully loaded with records in all cases. Can any one tell why so ??


Actaully IEFBR14 was excuted at the end of your Job and it was deleting the file on certain condition(assumed as endif was mentioned in the posted code) SO in any case before the execution of IEFBR14,other steps were excuted succesfully.

Thanks
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Nov 30, 2010 2:16 pm
Reply with quote

Abhishek_Indore wrote:
I would suggest to check the error message in JCL.
I rather hope that you meant to say the output rather than the JCL icon_eek.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Nov 30, 2010 2:17 pm
Reply with quote

Abhishek_Indore wrote:
I would suggest to check the error message in JCL.
Did you mean JESMSGLG?
Back to top
View user's profile Send private message
Abhishek_Indore

New User


Joined: 20 Oct 2010
Posts: 6
Location: INDIA->US->UK

PostPosted: Tue Nov 30, 2010 2:24 pm
Reply with quote

Sorry expat and Anuj,not making the things clear.

yes,I meant output of the JCL(JESMSGLG) in spool.
Back to top
View user's profile Send private message
nandeshwar

New User


Joined: 11 Oct 2010
Posts: 45
Location: Delhi

PostPosted: Tue Nov 30, 2010 2:46 pm
Reply with quote

@ ANUJ

actually that is my question. When i m changing the parameters of DISP to do nothing(SHR,KEEp,KEEP) then i am getting RC=0 where as if i m keeping it as
DISP=(MOD,DELETE,DELET) it is giving JCL error .

In the job I am trying to load a table and then deleting the files used to load.
But as I m testing it i used another file from my saved PS .But it gave JCL error if i m continuing with the deleting file after loading.

Please ignore END IF . It is a part of my program.[/quote]
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Nov 30, 2010 2:49 pm
Reply with quote

Which part of supply the OUTPUT did you not understand.
Back to top
View user's profile Send private message
nandeshwar

New User


Joined: 11 Oct 2010
Posts: 45
Location: Delhi

PostPosted: Tue Nov 30, 2010 2:49 pm
Reply with quote

Quote:
Supply the output NOT the input.



I couldnot find any difference in the two job logs . In both the SYSPRINT statemments i couldn't find a single line difference.which amazed me.When it is RC=0 and when its showing JCL error under Max-Rc column in the spool.

[/quote]
Back to top
View user's profile Send private message
nandeshwar

New User


Joined: 11 Oct 2010
Posts: 45
Location: Delhi

PostPosted: Tue Nov 30, 2010 2:53 pm
Reply with quote

expat wrote:
Which part of supply the OUTPUT did you not understand.


could you please explain this?? I am not getting your question.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Nov 30, 2010 2:55 pm
Reply with quote

Abhishek_Indore wrote:
Sorry expat and Anuj,not making the things clear.
yes,I meant output of the JCL(JESMSGLG) in spool.
Unless you supply what is asked for, we can sit here all day long scratching our arses without knowing what the problem is.

Please read the quoted text above so that you know exactly what to post and then decide

You either post the output and get some help, or you don't.
Back to top
View user's profile Send private message
nandeshwar

New User


Joined: 11 Oct 2010
Posts: 45
Location: Delhi

PostPosted: Tue Nov 30, 2010 3:09 pm
Reply with quote

thanks i got the reason for the JCL error. Actually i was intending to delete the file but it was having READ access and not ALTER authority.

@expat
I got ur point but i was unable to figure out the requiremnet by you . But as per your statement the JESMSGLG has my solution.

thanks again.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Nov 30, 2010 3:10 pm
Reply with quote

nandeshwar wrote:
if i m keeping it as
DISP=(MOD,DELETE,DELET) it is giving JCL error .
What JCL error do you get?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Nov 30, 2010 3:14 pm
Reply with quote

Sorry, looks like - I posted in little late. Hopefully, you've a solution now, Nandeshwar?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Nov 30, 2010 3:14 pm
Reply with quote

DISP=(MOD,DELETE,DELET)

I miss an "E" here.
Back to top
View user's profile Send private message
nandeshwar

New User


Joined: 11 Oct 2010
Posts: 45
Location: Delhi

PostPosted: Tue Nov 30, 2010 3:15 pm
Reply with quote

the error stated in JESMSGLG is as stated below:

IGD17105I CATALOG ERROR WHILE DELETING DATA SET 171
CPABC.BCKUP.SZ20131
RETURN CODE IS 56 REASON CODE IS 6 IGG0CLFT
Back to top
View user's profile Send private message
nandeshwar

New User


Joined: 11 Oct 2010
Posts: 45
Location: Delhi

PostPosted: Tue Nov 30, 2010 3:18 pm
Reply with quote

Anuj Dhawan wrote:
Sorry, looks like - I posted in little late. Hopefully, you've a solution now, Nandeshwar?



Yeah Anuj I got my answer. Thanks for ur help.
Back to top
View user's profile Send private message
nandeshwar

New User


Joined: 11 Oct 2010
Posts: 45
Location: Delhi

PostPosted: Tue Nov 30, 2010 3:23 pm
Reply with quote

PeterHolland wrote:
DISP=(MOD,DELETE,DELET)

I miss an "E" here.


sorry that was typing mistake.
its DISP=(MOD,DELETE,DELETE)
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Nov 30, 2010 3:24 pm
Reply with quote

Use copy/paste next time.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts submitting feedback for manuals All Other Mainframe Topics 3
No new posts 3270 personal communications. Can't c... TSO/ISPF 2
Search our Forums:

Back to Top