IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Import data from database and write to flatfile


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nvgroups

New User


Joined: 05 Dec 2006
Posts: 5
Location: Hong Kong

PostPosted: Wed Jan 21, 2009 7:46 am
Reply with quote

I need to import large amount of data (upto 30k+ records) using DB2 data sent from database. Database does not exist on the Mainframe. I receive data from DBA in the form of text files. I need to extract data from these text files using table joins and select conditions. Output is required in a flatfile. I cannot use VSAM though. What is the best way to receive these input files and write output file. All suggestions are welcome!

Thanks
Back to top
View user's profile Send private message
nvgroups

New User


Joined: 05 Dec 2006
Posts: 5
Location: Hong Kong

PostPosted: Wed Jan 21, 2009 8:07 am
Reply with quote

i wld copy and paste them icon_idea.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jan 21, 2009 8:39 am
Reply with quote

Hello and welcome to the forum,

Quote:
I need to extract data from these text files using table joins and select conditions.
Probably not. . .

How many files are there to be processed? Why not run the queries to join the data on the system where they are in a database?

The "best" way to receive the files is probably via ftp as ftp is the most common.

If you better describe the requirement, someone may have suggestions.
Back to top
View user's profile Send private message
nvgroups

New User


Joined: 05 Dec 2006
Posts: 5
Location: Hong Kong

PostPosted: Wed Jan 21, 2009 8:54 am
Reply with quote

The source system does not support joins and select queries. Source system will provide all the data existing in the tables. The input files are received via ftp to Mainframe. My assignment is to 'select' required data from the input files and join with other related files and write output to a combined file. This has to be performed on the Mainframe.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jan 21, 2009 9:53 am
Reply with quote

Hello,

You still have not described the requirement. . .

How may files are there? How many fields? How is the data to be "joined"?

What should the output look like? How much data volume is there in each file?

If you cannot describe the requirement, the best we may be able to offer is "write the needed code to create the needed output". The better detail you provide the more useful suggestions you will receive.

If the mainframe also runs db2 is there some reason the data cannot be loaded into mainframe tables and the output created by processing those tables?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jan 21, 2009 12:37 pm
Reply with quote

Quote:
I need to import large amount of data (upto 30k+ records) using DB2 data sent from database
Quote:
The source system does not support joins and select queries


the two statement contradict each other
take a decision... does the source data come from DB2 or not ???
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jan 21, 2009 4:37 pm
Reply with quote

With SAS you can create SAS files and use PROC SQL as if they were DB2 tables.

If you have SAS available that may be your best bet.
Back to top
View user's profile Send private message
Shashank.kapoor

New User


Joined: 14 Jan 2009
Posts: 24
Location: Mumbai

PostPosted: Wed Jan 21, 2009 6:15 pm
Reply with quote

Hi,
As per my understanding you need to concate the records of two different files into one record. Please correct me If I am wrong.

If this is the case then you can use SPLICE in JCL. SPLICE is a ICETOOL facility.

Thanks & Regards,
Shashank Kapoor
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 5
No new posts Store the data for fixed length COBOL Programming 1
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
Search our Forums:

Back to Top