View previous topic :: View next topic
|
Author |
Message |
nandeshwar
New User
Joined: 11 Oct 2010 Posts: 45 Location: Delhi
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Abhishek_Indore
New User
Joined: 20 Oct 2010 Posts: 6 Location: INDIA->US->UK
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Abhishek_Indore wrote: |
I would suggest to check the error message in JCL. |
Did you mean JESMSGLG? |
|
Back to top |
|
|
Abhishek_Indore
New User
Joined: 20 Oct 2010 Posts: 6 Location: INDIA->US->UK
|
|
|
|
Sorry expat and Anuj,not making the things clear.
yes,I meant output of the JCL(JESMSGLG) in spool. |
|
Back to top |
|
|
nandeshwar
New User
Joined: 11 Oct 2010 Posts: 45 Location: Delhi
|
|
|
|
@ 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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Which part of supply the OUTPUT did you not understand. |
|
Back to top |
|
|
nandeshwar
New User
Joined: 11 Oct 2010 Posts: 45 Location: Delhi
|
|
|
|
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 |
|
|
nandeshwar
New User
Joined: 11 Oct 2010 Posts: 45 Location: Delhi
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
nandeshwar
New User
Joined: 11 Oct 2010 Posts: 45 Location: Delhi
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Sorry, looks like - I posted in little late. Hopefully, you've a solution now, Nandeshwar? |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
DISP=(MOD,DELETE,DELET)
I miss an "E" here. |
|
Back to top |
|
|
nandeshwar
New User
Joined: 11 Oct 2010 Posts: 45 Location: Delhi
|
|
|
|
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 |
|
|
nandeshwar
New User
Joined: 11 Oct 2010 Posts: 45 Location: Delhi
|
|
|
|
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 |
|
|
nandeshwar
New User
Joined: 11 Oct 2010 Posts: 45 Location: Delhi
|
|
|
|
PeterHolland wrote: |
DISP=(MOD,DELETE,DELET)
I miss an "E" here. |
sorry that was typing mistake.
its DISP=(MOD,DELETE,DELETE) |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Use copy/paste next time. |
|
Back to top |
|
|
|