/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

/\ 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-12System API Programming V4R1

Page 268
Image 268
IBM Version 4 manual Rtvfd, Ile C