Joined: 23 May 2016 Posts: 4 Topics: 2 Location: India
Posted: Mon Jul 04, 2016 1:40 pm Post subject: DFSORT: Can we convert Packed field on conditional basis
Hi,
I have an input file which has chars in column 1 to 5.
From column 139 to 141 (length 3) the data is in packed format, but for some records its spaces.
Similarly from column 142 to 144 (length 3) the data is in packed format, but again for some records the value is spaces.
I have to split the data in two files where in first file I want values from column 1-5 & from column 139 to 141 (in displayable format), but wherever its spaces in col 139 to 141, it should comes as spaces in output.
Similarly in second file I want values from column 1-5 & from column 142 to 144 (in displayable format), but wherever its spaces in col 142 to 144, it should comes as spaces in output.
My Sysin Card is below:
Code:
SORT FIELDS=(1,5,CH,A)
SUM FIELDS=NONE
OUTFIL FILES=01,BUILD=(1,5,2X,139,3,PD,EDIT=(IIIIT),C',',1X)
OUTFIL FILES=02,BUILD=(1,5,2X,142,3,PD,EDIT=(IIIIT),C',',1X)
But wherever there ares] spaces in column 139 to 141 & col 142 to 144, it is coming as character 40404.
Is there any way to convert that Packed field on conditional basis?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum