View previous topic :: View next topic
|
Author |
Message |
mvkumar22 Warnings : 1 New User
Joined: 26 Dec 2007 Posts: 8 Location: Chennai
|
|
|
|
Can anyone please explain to me about Load utility in Cobol with Sample code?
Regards,
Vijay
Note: Please skip to bottom |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
mvkumar22 wrote: |
Can anyone please explain to me about Load utility in Cobol with Sample code?
Regards,
Vijay |
If you are asking about the DB2 Load Utility it doesn't have anything to do with COBOL. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Are you attempting to dynamically LOAD an external module, such as a Static Assembler Table?
If your compiler version/release is COBOL/370 or greater (circa early 1990's), then review PROCEDURE POINTER.
PROCEDURE POINTER can be used as a substitute for a dynamically called Assembler sub-program which issues an MVS LOAD Macro.
However, PROCEDURE POINTER < C A N N O T > be used in CICS. Instead, use the CICS LOAD PROGRAM API.
HTH....
Regards,
Bill |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello Vijay,
As you have seen from the replies, your question is not clear.
If you explain what you actually need to do (rather than just mentioning LOAD and COBOL), we should be able to offer suggestions.
Some thoughts (including those above) - DB2 load, vsam load, load an array, load an executable, some other database load. . .
The more info you can provide, the better. |
|
Back to top |
|
|
mvkumar22 Warnings : 1 New User
Joined: 26 Dec 2007 Posts: 8 Location: Chennai
|
|
|
|
Hi,
How to load from a flat file to table?
Thanx,
Vijay |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
If you want to use COBOL to load data from a flat file to a table, write code to read the flat file, format the data apropriately, and INSERT rows into the table from the records read. |
|
Back to top |
|
|
rag swain
New User
Joined: 17 Dec 2007 Posts: 33 Location: pune,INDIA
|
|
|
|
I hope this is regarding loading of table in COBOL not DB2. As Dick, suggests, you have to read the flat file and format/process data according to your need, then put those into tables in a loop using index for that table. But Before all these, don't forget to initialize the table. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
How to load from a flat file to table? |
Yet more clarification needed. . .
Would this be a database table or an in-core table (array) that is part of your program?
Keep in mind that until "most" understand the requirement, it is nearly impossible to offer implementation suggestions/alternatives. |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
mvkumar22 wrote: |
Hi,
How to load from a flat file to table?
Thanx,
Vijay |
the doubt is... what do you mean by table?
a db2 table or an internal cobol table (=occurs)? |
|
Back to top |
|
|
mvkumar22 Warnings : 1 New User
Joined: 26 Dec 2007 Posts: 8 Location: Chennai
|
|
|
|
Hi,
I would like to load data into DB2 table from a flat file using Load utility and not using INSERT. Plz send me sample code for uitility.......
Thanx in Advance
Vijay |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
What's wrong with the fine manual? (Guess what, there are even examples in there...)
O. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
If you had more clearly posted your requirement days ago, you would already have your answer. Mentioning load and COBOL led most of us to believe you were working with COBOL. Now you mention that you don't want to use INSERT.
If you want to use db2's load, there are multiple examples n the DB2 forum.
I'll also move your topic to that forum as you will probably get more and better responses. |
|
Back to top |
|
|
mvkumar22 Warnings : 1 New User
Joined: 26 Dec 2007 Posts: 8 Location: Chennai
|
|
|
|
Hi,
Thanq........... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
You're welcome
Have you been able to find an exaple that will work for you? |
|
Back to top |
|
|
|