Click to open or copy the files for the Shared sample.
The Shared directory contains the following files.
Cpicerr.c
Contains procedures to be called for handling unexpected CPI-C return codes. Contains procedures to be called for handling the CPI-C error information cpicerr.
Cpicinit.c
Provides procedures to be used in programs to help them set up all of the partner program information for CPI-C. All of the information is stored in a CPICINIT structure. The information is stored in the structure using default and set calls.
Cpicport.c
Contains procedures that may have to be rewritten for different environments.
This file is the home of all operating-system-specific functions.
Getopt.c
The getopt function is a command-line parser. It returns the next option character in argv that matches an option character in opstring.
The argv argument points to an array of argc+1 elements containing argc pointers to character strings followed by a null pointer.
There is a Snaenv.bat file to set environment variables, available via the SNA Samples topic.
This sample uses the following keywords:
_next_char; alloc_cpic_buffer; appc; ascii_to_ebcdic_field; asctime; blank_string; calloc; clear_vcb; closehandle; cmcfmd; cmdeal; cmecs; cmect; cmemn; cmepln; cmesl; cminit; cmptr; cmsdt; cmsend; cmserr; cmsmn; cmspln; cmsptr; cmsst; cmstpn; convert_from_ascii; convert_long_from_network; convert_long_to_network; convert_short_from_network; convert_short_to_network; convert_to_ascii; cpicerr_build_reply_image; cpicerr_classify_rc; cpicerr_create_reply; cpicerr_destroy; cpicerr_destroy_reply; cpicerr_exchange_version; cpicerr_exchange_version_plus; cpicerr_extract_reply_image; cpicerr_get_message; cpicerr_handle_rc; cpicerr_handle_rc_extended; cpicerr_log_cpicerr; cpicerr_log_rc; cpicerr_new; cpicerr_os2_appc_allocate; cpicerr_recv_appl_error; cpicerr_send_appl_error; cpicerr_set_conv_id; cpicerr_set_error_reply; cpicerr_set_exit_level; cpicerr_set_log_file_name; cpicerr_set_log_file_path; cpicerr_set_log_level; cpicerr_set_major_version; cpicerr_set_minor_version; cpicerr_set_program_info; cpicerr_set_program_name; cpicerr_set_rc_info; cpicerr_set_show_level; cpicerr_show_product_info; cpicerr_show_rc; cpicerr_show_reply; cpicinit_default_mode_name; cpicinit_default_sym_dest_name; cpicinit_default_tp_name; cpicinit_destroy; cpicinit_get_password; cpicinit_mode_valid; cpicinit_new; cpicinit_pln_valid; cpicinit_query_password_needed; cpicinit_set_destination; cpicinit_set_mode_name; cpicinit_set_password; cpicinit_set_security_type; cpicinit_set_tp_name; cpicinit_set_userid; cpicinit_setup_conversation; createfile; createnamedpipe; createprocess; ctime; datetime; defined; display_message; do_exit; ebcdic_to_ascii_field; execute_and_send_output; exit; exitthread; fclose; fgets; fopen; free; free_cpic_buffer; get_machine_mode; get_password; get_time; getenv; getlasterror; getopt; gettickcount; localtime; malloc; max; memcpy; memset; min; parse_destination; peeknamedpipe; printf; readfile; set_echo; show_info; sna2string; strcat; strchr; strcmp; strcpy; strupr; swap2; swap4; time; toupper; toupper_string; va_end; va_start; vfprintf; waitforsingleobject; wincpiccleanup; write_error; write_log; write_output; xcscsp; xcscst; xcscsu