/ᑍ ᑍ/
/ᑍ APIs Used: QUSLSPL - List Spooled Files ᑍ/
/ᑍ QUSCRTUS - Create User Space ᑍ/
/ᑍ QUSPTRUS - Retrieve Pointer to User Space ᑍ/
/ᑍ ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
#include <stdio.h>
#include <string.h>
#include <quslspl.h> /ᑍ QUSLSPL API header ᑍ/
#include <quscrtus.h> /ᑍ QUSCRTUS API header ᑍ/
#include <qusptrus.h> /ᑍ QUSPTRUS API header ᑍ/
#include <qusgen.h> /ᑍ Format Structures for User Space 11 ᑍ/
#include <qusec.h> /ᑍ Error Code parameter include for APIs ᑍ/
#include <qliept.h> /ᑍ Entry Point Table include for APIs ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍ Global variables ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
char spc_name[2] = "SPCNAME QTEMP ";
int spc_size = 2;
char spc_init = x;
char ᑍspcptr, ᑍlstptr, ᑍlstptr2;
int pages;
struct keys { int key1; 7
int key2;
int key3;} keys = {21, 211, 216}; 8
int number_of_keys = 3;
char ext_attr[1] = "QUSLSPL ";
char spc_aut[1] = "ᑍALL ";
char spc_text[5] = " ";
char spc_replac[1] = "ᑍYES ";
char spc_domain[1] = "ᑍUSER ";
char format[8] = "SPLF2"; 4
char usr_prf[1] = "ᑍCURRENT ";
char outq[2] = "ᑍALL ";
char formtyp[1] = "ᑍALL ";
char usrdta[1] = "ᑍALL ";
char jobnam[26] = " ";
char prtfil[1];
char opndat[7];
typedef struct {
Qus_LSPL_Key_Info_t Key_Info;
char Data_Field[1];
} var_record_t;
Qus_EC_t error_code;
int i, j;
char prtlin[1];
FILE ᑍrecord;
main()
{
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍ Open print file for report ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
if((record = fopen("QPRINT", "wb, lrecl=132, type=record")) == NULL)
{ printf("File QPRINT could not be opened\n");
B-34 System API Programming V4R1