Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
unload DB2 table to flat file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
brindha christy

New User


Joined: 26 Aug 2008
Posts: 20
Location: India

PostPosted: Wed Oct 08, 2008 12:06 pm    Post subject: unload DB2 table to flat file
Reply with quote

I am using the following JCL to unload DB2 table into a flat file:

//STEP10 EXEC PGM=IKJEFT01,DYNAMNBR=20,COND=(4,LT)
//SYSREC00 DD DSN=XYZ.ABC.DB2.UNLOAD3,
// DISP=(,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(100,100),RLSE)
//SYSPUNCH DD DUMMY
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DBXX)
RUN PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) PARMS('SQL')
END
/*
//SYSIN DD *
SELECT * TABLE.TABLENAME
;
/*

I am getting MAXCC 12 with the following message:
READY
DSN SYSTEM(DBXX)
IKJ56500I COMMAND DSN NOT FOUND
READY
RUN PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) PARMS('SQL')
IKJ56712I INVALID KEYWORD, PLAN(DSNTIAUL)
IKJ56712I INVALID KEYWORD, PARMS('SQL')
READY
END
READY
END

WHat is wrong in my job
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Oct 08, 2008 1:01 pm    Post subject:
Reply with quote

Hello,

It looks like there may one or more libraries missing. You may need to add a steplib.
Back to top
View user's profile Send private message
lc.milani

New User


Joined: 02 Oct 2008
Posts: 1
Location: Italy

PostPosted: Wed Oct 08, 2008 1:51 pm    Post subject:
Reply with quote

Hi, i had the same problem.
you need to define a steplib with the library where the DSN load is.

my jcl:

Code:

//DB2SQL   EXEC PGM=IKJEFT01,DYNAMNBR=20,COND=(0,NE)
//STEPLIB  DD DISP=SHR,DSN=DB2P.V7.RUNLIB.LOAD
//         DD DISP=SHR,DSN=DSN.V7.SDSNLOAD
//SYSTSIN  DD *                                     
DSN SYSTEM(DB2P)                                     
 RUN  PROGRAM(DSNTIAUL) -                           
      PLAN(DSNTIAUL)    -                           
      PARM('SQL')                                   
 END                                                 
/*                                                   
//SYSPRINT DD SYSOUT=*                               
//SYSTSPRT DD SYSOUT=*                               
//SYSOUT   DD SYSOUT=*                               
//SYSUDUMP DD SYSOUT=*                               
//SYSPUNCH DD DSN=my.SYSPUNCH,             
//            DISP=(NEW,CATLG,DELETE), etc....             
//SYSREC00 DD DSN=my.file.output,
//            DISP=(NEW,CATLG), etc....
//SYSIN    DD *                                       
SELECT my_field
   FROM mydb.mytable
 WHERE my-conditions
/*



DB2P.V7.RUNLIB.LOAD : here is the DSNTIAUL's load module
DSN.V7.SDSNLOAD: here is the DSN's load module

you must find theme out in your system settings...try asking to db administrators...

Greetings.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Process file after 7 days of hold charlessxavier All Other Mainframe Topics 0 Tue May 22, 2018 3:54 pm
No new posts Extracting DDL for all list of intere... Ashishpanpaliya DB2 0 Mon May 21, 2018 4:08 pm
No new posts TRAILER3 is creating blank record in ... kodeesm DFSORT/ICETOOL 3 Fri May 18, 2018 5:45 pm
No new posts Transfer of mainframe file to PC in Z... maxsubrat JCL & VSAM 4 Thu May 17, 2018 11:35 am
No new posts Rexx command to open an another text ... Bharath Vikraman PC Guides & IT News 7 Sat May 12, 2018 4:34 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us