compare each record



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

compare each record

Postby shyamsaravan » Thu Jun 19, 2014 10:54 pm

Hi,

We have one PS file and has to compare each record one by one

RECFM=FB
LRECL=211

Compare key 1-127

I separated the sample data which is in the file for different scenario

WE have to check the date field (from 8----9)
so we need to take least date record and has to check each record
,if there is no change other than date, we can move the first record to
matched file
Ex1:

1---5---------------0----5--8-------9-----1--------211
KAKKBDRR-HRED-SA     W1W1E102012-09-09W1W1ESAMPLE
KAKKBDRR-HRED-SA     W1W1E102013-03-19W1W1ESAMPLE
KAKKBDRR-HRED-SA     W1W1E102014-05-29W1W1ESAMPLE
KAKKBDRR-HRED-SA     W1W1E102014-09-09W1W1ESAMPLE
KAKKBDRR-HRED-SA     W1W1E102014-12-11W1W1ESAMPLE


Valid record(no change other than date)matched file
KAKKBDRR-HRED-SA     W1W1E102012-09-09W1W1ESAMPLE

Ex2:
L1L1L-REDER-SS       RREWR102013-12-31RREWRSAMPLE
L1L1L-REDER-SS       RREWR102014-02-23RREWRSAMPLE
L1L1L-REDER-SS       RREWR102014-06-30RREWRSAMPLE
L1L1L-REDER-SS       RREWR102015-02-13RREWRSAMPLE


Valid record(no change other than date)matched file
L1L1L-REDER-SS       RREWR102013-12-31RREWRSAMPLE

Ex3:
M2M2M-XX12X4T-RERT   TREAD102009-11-12TREADSAMPLE
M2M2M-XX12X4T-RERT   TREAD102013-01-12TREADSAMPLE
M2M2M-XX12X4T-RERT   TREAD052013-04-12TREADSAMPLE
M2M2M-XX12X4T-RERT   EWERD052013-04-12EWERDSAMPLE
M2M2M-XX12X4T-RERT   TWTET102014-12-12TWTETSAMPLE

Valid record(changes in numbers and text)matched file
M2M2M-XX12X4T-RERT   TREAD102009-11-12TREADSAMPLE
M2M2M-XX12X4T-RERT   TREAD052013-04-12TREADSAMPLE
M2M2M-XX12X4T-RERT   EWERD052013-04-12EWERDSAMPLE
M2M2M-XX12X4T-RERT   TWTET102014-12-12TWTETSAMPLE



Ex4:
QQQERASCD-TYRV3T-SA  XXXXX102014-03-11XXXXXSAMPLE
QQQERASCD-TYRV3T-SA  XXXXX102014-09-10YYYYYSAMPLE

Valid record(changes from XXXXX to YYYYY)matched file
QQQERASCD-TYRV3T-SA  XXXXX102014-03-11XXXXXSAMPLE
QQQERASCD-TYRV3T-SA  XXXXX102014-09-10YYYYYSAMPLE


for better visibility only i am splitting the records from one file,My file would be below like this
1---5---------------0----5--8-------9-----1--------211
KAKKBDRR-HRED-SA     W1W1E102012-09-09W1W1ESAMPLE
KAKKBDRR-HRED-SA     W1W1E102013-03-19W1W1ESAMPLE
KAKKBDRR-HRED-SA     W1W1E102014-05-29W1W1ESAMPLE
KAKKBDRR-HRED-SA     W1W1E102014-09-09W1W1ESAMPLE
KAKKBDRR-HRED-SA     W1W1E102014-12-11W1W1ESAMPLE
L1L1L-REDER-SS       RREWR102013-12-31RREWRSAMPLE
L1L1L-REDER-SS       RREWR102014-02-23RREWRSAMPLE
L1L1L-REDER-SS       RREWR102014-06-30RREWRSAMPLE
L1L1L-REDER-SS       RREWR102015-02-13RREWRSAMPLE
M2M2M-XX12X4T-RERT   TREAD102009-11-12TREADSAMPLE
M2M2M-XX12X4T-RERT   TREAD102013-01-12TREADSAMPLE
M2M2M-XX12X4T-RERT   TREAD052013-04-12TREADSAMPLE
M2M2M-XX12X4T-RERT   EWERD052013-04-12EWERDSAMPLE
M2M2M-XX12X4T-RERT   TWTET102014-12-12TWTETSAMPLE
QQQERASCD-TYRV3T-SA  XXXXX102014-03-11XXXXXSAMPLE
QQQERASCD-TYRV3T-SA  XXXXX102014-09-10YYYYYSAMPLE


Please help me how to do in JCL SORT
shyamsaravan
 
Posts: 40
Joined: Tue May 11, 2010 7:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: compare each record

 

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post