#include #include #include #include #include #define TRUE 0 #define FALSE -1 void main(void){ char outbuf[1000]; Qwt_RTVT0100_t *qwt_rtv0100; Qwt_RTVT_Receiver_InfoData_t *info; char active_job_status[100]; int end_job_reason; Qwc_JIDF0100_t jobinfo; int keys[2] = { QWCA_KEY_ACTIVEJOBSTATUS, QWCA_KEY_JOBENDREASON }; Qus_EC_t errcode = {0, 0}; printf("** TESTRTVA : QWTRTVTA : スレッド属性の取得 **\n"); getchar(); memset(&jobinfo, 0, sizeof(jobinfo)); memcpy(jobinfo.Job_Name, "QPADEV0021", 10); memcpy(jobinfo.User_Name, "QTR ", 10); memcpy(jobinfo.Job_Number, "781441", 6); memset(jobinfo.Int_Job_ID, ' ', sizeof(jobinfo.Int_Job_ID)); jobinfo.Thread_Indicator = -1; QWTRTVTA(outbuf, sizeof(outbuf), "RTVT0100", &jobinfo, "JIDF0100", 2, (void*)&keys, "0", &errcode); qwt_rtv0100 = (void*)outbuf; /* Active job Status */ info = (void*)(&outbuf[qwt_rtv0100->Offset_Key_Fields]); memset(active_job_status, 0, sizeof(active_job_status)); memcpy(active_job_status, &info[1], info->Length_Data); /* End Job Reason */ info = (void*)((char*)info + info->Length_Field_Info_Rtnd); memcpy(&end_job_reason, &info[1], sizeof(end_job_reason)); printf("[%d] active_job_status = [%s]\n", __LINE__, active_job_status); printf("[%d] end_job_reason = [%d]\n", __LINE__, end_job_reason); getchar(); }