View previous topic :: View next topic
|
Author |
Message |
sripriya
New User
Joined: 19 Apr 2005 Posts: 26
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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 |
|
|
sripriya
New User
Joined: 19 Apr 2005 Posts: 26
|
|
|
|
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 |
|
|
cheryala
New User
Joined: 20 Mar 2006 Posts: 46
|
|
|
|
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 |
|
|
aru_bec
New User
Joined: 23 Dec 2005 Posts: 19 Location: Bangalore
|
|
|
|
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 |
|
|
|