View previous topic :: View next topic
Author
Message
sathyaraj New User Joined: 28 Sep 2007Posts: 71 Location: India.
Hi Frank..
Am at the verge of completing my task and am waiting to get the solution from you.. Can you please suggest me with some idea..?
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Sorry, I missed your post on 11/01.
If you want a sequence number, you can add an OUTREC statement like this:
Code:
OUTREC OVERLAY=(51:SEQNUM,3,ZD)
and then use that sequence number in the TRAILER3 -
Back to top
sathyaraj New User Joined: 28 Sep 2007Posts: 71 Location: India.
HI..
I tried to use the logic... but something went wrong badly... am getting such an O/P
Code:
0528. 0035664 = 64 | 125
9147. 0036805 = 83948 | 64671
4689. 0037625 = 5853 | 9689
5837. 0037868 = 485 | 663
Can you plz tell me why its happening this way..?
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Hmmm ... it's been so long, I forgot what we were doing. I guess we're creating trailer records and so you need sequence numbers for the trailer records rather than for the output records. TRAILERx doesn't allow SEQNUM, so I guess you'll have to run the output of the original report back through DFSORT to add the sequence numbers.
So the step to produce the report with the trailer records would have a temp file as its output and you'd use that for input to another step that would have:
Code:
INREC BUILD=(SEQNUM,3,ZD,1,n)
or you could leave room for the SEQNUM in the first step with TRAILER3=(5:...) and then use this in the second step:
Code:
INREC OVERLAY=(1:SEQNUM,3,ZD)
Back to top
sathyaraj New User Joined: 28 Sep 2007Posts: 71 Location: India.
K..I ll give a try.. Actually the purpose of numbering is to find the number of records in teh final O/P..
So i tried to do it this way..
Code:
INREC IFTHEN=(WHEN=INIT,OVERLAY=(236:C'0',249:C'1')),
IFTHEN=(WHEN=(195,2,CH,EQ,C'EE'),OVERLAY=(236:C'1',249:C'0')),
IFTHEN=(WHEN=(195,2,CH,EQ,C'RR'),OVERLAY=(236:C'1',249:C'0'))
SORT FIELDS=(1,7,CH,A)
OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(250:C'0')),
IFTHEN=(WHEN=(1,2,CH,EQ,C' ',AND,7,1,CH,NE,C' '),
OVERLAY=(250:C'1'))
OUTFIL REMOVECC,NODETAIL,
HEADER1=(2:'CUSTOMER NUMBER ',25:'EMP',31:'|',37:'DEP',/,
1:'---------------------------------------',/,
'NUMBER OF CUSTOMERS =',TOT=(250,1,ZD,M10,LENGTH=4),/,
____________________________
1:'---------------------------------------'),
BUILD=(80X),
SECTIONS=(1,7,
TRAILER3=(' ',1,7,' = ',
20:TOT=(236,1,ZD,M10,LENGTH=8),' |',
32:TOT=(249,1,ZD,M10,LENGTH=8)))
And its giving ICE223A F REPORT FIELD ERROR
Cant we use the overlay in the OUTREC to find the count of the O/P file..
I have given an underscore where the error msg is thrown..
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
The ICE223A points to TOT in HEADER1. TOT can only be used in TRAILERx, not in HEADERx.
Back to top
sathyaraj New User Joined: 28 Sep 2007Posts: 71 Location: India.
Yes.. Thats working great.. Thnx a lot for your tremendous support..
Got a great learning from Frank.. Thnx once again.
Back to top
Please enable JavaScript!