View previous topic :: View next topic |
Author |
Message |
coolman Intermediate
Joined: 03 Jan 2003 Posts: 283 Topics: 27 Location: US
|
Posted: Thu Sep 04, 2003 6:27 am Post subject: Db2 download job with a max-rc of 4 |
|
|
Kolusu,
I have coded a DB2 download job. The problem is it works fine, but comes out with MAX-RC = 4, whereas Im expecting a MAX-RC = 0
Code: |
//STEP EXEC PGM=IKJEFT01
//SYSTSIN
DSN SYSTEM(DSN)
RUN PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) PARMS('SQL')
/*
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSPUNCH DD DUMMY
//SYSREC00 DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SELECT CONTRACT_NUM FROM
OWNER.TABLE
/*
//
|
Now the job gives me a max-rc of zero if i give a "SELECT *", whereas if i code a column name(as shown in the code above), it comes out with a MAX-RC of 4. Now I have got couple of job steps downsteam which checks for condition code COND=(0,LT). Hence, Im looking as to why it is behaving like this? Looked at the MSGLG but didnt find any success..
Any pointers?
Cheers,
Coolman.
________
free wordpress themes
Last edited by coolman on Sat Feb 05, 2011 1:28 am; edited 1 time in total |
|
Back to top |
|
|
CZerfas Intermediate
Joined: 31 Jan 2003 Posts: 211 Topics: 8
|
Posted: Thu Sep 04, 2003 6:57 am Post subject: |
|
|
Hello Coolman,
with the DSNTIAUL program you create a file with a DB2 "unload" content (under SYSREC00) and the associated LOAD statement under SYSPUNCH. The idea is to populate a table with the same structure but defined with a different table name or under a different table owner.
Therefore, if you do not issue a "SELECT *", the "unloaded" data doesn't fit to the structure in the LOAD statement under SYSPUNCH. To give you that kind of warning, the DSNTIAUL steps ends with a RC=4.
If you know, that you didn't issue a "SELECT *" statement under SYSIN, you can ignore the RC=4.
regards
Christian |
|
Back to top |
|
|
coolman Intermediate
Joined: 03 Jan 2003 Posts: 283 Topics: 27 Location: US
|
Posted: Thu Sep 04, 2003 7:17 am Post subject: |
|
|
Christian,
I perfectly agree with what you say, but, if i give all the columns of the table in SELECT, what should the return code, it should be 0 (as per what you say), but its giving me a return code of 4. What is the reason?
Cheers,
Coolman.
________
hot penny stocks
Last edited by coolman on Sat Feb 05, 2011 1:28 am; edited 1 time in total |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu Sep 04, 2003 7:51 am Post subject: |
|
|
Coolman,
Try coding SELECT * instead of typing all columns and it will issue a return code of 0.As such DSNTIAUL assumes that there are some other unselected columns when you use the column names in the select clause.DSNTIAUL does not have ability to check the table definition.
Hope this helps..
Kolusu |
|
Back to top |
|
|
coolman Intermediate
Joined: 03 Jan 2003 Posts: 283 Topics: 27 Location: US
|
Posted: Thu Sep 04, 2003 8:04 am Post subject: |
|
|
Kolusu,
But I do not want to code a SELECT * for the simple reason being Im doing a JOIN to select some other columns from some other tables also. Now this brings up another question. How do I force a return code of zero for this case. Are there any work arounds ? I tried out with IDCAMS and IF, but didnt materialise.
Cheers,
Coolman
________
Aries
Last edited by coolman on Sat Feb 05, 2011 1:28 am; edited 1 time in total |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu Sep 04, 2003 9:22 am Post subject: |
|
|
Coolman,
There is no easy way to force the return code of zero.A return code 4 is a warning only.change the return code would require a program to modify internal control blocks.Check this topic which already discussed about resetting the return code
http://www.mvsforums.com/helpboards/viewtopic.php?t=1133
Hope this helps...
cheers
kolusu |
|
Back to top |
|
|
coolman Intermediate
Joined: 03 Jan 2003 Posts: 283 Topics: 27 Location: US
|
Posted: Fri Sep 05, 2003 5:03 am Post subject: |
|
|
Thanks Kolusu, have already been through this topic.
________
buy easy vape vaporizer |
|
Back to top |
|
|
|
|