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
 

 

Sample cobol program for database load

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sripriya

New User


Joined: 19 Apr 2005
Posts: 26

PostPosted: Mon Mar 20, 2006 10:44 am    Post subject: Sample cobol program for database load
Reply with quote

Hi all,

1. I need a sample cobol program which takes in the data from the file, reformats it and loads it into the database.
2. Also need a sample cobol program which converts the date from one format to another.



Thanks in advance,
Sripriya.
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


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

PostPosted: Mon Mar 20, 2006 10:47 am    Post subject: Re: Sample cobol program for database load
Reply with quote

sripriya,

Quote:
1. I need a sample cobol program which takes in the data from the file, reformats it and loads it into the database.

Loads into which Database ?????

Quote:
2. Also need a sample cobol program which converts the date from one format to another.

Pls give an example...which format to another ???

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

New User


Joined: 19 Apr 2005
Posts: 26

PostPosted: Tue Mar 21, 2006 10:17 am    Post subject: Re: Sample cobol program for database load
Reply with quote

Hi,

To explain it in brief.
There is a unix server with the files. The data in the files should be uploaded into the mainframe database. The file in the unix server has to be ftped into the mainframe file, this file is to be read first and then the data in the file has to be reformatted using syncsort and then it should be loaded into the mainframe DB2 database. In short the unix database is to be converted to mainframe database.


Sripriya.
Back to top
View user's profile Send private message
cheryala

New User


Joined: 20 Mar 2006
Posts: 46

PostPosted: Tue Mar 21, 2006 11:19 am    Post subject: Re: Sample cobol program for database load
Reply with quote

Hi Sripriya,

For loading a formated data from a file into database table ..i don't think a cobol program is needed until you are going to do some enrichment of the records..You can use IBM supplied utilities to load the data in file to a table ..

Please let me know if you have any concerns..

Cheers
RSC
Back to top
View user's profile Send private message
aru_bec

New User


Joined: 23 Dec 2005
Posts: 19
Location: Bangalore

PostPosted: Tue Mar 21, 2006 11:21 am    Post subject: Re: Sample cobol program for database load
Reply with quote

Sripriya,

U can use the following JCL to FTP file from Unix to Maiframe

//FTPJOB1 JOB
//MYFTP EXEC PGM=FTP,PARM='(EXIT'
//SYSPRINT DD SYSOUT=*
//MYDD DD DSN=INPUTFILE,
// DISP=(NEW,CATLG,DELETE),
// DCB=(As per requirement)
// SPACE=(As per requirement)
//OUTPUT DD SYSOUT=*
//INPUT DD *
Unix Server name
USer ID
Passwd
ascii
cd <location of the file , i mean directory>
get <filename> //DD:MYDD
quit
/*


Process the INPUTFILE using sort then using Cobol program load it to DB2.

Hope this helps you.

Regards,
Arvind
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm


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