Link to home
Start Free TrialLog in
Avatar of Rudradev
RudradevFlag for India

asked on

In sort card of jcl, can we format the file and remove the duplicates at the same time?

In a JCL sort step i need to
1) format a file (for replacing spaces with zeros)
2) Remove the duplicates of it
Is it possible to execute both the above process in a single sort card.
SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rudradev

ASKER

Hi woolmilkporc:,

actually, I am shifting the value to right by some offset in the INREC FEILDS
and then using overlay function to replace the spaces with zeros in OUTREC
this is my code


SORT FIELDS=(1,35,CH,A)                 
INREC FIELDS=(1,35,SQZ=(SHIFT=RIGHT,MID=C'0'))             
OUTREC IFTHEN=(WHEN=(1,35,CH,EQ,C' '),OVERLAY=(35C'0')),   
IFTHEN=(WHEN=(1,34,CH,EQ,C' '),OVERLAY=(34C'0')),          
IFTHEN=(WHEN=(1,33,CH,EQ,C' '),OVERLAY=(33C'0')),          
IFTHEN=(WHEN=(1,32,CH,EQ,C' '),OVERLAY=(32C'0')),          
IFTHEN=(WHEN=(1,31,CH,EQ,C' '),OVERLAY=(31C'0')),          
IFTHEN=(WHEN=(1,30,CH,EQ,C' '),OVERLAY=(30C'0')),          
IFTHEN=(WHEN=(1,29,CH,EQ,C' '),OVERLAY=(29C'0')),   
.
.
IFTHEN=(WHEN=(1,1,CH,EQ,C' '),OVERLAY=(1C'0')),
SUM FEILDS = NONE
/*

Open in new window

ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Did'nt get the answer from the experts

Anywaz got it myself