MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to pass to insert records to DB2 from Jcl

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
kappurajesh
Beginner


Joined: 29 Mar 2004
Posts: 19
Topics: 13
Location: India

PostPosted: Thu Jul 29, 2004 9:12 am    Post subject: How to pass to insert records to DB2 from Jcl Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger
NutCracker
Beginner


Joined: 13 Dec 2002
Posts: 45
Topics: 3
Location: 3rd Block from the SUN

PostPosted: Thu Jul 29, 2004 9:18 am    Post subject: Reply with quote

Whoa! Hold On.
One at a time, please
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Thu Jul 29, 2004 9:27 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Brian
Beginner


Joined: 12 Aug 2003
Posts: 95
Topics: 6

PostPosted: Fri Jul 30, 2004 5:40 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group