?? ecisync.c
字號:
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include "cics_eci.h"
#define SERVERNAME "CICS01" /* fill in your server name */
#define PROGRAMNAME "SERVER" /* fill in your program name */
#define USERNAME "CICSUSER" /* fill in your cics user name */
#define PASSWORD "" /* fill in your cics user passwd */
#define ECI_TIMESTAMP_SIZE 18 /* max length of send and receive,<=32000 */
ECI_PARMS EciParms;
void main(void);
void EciSync(int);
void main(void)
{
int ii;
printf("ECI Sample Program Started......\n");
printf("================================\n\n");
for(ii=0;ii<100;ii++)
EciSync(ii+1);
printf("\n================================\n");
printf("ECI Sample Program ended!!!!!!\n\n");
exit();
}
void EciSync(ii)
int ii;
{
short Rc;
char CommArea [ECI_TIMESTAMP_SIZE];
char pwd[8]="";
memset (CommArea, '\0', ECI_TIMESTAMP_SIZE);
memcpy (CommArea, "222222222222222222", ECI_TIMESTAMP_SIZE);
memset (&EciParms, 0, sizeof (ECI_PARMS));
/* EciParms.eci_version = ECI_VERSION_1A;*/
EciParms.eci_version = ECI_VERSION_1;
EciParms.eci_call_type = ECI_SYNC;
memcpy(&EciParms.eci_userid, USERNAME, 8);
memcpy(&EciParms.eci_password, pwd, 8);
memcpy(&EciParms.eci_system_name, SERVERNAME, 8);
memcpy(&EciParms.eci_program_name, PROGRAMNAME, 8);
EciParms.eci_commarea = CommArea;
EciParms.eci_commarea_length = ECI_TIMESTAMP_SIZE;
EciParms.eci_extend_mode = ECI_NO_EXTEND;
EciParms.eci_luw_token = ECI_LUW_NEW;
EciParms.eci_timeout = 0;
memcpy(&EciParms.eci_transid,"CPMI",4);
/*memcpy(&EciParms.eci_tpn,"CPMI",4);*/
/*鋅版本*/
Rc = CICS_ExternalCall (&EciParms);
if (Rc == ECI_NO_ERROR)
printf ("[%06d]CommArea Returned: %s\n",ii,CommArea);
else
printf ("[%06d]Rc=%d and Abend Code=##%4.4s##\n",ii,Rc,EciParms.eci_abend_code);
return;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -