View previous topic :: View next topic |
Author |
Message |
kappurajesh Beginner
Joined: 29 Mar 2004 Posts: 19 Topics: 13 Location: India
|
Posted: Thu Jul 29, 2004 9:12 am Post subject: How to pass to insert records to DB2 from Jcl |
|
|
How to pass records to DB2 using from Jcl
How to delete KSDS records and keep structure
Can u give me JCL code for 1000 records passed from VSAM to DB2
Is it possible in sort utility one input file and create two output file with ascending order and descending order |
|
Back to top |
|
 |
NutCracker Beginner

Joined: 13 Dec 2002 Posts: 45 Topics: 3 Location: 3rd Block from the SUN
|
Posted: Thu Jul 29, 2004 9:18 am Post subject: |
|
|
Whoa! Hold On.
One at a time, please |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
Posted: Thu Jul 29, 2004 9:27 am Post subject: |
|
|
Quote: | How to pass records to DB2 using from Jcl |
JCL is just Job Control Language. JCL by itself cannot do anything. However You can LOAD/INSERT/UPDATE/DELETE records into a DB2 table using DB2 Utilities.
Quote: | How to delete KSDS records and keep structure |
Check this link which discusses about deleting records from a VSAM file.
http://www.mvsforums.com/helpboards/viewtopic.php?t=2014&highlight=vsam
Quote: | Can u give me JCL code for 1000 records passed from VSAM to DB2 |
There is no direct interface between VSAM and DB2 Via JCL. However you can code a Program which will read the vsam file and load/insert the records into a DB2 table.
Quote: | Is it possible in sort utility one input file and create two output file with ascending order and descending order |
If you are talking about creating 2 files in one single pass then you CANNOT create 2 files one with ascending order and the other with descending order
But you can run the sort step twice changing the sort fields order to create 2 files one with ascending order and the other with descending order. _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Brian Beginner
Joined: 12 Aug 2003 Posts: 95 Topics: 6
|
Posted: Fri Jul 30, 2004 5:40 am Post subject: |
|
|
Kapu,
Your first question as far as my understanding goes looks to insert records to a table from JCL. You can do this using DSNTEP2 for this purpose.
Code: |
//STEP EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(SYSTEM-NAME)
RUN PROGRAM(DSNTEP2) PLAN(DSNTEP2) -
LIB('****.RUNLIB.LOAD')
//*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
ENTER SQL STATEMENTS HERE
/*
//*
|
You can watch for your output in SYSPRINT |
|
Back to top |
|
 |
|
|