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
 

 

Copy records from table to File using REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
sakrat

Active User


Joined: 05 Feb 2014
Posts: 159
Location: India

PostPosted: Tue Jun 23, 2015 1:23 pm    Post subject: Copy records from table to File using REXX
Reply with quote

Hi,

I am doing one tool where the records from the table will be copied to the PS file and inturn this ps file will be used to paste the records to the destination table.

The user will specify the Schema, region and the table name of the source and destination in the PANEL.

Then the REXX connects with DB2 and retrieves the records from the source table specified and then pastes into the destination table specified.

The reason that I do it using REXX instead of Load and Unload job is that the tool should be used by any environment of the mainframe and if JCL is used the coding standards and the way the JCL written by each one may differ. The destination region may change in the future as well.

So far I have created the PANEL for the user to enter the details and at the backend created a REXX code to connect to the DB2.

The problem that I am facing now is the file that is created with records looks different from the file that is obtained when unloading from the same table. (i.e) the column positions of the each field is differing.

Is there any way that I get same kind of file while doing in REXX similar to the one when using unload job.

Help needed please....

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

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Tue Jun 23, 2015 1:48 pm    Post subject: Reply to: Copy records from table to File using REXX
Reply with quote

Quote:
Is there any way that I get same kind of file while doing in REXX similar to the one when using unload job.


certainly yes...
since You are in charge
find the format used to write the <unloaded> thing
and modify Your Rexx script accordingly
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm


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