Adding an extension to one record in an input file



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Adding an extension to one record in an input file

Postby Steven Shroyer » Wed Jul 29, 2015 1:24 am

Following the original requirements, I created a report which shows all events processed in the current or previous day. If any event was in progress when the report runs, it creates a seperate entry for the last transaction processed at the end of the file (used a seperate step and MOD on the file). This could be 2 seperate files if that makes things easier. What I am trying to do, due to an updated request, is add that last transaction record to the end of the line with a MTHD_CD of 'I'. Below is sample data.

+------------------------------------------------------------------- 
| MATCHING_EVENT_ID |        LAST_MNT_TS         | STATUS | MTHD_CD   
+------------------------------------------------------------------- 
1_|  1111111111111    | 2016-03-25-12.58.13.994260 | C      | 4       
2_|  2222222222222    | 2016-03-25-12.58.22.093537 | C      | 4       
3_|  3333333333333    | 2016-03-25-13.53.48.501055 | C      | 2       
4_|  4444444444444    | 2016-03-26-11.24.44.075004 | I      | 2       
+------------------------------------------------------------------- 
+--------------------------------------------------------+           
| CUST_ID  |    TRANS_ID    |        LAST_MNT_TS         |           
+--------------------------------------------------------+           
1_|    319   |  16086000708   | 2016-03-26-11.24.57.184656 |         
+--------------------------------------------------------+           


I would like this to read as follows, if possible (created by moving the second column headers to the end of the original column header row and the transaction record to the end of the event row with a STATUS of 'I'). I have looked at using JOINKEYS or going the ICETOOL route rather than syncsort but have not been able to figure out anything that would work yet. Any ideas would be greatly appreciated. LRECL is 133 for the file.

+-------------------------------------------------------------------+--------------------------------------------------------+   
| MATCHING_EVENT_ID |        LAST_MNT_TS         | STATUS | MTHD_CD   | CUST_ID  |    TRANS_ID    |        LAST_MNT_TS         |
+-------------------------------------------------------------------+--------------------------------------------------------+   
1_|  1111111111111    | 2016-03-25-12.58.13.994260 | C      | 1       
2_|  2222222222222    | 2016-03-25-12.58.22.093537 | C      | 1       
3_|  3333333333333    | 2016-03-25-13.53.48.501055 | C      | 2       
4_|  4444444444444    | 2016-03-26-11.24.44.075004 | I      | 2   |   999   |  123456789012   | 2016-03-26-11.24.57.184656 |
+-------------------------------------------------------------------+--------------------------------------------------------+
 
Steven Shroyer
 
Posts: 1
Joined: Wed Jul 29, 2015 1:07 am
Has thanked: 0 time
Been thanked: 0 time

Re: Adding an extension to one record in an input file

 

Re: Adding an extension to one record in an input file

Postby BillyBoyo » Wed Jul 29, 2015 12:07 pm

You'll need to show your existing code.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post