HP-UX SNAplus2 CSV Programmer's Guide
Concepts
Issuing a Verb
Chapter 1 31
Issuing a Verb
The major steps in issuing a Common Service Verb follow. Each step is
illustrated by sample code pertaining to the CONVERT verb; for more
information about this verb, see Chapter 2, “Common Service Verbs
Reference.”
Step 1. Create a structure variable from the VCB structure that applies to the
verb to be issued.
#include <acssvcc.h>
.
.
.
struct convert conv_block;
For Windows, replace acssvcc.h with wincsv.h, the name of the
Windows CSV header file.
The VCB structures are declared in the CSV header file; one of these
structures is named
convert
.
Step 2. Clear (set to zero) the variables within the structure.
memset(&conv_block, 0, sizeof( conv_block ) );
This step is important to ensure that the application can later be
upgraded to work with future CSV versions (which can use fields that
are reserved in the current version). It also helps in debugging and
interpreting trace data.
Step 3. Assign values to the required VCB variables.
conv_block.opcode = SV_CONVERT;
conv_block.direction = SV_ASCII_TO_EBCDIC;
conv_block.char_set = SV_AE;
conv_block.len = sizeof(tpstart_name);
For HP-UX systems:
conv_block.source = (char *) tpstart_name;
conv_block.target = (char *) tpstart.tp_name;
For Windows systems: