File Utility Program (FUP) Management Programming Manual

FUP Programmatic Interface
File Utility Program (FUP) Management Programming Manual523322-001
2-12
SPI Programming Considerations for FUP
SPI Programming Considerations for FUP
The SPI Programming Manual provides general programming considerations for
management applications that use SPI command and response buffers to
communicate with subsystems such as FUP. This subsection provides considerations
specific to FUP.
Building the Command Buffer
Your application must allocate a command and response buffer to communicate with
FUP. This buffer must be large enough to hold each FUP command and response.
(Multiple FUP commands in a single buffer are not allowed.) The recommended
minimum buffer size in bytes is ZFUP-VAL-BUFLEN.
Your application uses SPI procedures to initialize the command buffer and add tokens
to it. Use the SSINIT procedure to initialize the buffer and to specify the FUP
command. SSINIT also adds the header tokens to the buffer.
When the buffer is initialized with SSINIT, any previous contents of the buffer are
overwritten. Therefore, to save the contents of the buffer before calling SSINIT, save a
copy of the buffer in another location.
You use the SSNULL procedure to initialize the fields of extensible structured tokens
with null values. Always call SSNULL, even if you explicitly set all currently defined
fields of the structure. This ensures that your application will continue to run correctly if
future versions of FUP add fields to these structured tokens.
Specifying Object Names
Each FUP programmatic command (except GETVERSION) requires an object type of
ZFUP-OBJ-FILE. The object is either sent to FUP as a single file name, or (for the
CHECKSUM and DUPLICATE commands) as a template that represents a file set. If
the restartable option is specified for the DUPLICATE command, a single file name
must be specified as the object.
Specifying a File Name
A file name sent to FUP in a command buffer must be in the Guardian internal file-
name format and must be fully qualified. If the file is not on the same system as FUP,
the name must be in the Guardian internal file-name format. If a file name does not
include a system identifier, FUP assumes that the file is on the same system where
FUP is running.
All file names returned by FUP in the response buffer are also in the Guardian internal
file-name format.
Note. For more information about this format, see the Guardian Programmers Guide.