View previous topic :: View next topic
|
Author |
Message |
ashok_uddaraju
New User
Joined: 21 Feb 2007 Posts: 72 Location: US
|
|
|
|
I have JCL to run the SQL query where i directly give the query in SYSIN, but the output dataset mentioned in the SYSREC00 does not store this result.
Code: |
//STEP20 EXEC PGM=IKJEFT01,DYNAMNBR=20
//STEPLIB DD DSN=DB2PRD03.SUBSYS.LOADLIB,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSREC00 DD DSN=ECNS.USER.HTAELI.QUAT,DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(1,20),RLSE) |
Can you please let me know what can be done to save the output in a outputfile |
|
Back to top |
|
|
rockish
Active User
Joined: 05 Jun 2009 Posts: 185 Location: Planet Earth
|
|
|
|
While using IKJEFT01, I use SYSPRINT to hold the output DSN. You may wish to try that !
To my knowledge, SYSREC00 is used for unload utilities. |
|
Back to top |
|
|
ashok_uddaraju
New User
Joined: 21 Feb 2007 Posts: 72 Location: US
|
|
|
|
itried this but i am getting the entire sql as well in the output file.
I just need the output data
please suggest |
|
Back to top |
|
|
rockish
Active User
Joined: 05 Jun 2009 Posts: 185 Location: Planet Earth
|
|
|
|
Hello,
Suggest you to use Unload utilities like DSNTIAUL.
Please find sample JCL below,
Code: |
//STEP010 EXEC PGM=IKJEFT01,REGION=1024K
//STEPLIB DD DSN=DB2PRD03.SUBSYS.LOADLIB,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSREC00 DD SYSOUT=*
//SYSPUNCH DD DUMMY
//SYSTSIN DD *
DSN SYSTEM(DB2I)
RUN PROG(DSNTIAUL) PLAN(DSNTIAUL) -
LIB('DB2PRD03.SUBSYS.LOADLIB')
END
/*
//SYSIN DD *
SYSIBM.SYSTABLES WHERE NAME='TABLE1'
/* |
|
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Although you have refrained from posting the information, I suspect that you are running DSNTEP2 (often renamed by shops), which runs any dynamic SQL. You should use DSNTIAUL (likewise often renamed), which unloads tables to the SYSRECnn DDs. |
|
Back to top |
|
|
rockish
Active User
Joined: 05 Jun 2009 Posts: 185 Location: Planet Earth
|
|
|
|
Akatsukami,
That is an interesting piece of information for me. I wasn't really aware that DSNTIAUL is a shop renamed version of DSNTEP2. Though, your post kindles interest in me to do some readup to understand it better, the fact that its a Friday eve doesn't really let me do it ;-)
Anyways, this was the link I referred and hence I thought DSNTIAUL is an IBM supplied program - http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.apsg/db2z_dsntiaul.htm
Probably I'll use the forthcoming Monday to understand it better. |
|
Back to top |
|
|
ashok_uddaraju
New User
Joined: 21 Feb 2007 Posts: 72 Location: US
|
|
|
|
thanks it worked |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
rockish wrote: |
Akatsukami,
That is an interesting piece of information for me. I wasn't really aware that DSNTIAUL is a shop renamed version of DSNTEP2. |
I wrote unclearly. DSNTEP2 and DSNTIAUL are separate IBM-supplied programs (they are technically sample DB2 applications, but are invariably used as DB2 utilities). However, both are often renamed in a rather pathetic attempt at "security by obscurity". |
|
Back to top |
|
|
|