Hi,
I found an issue when I try to use OUTREC FIELDS.
Example:
- input file: INPUT_FILE.txt
- sort condition: SORT FIELDS=COPY OUTREC FIELDS=(X'27',4,10,X'27',68C' ') END
- current output file: OUTPUT_FILE.txt
- expected output file: EXPECTED_FILE.txt
The error is that bytes from input file should be overwritten by the OUTREC FIELDS command.
Thank you.
Hello,
I solved the problem.
I am working on a new version of GCSort, to solve some malfunctions in the MinGW environment.
Changed the GCSort options test environment in Linux Fedora, MinGW, Windows.
I also added the OUTREC OVERLAY option.
By next Saturday I will be releasing the source package.
Thanks.
Sauro
Hi,
problem fixed in Commit [r889] GCSort.
Bye.
Sauro
Related
Commit: [r889]
Hi,
I have tested the fix for SORT FIELDS and it is working fine.
I have tested OUTREC OVERLAY and it doesn't work as expected for example:
gcsort USE BSEBIL06.txt ORG SQ RECORD F,114 GIVE SEMESTR ORG SQ RECORD F,116 " SORT FIELDS=COPY INREC OVERLAY=(115:X'10',116:X'10') END"
I get the attempt to reference unallocated memory (signal sigsegv) error while I expected new line and carriage return.
If I try gcsort USE BSEBIL06.txt ORG SQ RECORD F,114 GIVE SEMESTR ORG SQ RECORD F,116 " SORT FIELDS=COPY OUTREC OVERLAY=(115:X'10',116:X'10') END" the output file has NUL value.
If I try gcsort USE BSEBIL06.txt ORG SQ RECORD F,114 GIVE SEMESTR ORG SQ RECORD F,116 " SORT FIELDS=COPY OUTREC OVERLAY=(115:C'A',116:C'Z') END" the output file has the same NUL value.
Thank you.
Hi,
fixed problem OUTREC FIELDS bug and OUTREC OVERLAY.
I updated version in GCSort.
Thank you.
Sauro
Last edit: Simon Sobisch 2021-01-10
Hi,
I tested the updated version and INREC/ OUREC OVERLAY works fine .
Thank you very much.
Maksym.
Thank you for feedback.
One tips, if you want convert file organization, you can use gcsort with
input file SQ and ouput file LS (Line sequential).
Example:
USE inp002sq.sq ORG SQ RECORD F,100
GIVE inp002sq.txt ORG LS RECORD F,100
" SORT FIELDS=COPY END"
Bye.
Sauro
Thank you for the tip.
I have used it meanwhile INREC/OUTREC OVERLAY wasn't supported but it is limited only for this need.
Bye.
Maksym