/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍ Program Name: RTVFD ᑍ/
/ᑍ ᑍ/
/ᑍ Program Language: ILE C ᑍ/
/ᑍ ᑍ/
/ᑍ Description: Retrieve a file definition template to a ᑍ/
/ᑍ user space. ᑍ/
/ᑍ ᑍ/
/ᑍ Header Files Included: <stdlib.h> ᑍ/
/ᑍ <signal.h> ᑍ/
/ᑍ <string.h> ᑍ/
/ᑍ <stdio.h> ᑍ/
/ᑍ <quscrtus.h> ᑍ/
/ᑍ <quscusat.h> ᑍ/
/ᑍ <qusptrus.h> ᑍ/
/ᑍ <qdbrtvfd.h> ᑍ/
/ᑍ <qusec.h> ᑍ/
/ᑍ <qus.h> ᑍ/
/ᑍ <qliept.h> ᑍ/
/ᑍ ᑍ/
/ᑍ APIs Used: QUSCRTUS - Create User Space ᑍ/
/ᑍ QUSCUSAT - Change User Space Attributes ᑍ/
/ᑍ QUSPTRUS - Retrieve Pointer to User Space ᑍ/
/ᑍ QDBRTVFD - Retrieve File Description ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
#include <stdlib.h>
#include <signal.h>
#include <string.h>
#include <stdio.h>
#include <quscrtus.h>
#include <quscusat.h>
#include <qusptrus.h>
#include <qdbrtvfd.h>
#include <qusec.h>
#include <qus.h>
#include <qliept.h> /ᑍ Note that this must be the last ᑍ/
/ᑍ include specified. ᑍ/
int error_flag = ; /ᑍ Set by error handler ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍ Function: error_handler ᑍ/
/ᑍ Description: Handle exceptions. ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
void error_handler(int errparm)
{
_INTRPT_Hndlr_Parms_T ExcDta = {};
_GetExcData(&ExcDta);
error_flag = 1;
signal(SIGALL,error_handler);
}
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍ Start of main procedure ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
A-12 System API Programming V4R1