Joined: 08 Jun 2006 Posts: 45 Location: Trumbull, CT
Hi All,
I have a VB file with LRECL=300. The minimum record length in the dataset is 46. I need to filter on the condition in the dataset at 13th position to be '030'. And on these records I need this specific OUTREC. OUTREC FIELDS=(1,12,36,16). I need my output file to be in FB format.
For getting my above work done i have used two sort steps.
Step 1. For converting the 300 length VB file to 304 length FB file by
Code:
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOUT1,VTOF,
OUTREC=(1:1,304)
END
Step 2. For getting my output in needed format.
Code:
SORT FIELDS=(40,16,CH,A,5,12,CH,A)
SUM FIELDS=NONE
INCLUDE COND=(17,3,BI,EQ,X'F0F3F0')
OUTREC FIELDS=(5,12,40,16)
So I am using two sort steps(one for converting VB to FB & other for getting the desired output in FB) for a single work. I believe we can do this in one single sort step or ICETOOL step.
I searched through the forum but not able to find a solution.