Quote:
Originally Posted by
matrixmadhan
Sorry, I couldn't generalize the script with your input.
But made sure its working for the input provided.
Will it be possible to provide a snippet of the input where the script is actually corrupting the files, so that I could revisit the script ?
If u could just add these inlines to the input file...
SELECT FSORT ASSIGN SORTWK1.
* FICHIER SORT *
SD FSORT
77 FIN-FSORT PIC 9(1) COMP-3 VALUE 0. 88 FINFSORT VALUE 1.
* SORT PROCEDURE *
that should give u some clue..
I cant post the whole code online....
I will give u the code which is getting changed....
SELECT FSORT ASSIGN SORTWK1.
* FICHIER SORT *
SD FSORT
77 FIN-FSORT PIC 9(1) COMP-3 VALUE 0.
88 FINFSORT VALUE 1.
77 CTR-FSORT-LUS PIC 9(9) COMP-3 VALUE ZERO.
77 CTR-FSORT-ECR PIC 9(9) VALUE ZERO.
* SORT PROCEDURE *
SORT FSORT ASCENDING KEY FS-KEY
IF SORT-RETURN NOT = ZERO
MOVE 'FSORT' TO FICH
ADD 1 TO CTR-FSORT-ECR.
ADD 1 TO CTR-FSORT-ECR
RETURN FSORT
MOVE 1 TO FIN-FSORT.
PERFORM LECT-FSORT
THRU LECT-FSORT-EXIT.
UNTIL FINF60UH2 AND FINFSORT.
PERFORM LECT-FSORT
THRU LECT-FSORT-EXIT.
LECT-FSORT.
MOVE 1 TO FIN-FSORT
PERFORM CUMUL-FSORT
THRU CUMUL-FSORT-EXIT
LECT-FSORT-EXIT.
* CUMUL-FSORT *
CUMUL-FSORT.
ADD 1 TO CTR-FSORT-LUS.
RETURN FSORT
CUMUL-FSORT-EXIT.
I if can just append these lines to input.... U shoule be able to see...