sijayapal
New User
Joined: 23 Dec 2008 Posts: 69 Location: India
|
|
|
|
Here is my requirement.
I have a file of length 756. We have to consider only 3rd column and 751,3 for squence number genereation.
The requirement is when the 751,3 value changes, the conter should be reset. And with in the same values of the 751,3.. only when the 3rd column has 'A' the counter should be incremented. Else the value should remain same.
The seq number is added at 4,8
I already arrived at a solution... but i am not clear
SORT FIELDS=(751,3,A,12,10,A),FORMAT=CH
OUTREC IFTHEN=(WHEN=(3,1,CH,EQ,C'A'),
OVERLAY=(4:SEQNUM,8,ZD,START=1,INCR=1,RESTART=(751,3))),
IFTHEN=(WHEN=(3,1,CH,EQ,C'B'),
OVERLAY=(4:SEQNUM,8,ZD,START=1,INCR=1,RESTART=(751,3)))
Here looking into the input file i arrived no values are populated at 3rd position except A and B. But this wont work if some other value comes at 3rd Position.
I need to keep this more generic. Pls help me with your suggestions. |
|
sijayapal
New User
Joined: 23 Dec 2008 Posts: 69 Location: India
|
|
|
|
IT DOESNT MATTER. oNLY THING MATTERS IS THE ONE MARKED BY X, XXX.
When XXX value changes, the counter should be restarted. When X=A, The counter should be incremented. |
|