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
 

 

Loading DB2 Session table in cobol program

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

New User


Joined: 27 Nov 2005
Posts: 15
Location: Phoenix

PostPosted: Thu Jan 15, 2009 1:11 pm    Post subject: Loading DB2 Session table in cobol program
Reply with quote

I want to load data from PS file to session table inside a cobol program through DB2 load utilities.

I want to use DB2 load utility as row by row load is affecting performace.

Could you please advise, if this is possible also if yes then what is syntax.
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: Thu Jan 15, 2009 8:50 pm    Post subject:
Reply with quote

Hello,

If you have a "loadable" sequential file, consider loading the table using the load utility directly. A straight load does not need a cobol program.

If validation of the data or summaries are needed, do this before and/or after the load, not during the load.
Back to top
View user's profile Send private message
atulxp

New User


Joined: 27 Nov 2005
Posts: 15
Location: Phoenix

PostPosted: Fri Jan 16, 2009 11:34 am    Post subject:
Reply with quote

I do not want to create permanent tables hence I want to use session tables & load data to session tables.

Session tables would be persistant inside program only so I want some quick load method which could be used in cobol program.
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Fri Jan 16, 2009 2:38 pm    Post subject:
Reply with quote

the session table would be created for the session where your program is executing ... now how to load this using an utility in between ? better read the file and insert in your table .... one way is create an array say 500 in number and read the data into this array and then use multi-insert to insert all 500 at a time to the table ...this will be much faster than row by row insert ...
Back to top
View user's profile Send private message
atulxp

New User


Joined: 27 Nov 2005
Posts: 15
Location: Phoenix

PostPosted: Fri Jan 16, 2009 4:43 pm    Post subject:
Reply with quote

I want to invoke DSNUTILS inside cobol program. I could get example where RUNSTAT was done inside cobol program using DSNUTILS however I want for Load also want to know, if DSNUTILS allow load in session table.
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
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm


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