UNLOAD

<< Click to Display Table of Contents >>

Navigation:  Reference > Commands >

UNLOAD

The form of the UNLOAD command is:

UNLOAD TO buffer,

The UNLOAD command is used at the Data Stage to move the contents of buffer 0 into the specified buffer. It is typically used in conjunction with the READ command. The buffer must be within the range specified in the CARD NUMBERS command.

UNLOAD performs explicitly the operation that the automatic unloading feature performs on each card of a record. It assumes that the card to be unloaded has been read into buffer 0 ($1-80). It is used when the automatic feature cannot for some reason be used; for example, if the card-type identifier contains V, X or multi-punches, or if there may be more than one card of a particular type in a record (trailer cards).

You are advised not to use the UNLOAD command but use field copy instead because this is easier to read and understand. So the command:

unload to 21,

can be written as:

d $2101-2180=$1-80,

The UNLOAD command cannot be used with CARD CHARACTERS data.

Examples of UNLOAD commands:

unload to 6,

unload to 43,