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

/\

 

 

 

\/

/\Program Name: PGM2

 

 

\/

/\

 

 

 

\/

/\Program Language:

ILE

C

\/

/\

 

 

 

\/

/\Description: This sample program illustrates the correc￿t

\/

/\

use of ignored and null parameters.

\/

/\

 

 

 

\/

/\Header Files Included: <stdio.h>

\/

/\

 

 

<qusec.h>

\/

/\

 

 

<qusgen.h>

\/

/\

 

 

<qdbldbr.h>

\/

/\

 

 

<quscrtus.h>

\/

/\

 

 

<qusptrus.h>

\/

/\

 

 

<qliept.h>

\/

/\

 

 

 

\/

/\APIs Used:

QUSCRTUS -

Create User Space

\/

/\

QDBLDBR

-

List Database Relations

\/

/\

QUSPTRUS -

Retrieve Pointer to User Space

\/

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ #include <stdio.h>

#include <qusec.h> #include <qusgen.h> #include <qdbldbr.h> #include <quscrtus.h> #include <qusptrus.h> #include <qliept.h> main()

{

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

/\ initialize program data elements\/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

char initial_value = ðxðð;

 

 

char text_description[5ð] =

 

 

"test of QDBLDBR API

 

";

char qualified_usrspc_name[2ð] = "GETLDBR

QTEMP

";

Qus_EC_t error_code;

 

 

Qus_Generic_Header_ð1ðð_t \header_ptr;

 

 

error_code.Bytes_Provided = ð;

 

 

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

/\ Create the user space to hold API results\/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

QUSCRTUS(qualified_usrspc_name, "SPACE

 

", 1,

&initial_value, "\ALL

",

text_description,

"\YES

", &error_code, "\USER

");

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

/\ Get list of file dependencies in current library

\/

/\

\/

/\ Note that in this API call, blank characters are being

\/

/\ used for the "ignored" parameters Member and

\/

/\ Record_Format. While the value is ignored, a valid

\/

/\ parameter storage location must still be passed

\/

9-20System API Programming V4R1

Page 226
Image 226
IBM Version 4 manual 20System API Programming V4R1