I seem to have missed whatever note this is replying to - but does this
handle both
WITH DUPLICATES
and
COLLATING SEQUENCE clauses?
Also, what (if anything) does this do with INPUT/OUTPUT procedures?
If you "implement" a simple (Using/Giving - native collating sequence -
only) SORT, then I suggest that you add a compile-time message "warning"
that other phrases are "currently ignored"
P.S. There is a VERY obscure rule in the ANSI Standard (that some compiler
ignore and most programmers do NOT know about) which states that you "must"
go to a File Declarative in the middle of a SORT - should the "condition"
specified in the DECLARATIVE occur anywhere during the SORT. Just thought I
would mention this - so you might want to "design" around this.
> -----Original Message-----
> From: cob...@li...
> [mailto:cob...@li...]On Behalf Of Tim
> Josling
> Sent: Tuesday, December 26, 2000 4:28 AM
> To: Tim Josling
> Cc: cobolforgcc-devel
> Subject: [Cobolforgcc-devel] Sort definition
>
>
> Ted,
>
> How about this for the basic in core sort? You could do it in one
> call but then you would need to reanalyze the sort field details
> for each buffer full of records.
>
> Regards,
> Tim Josling
>
> /* set up for one or more sorts */
>
> enum cobr_sort_status_enum
> cobr_basic_sort_init
> (
> UINT32 sort_field_count,
> struct sort_field_desc* sort_fields,
> UINT8* collating_sequence /* 256 bytes in order for text field
> sort or NULL */
> );
>
> /* do a sort */
>
> enum cobr_sort_status_enum
> cobr_basic_sort(
> void * handle,
> UINT32 record_count,
> void** records,
> UINT32* record_lengths);
>
> /* free the memory etc */
>
> enum cobr_sort_status_enum
> cobr_basic_sort_wrap(void * handle);
>
> struct sort_field_desc
> {
> UINT32 offset;
> UINT32 length;
> UINT32 decimals;
> UINT32 type;
> UINT32 flags;
> };
>
> enum cobr_sort_status_enum
> { /* sample only */
> cobr_sort_status_OK=0,
> cobr_sort_status_invalid_key_definitions,
> cobr_sort_status_record_too_short,
> ...etc...
> };
>
> <end>
>
>
>
> _______________________________________________
> Cobolforgcc-devel mailing list
> Cob...@li...
> http://lists.sourceforge.net/mailman/listinfo/cobolforgcc-devel
|