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
 

 

Import data from database and write to flatfile

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Import data from database and write to flatfile
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    Post subject:
Reply with quote

i wld copy and paste them icon_idea.gif
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: Wed Jan 21, 2009 8:39 am    Post subject:
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    Post subject: Import data from database and write to flatfile
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

Site Director


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

PostPosted: Wed Jan 21, 2009 9:53 am    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Wed Jan 21, 2009 12:37 pm    Post subject: Reply to: Import data from database and write to flatfile
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: 8593
Location: Back in jolly old England

PostPosted: Wed Jan 21, 2009 4:37 pm    Post subject:
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    Post subject: Reply to: Import data from database and write to flatfile
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    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 Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts Write R1 and R2 to OP1 and R1 to OP2 bhaskar_kanteti DFSORT/ICETOOL 10 Fri Mar 03, 2017 11:18 am


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