Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need a LOAD / UNLOAD JCL

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

New User


Joined: 09 Feb 2006
Posts: 2

PostPosted: Thu Mar 23, 2006 5:18 pm    Post subject: Need a LOAD / UNLOAD JCL
Reply with quote

Dear All,

I have a requirement for my project in which I need to LOAD/UNLOAD a Database. We dont have any utilities as FADB2. Thus I need to do this with a JCL.
Can anybody help me out with the JCL for both.

Regards,
Ritesh
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Thu Mar 23, 2006 6:16 pm    Post subject: Re: Need a LOAD / UNLOAD JCL
Reply with quote

Check out this earlier post...

Regards,
Priyesh.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Thu Mar 23, 2006 7:49 pm    Post subject:
Reply with quote

Hi,

Load jcl :
//T6329EGN JOB (0,1704),'LOAD PUSDSMX ', 00010003
// CLASS=L,
// MSGLEVEL=(1,1),
// MSGCLASS=Y,
// NOTIFY=&SYSUID
//*
//***********************************************************
//* STOP DATA BASE
//***********************************************************
//*
//STOPDB EXEC PGM=IKJEFT01,DYNAMNBR=20
//STEPLIB DD DSN=TSYS.DSNLOAD,DISP=SHR
//*
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(GRT1)
-START DATABASE(P338) SPACENAM(PUSDSMX) ACCESS(UT)
END
//**********************************************************
//* L O A D - P C U H S U M T ABLE
//**********************************************************
//*
//PUSRTPY EXEC DSNUPROC,SYSTEM=GRT1,UID='PUSDSMX',UTPROC=''
//*
//* INPUT DATA -
//DSNUPROC.SYSREC00 DD DSN=T6329EG.DATA.PUSDSMX,
// DISP=MOD
//* INPUT UNLOAD CARDS FOR TABLE -
//DSNUPROC.SYSIN DD DSN=T6329EG.UNLOAD.SYSPUNCH.PUSDSMX,DISP=SHR
//*
//DSNUPROC.SORTWK01 DD UNIT=DISK,SPACE=(CYL,(50,10))
//DSNUPROC.SORTWK02 DD UNIT=DISK,SPACE=(CYL,(50,10))
//DSNUPROC.SORTWK03 DD UNIT=DISK,SPACE=(CYL,(50,10))
//DSNUPROC.SORTWK04 DD UNIT=DISK,SPACE=(CYL,(50,10))
//DSNUPROC.SORTWK05 DD UNIT=DISK,SPACE=(CYL,(50,10))
//DSNUPROC.SORTWK06 DD UNIT=DISK,SPACE=(CYL,(50,10))
//DSNUPROC.SORTWK07 DD UNIT=DISK,SPACE=(CYL,(50,10))
//DSNUPROC.SORTWK08 DD UNIT=DISK,SPACE=(CYL,(50,10))
//DSNUPROC.SORTWK09 DD UNIT=DISK,SPACE=(CYL,(50,10))
//DSNUPROC.SORTWK10 DD UNIT=DISK,SPACE=(CYL,(50,10))
//DSNUPROC.SORTWK11 DD UNIT=DISK,SPACE=(CYL,(50,10))
//*
//DSNUPROC.SORTOUT DD UNIT=DISK,SPACE=(CYL,(50,10))
//*
//***********************************************************
//* REFERNTIAL CONSTRAINT VIOLATIONS GOES TO SYSDISC.
//***********************************************************
//*
//DSNUPROC.SYSDISC DD DSN=&SYSUID..DXTDATA.PUSDSMX.REJECT,
// DISP=(MOD,CATLG),
// SPACE=(22000,(20,20),,,ROUND),
// UNIT=DISK
//*
//***********************************************************
//* DUPLICATE KEY ERROR INFO. GOES TO SYSERR
//***********************************************************
//DSNUPROC.SYSERR DD DSN=&SYSUID..DXTDATA.PUSDSMX.ERROR,
// DISP=(MOD,DELETE,CATLG),
// SPACE=(100,(20,20),,,ROUND),
// UNIT=DISK
//*
//***********************************************************
//* REPORTS OF UNIQUE INDEX VIOLATIONS AND REFERENTIAL KEY */
//* VIOLATIONS GOES TO SYSPRINT
//***********************************************************
//***********************************************************
//* SYSMAP DD CARD REQUIRED
//*
//* ALLOW ENOUGH SPACE TO STORE A 50 BYTE RECORD FOR EACH ROW
//* BEING LOADED
//***********************************************************
//DSNUPROC.SYSMAP DD DSN=&SYSUID..DXTDATA.PUSDSMX.MAPERR,
// DISP=(MOD,DELETE,CATLG),
// SPACE=(CYL,(10,5),RLSE),
// UNIT=DISK
//*
//***********************************************************
//* POPULATES SYSUT1 WITH INDEX AND FORIGN KEY DATA IN *//
//* RELOAD PHASE
//***********************************************************
//DSNUPROC.SYSUT1 DD UNIT=DISK,SPACE=(CYL,(10,5))
//***********************************************************
//* RUN STATS ON PUSRTPY TABLE
//***********************************************************
//*RSTAT EXEC DSNUPROC,SYSTEM=DT11,UID='PUSRTPY',UTPROC=''
//*DSNUPROC.SYSIN DD *
//* RUNSTATS TABLESPACE P330.PUSRTPY INDEX (ALL)
//*
//*
//***********************************************************
//* START THE DATABASE WITH ACCESS FORCE *
//***********************************************************
//STARTDB EXEC PGM=IKJEFT01,DYNAMNBR=20,COND=EVEN
//STEPLIB DD DSN=TSYS.DSNLOAD,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//*
//SYSTSIN DD *
DSN SYSTEM(GRT1)
-START DATABASE(P338) SPACENAM(PUSDSMX) ACCESS(FORCE)
END
/*
//

UNLOAD JCL

//T6327PGA JOB (0,17XX),'EXTRACT PUSRTPY',CLASS=B,
// MSGCLASS=Y,MSGLEVEL=(0,0),NOTIFY=&SYSUID
//***********************************************************
//* EXTRACT DATA FROM DB2 TABLES
//***********************************************************
//STEP005 EXEC UCC11RMS,TYPRUN=F
//*
//STEP010 EXEC PGM=IKJEFT01
//STEPLIB DD DSN=DB2P.RUNLIB.LOAD,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(GRT1)
RUN PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) PARMS('SQL')
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//*
//SYSPUNCH DD DSN=T6329EG.UNLOAD.SYSPUNCH.PUSDSMX,
// DISP=(MOD,CATLG,DELETE),
// SPACE=(CYL,(92,18),RLSE)
//SYSREC00 DD DSN=T6329EG.DATA.PUSDSMX,
// DISP=OLD
//SYSIN DD *
SELECT *
FROM ODDCDB2P.P.PUSDSMX ;
/*

Hope it will be helpful
Back to top
View user's profile Send private message
rcdmumbai

New User


Joined: 09 Feb 2006
Posts: 2

PostPosted: Fri Mar 24, 2006 2:18 pm    Post subject: Re: Need a LOAD / UNLOAD JCL
Reply with quote

Thanks a lot for the same.
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 Can DFSPARM override SORTKEYS paramet... ashek15 DB2 2 Tue Jan 31, 2017 11:36 pm
No new posts Best IMS DB Unload Utility jjabez10 IMS DB/DC 12 Thu Sep 22, 2016 11:15 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts Copybook structure in Load module Vai123 COBOL Programming 7 Fri Sep 16, 2016 8:29 pm
This topic is locked: you cannot edit posts or make replies. ERROR WHILE SUBMITTING LOAD JOB ANURADHA NEELAKANTAN JCL & VSAM 12 Thu Aug 25, 2016 11:50 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us