I am sorting some data using temp area in 3000 byes thru 15 bytes.
I am able to achieve the sorting that I need.
But when I am writing the output 2004 VB file.
(i) either I am getting error or (ii) it has lost te lrecl that it had before and fills with spaces from the input lrecl to 2004.
Here are the smaples that I tried and errors that received. And also the successful one.
(A)
SORT FIELDS=(3005,4,CH,A,3014,2,CH,A,3012,2,CH,A)
INREC IFTHEN=(WHEN=INIT,OVERLAY=(3012:C'0000',3009:SEQNUM,3,ZD,
RESTART=(18,10),
3016:1,2,BI,EDIT=(TTTT),3,2,BI,EDIT=(TTTT))),
.
.
OUTREC FIELDS=(1:3016,4,5:5)
ERROR : WER235A OUTREC RDW NOT INCLUDED
INREC IFTHEN=(WHEN=INIT,OVERLAY=(3012:C'0000',3009:SEQNUM,3,ZD,
RESTART=(18,10),
3016:1,2,BI,EDIT=(TTTT),3,2,BI,EDIT=(TTTT))),
.
.
OUTREC FIELDS=(1:3016,4,5:5)
ERROR : WER235A OUTREC RDW NOT INCLUDED
//////////////////////////////
(B)
SORT FIELDS=(3005,4,CH,A,3014,2,CH,A,3012,2,CH,A)
INREC IFTHEN=(WHEN=INIT,OVERLAY=(3012:C'0000',3009:SEQNUM,3,ZD,
RESTART=(18,10),
3016:1,2,BI,EDIT=(TTTT),3,2,BI,EDIT=(TTTT))),
.
.
OUTFIL BUILD=(1:3016,4,5:5)
ERROR : SORTOUT OUTREC RDW NOT INCLUDED
INREC IFTHEN=(WHEN=INIT,OVERLAY=(3012:C'0000',3009:SEQNUM,3,ZD,
RESTART=(18,10),
3016:1,2,BI,EDIT=(TTTT),3,2,BI,EDIT=(TTTT))),
.
.
OUTFIL BUILD=(1:3016,4,5:5)
ERROR : SORTOUT OUTREC RDW NOT INCLUDED
////////////////////////////////
(C)
SORT FIELDS=(3005,4,CH,A,3014,2,CH,A,3012,2,CH,A)
INREC IFTHEN=(WHEN=INIT,OVERLAY=(3012:C'0000',3009:SEQNUM,3,ZD,
RESTART=(18,10),
3016:1,2,BI,EDIT=(TTTT),3,2,BI,EDIT=(TTTT))),
.
.
OUTFIL BUILD=(1:1,4,5:5)
ERROR : WER247A SORTOUT HAS INCOMPATIBLE LRECL
INREC IFTHEN=(WHEN=INIT,OVERLAY=(3012:C'0000',3009:SEQNUM,3,ZD,
RESTART=(18,10),
3016:1,2,BI,EDIT=(TTTT),3,2,BI,EDIT=(TTTT))),
.
.
OUTFIL BUILD=(1:1,4,5:5)
ERROR : WER247A SORTOUT HAS INCOMPATIBLE LRECL
///////////////////////////////
(D)
SORT FIELDS=(3005,4,CH,A,3014,2,CH,A,3012,2,CH,A)
INREC IFTHEN=(WHEN=INIT,OVERLAY=(3012:C'0000',3009:SEQNUM,3,ZD,
RESTART=(18,10),
3016:1,2,BI,EDIT=(TTTT),3,2,BI,EDIT=(TTTT))),
.
.
OUTFIL BUILD=(1,2004)
ERROR : SORTOUT HAS INCOMPATIBLE LRECL
INREC IFTHEN=(WHEN=INIT,OVERLAY=(3012:C'0000',3009:SEQNUM,3,ZD,
RESTART=(18,10),
3016:1,2,BI,EDIT=(TTTT),3,2,BI,EDIT=(TTTT))),
.
.
OUTFIL BUILD=(1,2004)
ERROR : SORTOUT HAS INCOMPATIBLE LRECL
///////////////////////////////
(E)
SORT FIELDS=(3005,4,CH,A,3014,2,CH,A,3012,2,CH,A)
INREC IFTHEN=(WHEN=INIT,OVERLAY=(3012:C'0000',3009:SEQNUM,3,ZD,
RESTART=(18,10),
3016:1,2,BI,EDIT=(TTTT),3,2,BI,EDIT=(TTTT))),
.
.
OUTREC FIELDS=(1,2000)
INREC IFTHEN=(WHEN=INIT,OVERLAY=(3012:C'0000',3009:SEQNUM,3,ZD,
RESTART=(18,10),
3016:1,2,BI,EDIT=(TTTT),3,2,BI,EDIT=(TTTT))),
.
.
OUTREC FIELDS=(1,2000)
RC : 00, but the lrecl of each record expanded to 2004.
ie if the third record was 250 bytes, input had nothing after pos 250, but now there is spaces in the output after 251.
Can some one please help me what am I doing wrong.
Thanks in advance
Aka.