OSI/FTAM Programming Guide
NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Guide—528612-001
5-7
Reading a File: C Programming Example
150 /* Variables used by the FTM procedures */
151 /**********************************************************************/
152
153 long state_result; /* Result of regime transition */
154 long action_result; /* Result of requested service */
155 long start_position; /* Used to step thru src. data */
156 long more_data; /* More data left to be retrieved */
157 long next_position; /* Used to step thru src. data */
158 char data_value_ptr[MAX_BUF] /* Buffer used to retrieve data */
159 int data_len = 0; /* Buffer length to write data */
160 char *data_ptr; /* Pointer to the data to be written*/
161
162
163 /*********************************************************************/
164 /* Error-handling variables */
165 /*********************************************************************/
166
167 int status; /* Used for I/O request calls */
168 int error; /* Used for confirm calls */
169 int error_code; /* Returns error code */
170 int error_subcode; /* Returns error subcode */
171
172 /*********************************************************************/
173 /* Structures used by the FTM procedures */
174 /*********************************************************************/
175
176 zaps_ddl_data_hdr_def *data_hdr;
177 zaps_ddl_data_element_hdr_def *element_hdr;
178 zaps_ddl_filename_def aplmgr_name;
179 zaps_ddl_appl_addr_def local_appl;
180 zaps_ddl_appl_addr_def responding_appl;
181 zaps_ddl_ae_title_def local_ae_title;
182 zaps_ddl_ae_title_def remote_ae_title;
183 zftm_ddl_service_class_def service_class;
184 zftm_ddl_func_units_def func_units;
185 zftm_ddl_attr_groups_def attr_groups;
186 zftm_ddl_cntnts_list_def contents_type_list;
187 zaps_ddl_char32_def initiator_id;
188 zaps_ddl_char32_def account;