OSI/FTAM Programming Guide

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Guide528612-001
5-6
Reading a File: C Programming Example
111 #define MANAGER_NAME "$APMGR "
112 #define LOCAL_FILE_NAME "$VOLUME.SUBVOL.LOCALF"
113 #define REMOTE_FILE_NAME "$VOLUME.SUBVOL.REMOTEF"
114
115 #define NUM_ELEM 5
116
117 int FTAM_DOC_TYPE[NUM_ELEM] = {1,0,8571,5,3};
118 int LOCAL_AP_TITLE[NUM_ELEM] = {1,3,9999,1,7};
119 int REMOTE_AP_TITLE[NUM_ELEM] = {1,3,9999,1,7};
120
121
122 /*********************************************************************/
123 /* Miscellaneous literals */
124 /*********************************************************************/
125
126 #define ANYEVENT -1 /* Wait for any OSI/FTAM event */
127 #define MAX_BUF 1000 /* Buffer size to receive data */
128 #define NOCEPI -1 /* Unitialized or invalid CEPI */
129 #define WAIT_FOREVER -1 /* Wait indefinitely for event */
130
131
132 /*********************************************************************/
133 /* Miscellaneous variables */
134 /*********************************************************************/
135
136 int cepi = NOCEPI; /* Connection EndPoint Identifier */
137 int wait_mode; /* Wait or nowait I/O */
138 long threshold; /* Error threshold used in groups */
139 int event; /* FTAM event code */
140 int i = 0; /* Indexing */
141 int file_code; /* Set by String Sig specified */
142 int file_type; /* Set by String Sig specified */
143 int data_blocklen = 4096; /* Used in CREATE call */
144
145 static lowmem int local_fn = -1; /* Local file number */
146 static lowmem int local_file[12]; /* Local file in internal format */
147
148
149 /**********************************************************************/