Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 10327
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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Moving UDB database to Db2 on z/OS Keith Hooley DB2 4 Wed Sep 27, 2017 12:38 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us