KPG1_DAUNI

Generates a string containing the units of an NDF s data or variance component allowing for truncation

Description:

This routines generates a string containing the units of an NDF s data or variance component. If the length of the variable to store the string is shorter than the units field, the units string is truncated and an ellipsis is inserted. For the variance the data units are enclosed in parentheses and followed by 2 . Again if the the length of the units string is too short, truncate the units within the parentheses and insert an ellipsis. A null string is returned if the UNITS component does not exist within the NDF.

Invocation

CALL KPG1_DAUNI( NDF, COMP, UNITS, NCU, STATUS )

Arguments

NDF = INTEGER (Given)
The NDF identifier
COMP = CHARACTER ( ) (Given)
The NDF component: DATA , VARIANCE , QUALITY or ERROR . Any other component will result in a SAI__ERROR status being returned immediately.
UNITS = CHARACTER ( ) (Returned)
The string containing the units for the component, possibly truncated. It is recommended that string should be at least 20 characters long. If COMP = VARIANCE the length must be no less than 9 characters; for COMP = DATA the minimum is 4 characters; for COMP = ERROR the minimum is 5 characters; otherwise the routine returns immediately with the SAI__ERROR status.
NCU = INTEGER (Returned)
The length of the units string in characters ignoring trailing blanks. Always returned equal to zero if COMP = QUALITY .
STATUS = INTEGER (Given and Returned)
The global status.