ARexec: Sample of APPC Remote Execution of Commands

Click to open or copy the files for the ARexec sample.

Click to open or copy the Shared directory (required).

This sample executes a command on a remote workstation and displays the output from the command (both stdout and stderr) on the requesting workstation. 

Usage:   arexec destination command

The destination may be either a partner LU alias (up to eight characters) or a fully qualified LU name (3-17 characters separated by a period).

The Arexecd.c module is the server side of ARexec.  This module will execute a specified command and route the output back to the ARexec transaction program.

For more information, see AREXEC and AREXECD in Microsoft SNA Server.

There is a Snaenv.bat file to set environment variables, available via the SNA Samples topic.

Building SDK Samples

This sample uses the following keywords:

cmaccp; cmallc; cmdeal; cmepln; cmrcv; cmsdt; cmsend; cmsltp; cmssl; cmsst; cmwait; controlhandler; convert_from_ascii; convert_to_ascii; cpicerr_destroy; cpicerr_exchange_version; cpicerr_exchange_version_plus; cpicerr_handle_rc; cpicerr_new; cpicerr_set_conv_id; cpicerr_set_log_file_name; cpicerr_set_log_file_path; cpicerr_set_major_version; cpicerr_set_minor_version; cpicerr_set_program_info; cpicerr_set_program_name; cpicinit_default_mode_name; cpicinit_default_sym_dest_name; cpicinit_default_tp_name; cpicinit_destroy; cpicinit_get_password; cpicinit_new; 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; debugbreak; defined; execute_and_send_output; exit; fwrite; getlasterror; getopt; process_arguments; registerservicectrlhandler; servicemain; setbuf; setservicestatus; show_info; startservicectrldispatcher; strcat; tpstart; wincpicstartup; write_error; write_output