FUNL0152 Attempt to UNLOAD (sibinfo) SORT or HASH field.

From m204wiki
Jump to navigation Jump to search

This message indicates that the FUEL program contained the UAI SORT or UAI HASH statement, and it also contained an UNLOAD statement with a field, and that field is either:

  1. the HASH field or the first SORT field (in this case the string sibinfo is omitted from the message).
  2. the field RELATED to the HASH field or the first SORT field (in this case the string sibinfo is is related to).

Since the unload process produces the HASH field (or in cases the first sort field) at the beginning of each record, the order of unloading that field cannot be changed.

For UAI HASH, you may not control the order of the HASH field, so you must not have an UNLOAD field statement (other than UNLOAD field(*)) which references the HASH field occurrence. For SORT, if you need to use the UNLOAD field statement and it may reference the first SORT field occurrence, you can use AS PLACED on the UAI statement, indicating that the field will not automatically be unloaded first.

If the UNLOAD field statement uses a %variable or a loop control variable as the occurrence, and you are sure that the value of that variable will not be the same as the HASH field or first SORT field, you may use AS FIRST on the UAI statement, which will cause that duplicate unloading to be checked at run time.