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.