Menu

#1238 GCSORT

contrib
accepted
GCSORT (12)
5 - default
5 days ago
2026-08-01
No

GCSORT
gcsort Version 01.04.11

NOEQUALS should be a valid token - it is rejected
EQUALS should be a valid token - it is rejected
OPTION Y2PAST=1951 EQUALS is accepted with a warning about EQUALS
The diagnostic is objecting to ???? "near" - near what ?

USE C:\WINZOS\DATA\SORTIN01.DAT RECORD F,00400 ORG SQ
USE C:\WINZOS\DATA\SORTIN02.DAT RECORD F,00400 ORG SQ
USE C:\WINZOS\DATA\SORTIN03.DAT RECORD F,00400 ORG SQ
GIVE C:\WINZOS\ZOSICF\S2121318.DAT RECORD F,00400 ORG SQ
OPTION NOEQUALS
SORT FIELDS=(1,6,Y2C,D,3,4,CH,D,7,12,CH,A)
OMIT COND=(3,1,CH,EQ,C'1')
SUM FIELDS=NONE

========================================================

Error : syntax error, unexpected STRING
Error near element : NOEQUALS

SORT ERROR
TOKEN RECORD TYPE

Discussion

  • Simon Sobisch

    Simon Sobisch - 2026-08-01
    • status: open --> accepted
    • assigned_to: Sauro Menna
    • Group: invalid --> contrib
     
  • Simon Sobisch

    Simon Sobisch - 2026-08-01
     
  • Sauro Menna

    Sauro Menna - 7 days ago

    The problem is the NOEQUALS parameter.
    There was an issue with how the “Skipped” parameters were handled.
    This parameter is skipped in GCSort because the order is determined during the read phase, and the output always follows the read order—just like in a FIFO queue.
    Currently, the OPTION values that are skipped are:
    REMOVECC, CONVERT, EQUALS, NOEQUALS, NODETAIL

    I’ll update the GCSort version in a few days.

     
  • Ralph Linkletter

    Sauro is the default behavior EQUALS ?
    That is that the order of identical keys is preserved ?

    In zOS the default is NOEQUALS

    The preferred defaults would be EQUALS - IMO

     
    • Simon Sobisch

      Simon Sobisch - 6 days ago

      EQUALS is implied within libcob as default, and I think GCSORT uses that part under the hood.

       
      • Ralph Linkletter

        Simon I was speaking of sort keys.
        Are you speaking of index file keys ?
        Sort has to work a wee bit more to accommodate duplicate keys in a record sequential file.

        I do not think that libcob would understand that SORT FIELDS=(393,4,Y2P,A) is the object of a sort key in a record sequential file. GCSORT does for sure :-)

        Of course I could be wrong :-)

         
  • Sauro Menna

    Sauro Menna - 5 days ago

    Hi,
    EQUALS and NOEQUALS are not supported in the current version of GCSort. The option is ignored.
    The output sort is always handled in a way that preserves the read order. It’s as if the EQUALS option were always applied.
    I’ve released a new version, as the previous one had some handling issues. The new version is 1.14.12b.
    Best regards,
    Sauro

     

Log in to post a comment.