How to Export data from MainFrame to CSV



Post anything related to mainframes (IBM & UNISYS) if not fit in any of the above categories

How to Export data from MainFrame to CSV

Postby bhalchandra » Mon May 12, 2008 7:00 pm

Hi,

I am very new in mainframe, can anyone please guide me how to export data from mainframe to CSV file.
bhalchandra
 
Posts: 2
Joined: Mon May 12, 2008 6:57 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to Export data from MainFrame to CSV

 

Re: How to Export data from MainFrame to CSV

Postby dick scherrer » Mon May 12, 2008 9:19 pm

Hello bhalchandra and welcome to the forums,

To do what you want, you can STRING the data values separated by some delimiter (comma or tab or . . .) into an output field and write that output. This example uses the tab character (x'05'):
      STRING IDX               X'05'   
             RCD-TYPE          X'05'   
             DAT-TYPE-ALPHA    X'05'   
             DTL-CNT           X'05'   
             PLAN-NAME         X'05'   
             HDR-DATE          X'05'   
             PROV-DISPRO       X'05'   DELIMITED BY ''   
        INTO MY-OUT-REC.                             
  WRITE MY-OUT-REC.                             
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: How to Export data from MainFrame to CSV

Postby bhalchandra » Wed May 14, 2008 7:09 pm

It worked but i am not able to get all data in one file.

Its cuts to 65000 and can export more than 65000 even in CSV...

Do anyone knows why i am only getting 65000 records in my output file??
bhalchandra
 
Posts: 2
Joined: Mon May 12, 2008 6:57 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to Export data from MainFrame to CSV

Postby dick scherrer » Wed May 14, 2008 9:22 pm

Hello,

What do you mean by "export"? The process should read some input, STRING the desired output fields with delimiters between them, and WRITE a qsam record. I'm not clear about where export comes into the picture.

I have used this approach to create download ("export") files with many million records.

It may help if you post the relevant part of your code.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to All other Mainframe Topics

 


  • Related topics
    Replies
    Views
    Last post