Posted: Thu Aug 11, 2011 3:08 am Post subject: SORT card for header trailor and detail record count
Hi,
I have one requirement wherina sort cord is required. Details are given belwo, please help me on this.
Inpuit file is like:
HDRabcd
89046gfhgf
89047hfttg
84533nhjhj
TRLhgjf
Ouput expecting in below format:
01abcd - for HDR record
05count - Total number of records including hdr,trl records followed by 'count' string
99 - for TRL record
I tried with belwo sort card bur result is not coming as desired, pls help me.
Code:
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=(1,1,CH,EQ,C'HDR'), * IF RECORD TYPE = 1
BUILD=(01:C'HDR', * RECORD TYPE
04:DATE4, * DATE
23:218X)) * FILLED WITH SPACES
OUTFIL REMOVECC,
TRAILER1=(C'TRL',COUNT=(EDIT=(TTTTTTTT)))
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