\ extract age of spooled file for report

\

IF KEY-FIELD-FOR-FIELD-RETD OF QUS-LSPL-KEY-INFO = 216 .24/.25/

MOVE SPACES TO OPNDAT,

MOVE DATA-FIELD OF QUS-LSPL-KEY-INFO( 1:DATA-LENGTH OF QUS-LSPL-KEY-INFO)

TO OPNDAT.

\

\address next variable length entry

SET ADDRESS OF STRING-SPACE TO ADDRESS OF QUS-LSPL-KEY-INFO￿.

SET ADDRESS OF QUS-LSPL-KEY-INFO TO ADDRESS OF

STRING-SPACE(

LEN-FIELD-INFO-RETD OF QUS-LSPL-KEY-INFO + 1:1).

Using Keys with List Spooled Files API—ILE RPG Example

Refer to “Using Keys with List Spooled Files API—Example” on page 3-24

 

original

example.

 

 

 

 

 

 

 

F\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

 

F\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

 

F\

 

 

 

 

 

 

 

 

 

F\

Program:

 

List Spooled Files for Current User

 

 

 

F\

 

 

 

 

 

 

 

 

 

F\

Language:

 

ILE RPG

 

 

 

 

 

F\

 

 

 

 

 

 

 

 

 

F\

Description:

 

This example shows the steps necessary to

 

 

F\

 

 

 

process keyed output from an API.

 

 

 

F\

 

 

 

 

 

 

 

 

 

F\

APIs Used:

 

QUSLSPL - List Spooled Files

 

 

 

F\

 

 

 

QUSCRTUS - Create User Space

 

 

 

F\

 

 

 

QUSPTRUS - Retrieve Pointer to User Space

 

 

F\

 

 

 

 

 

 

 

 

 

F\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

 

F\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

 

F\

 

 

 

 

 

 

 

 

 

FQPRINT

O

F

132

PRINTER OFLIND(\INOF)

 

 

 

D\

 

 

 

 

 

 

 

 

 

D\ Error Code parameter include

 

 

 

 

D\

 

 

 

 

 

 

 

 

 

D/COPY QSYSINC/QRPGLESRC,QUSEC

 

 

.11/

 

 

D\

 

 

 

 

 

 

 

 

 

DSPC_NAME

 

 

S

INZ('SPCNAME

QTEMP

')

 

DSPC_SIZE

 

 

S

9B

ð INZ(2ððð)

.2/

 

 

DSPC_INIT

 

 

S

1

INZ(X'ðð')

 

 

 

DLSTPTR

 

 

S

\

 

 

 

 

DLSTPTR2

 

 

S

\

 

 

 

 

DSPCPTR

 

 

S

\

 

 

 

 

DARR

 

 

 

S

1

BASED(LSTPTR) DIM(32767)

 

 

D

 

 

 

DS

 

 

 

 

 

DPAGES#

 

 

1

4B

ð

 

 

 

DPAGESA

 

 

1

4

 

 

 

 

DKEYS

 

 

DS

 

 

.7/

 

 

D

 

 

 

 

9B

ð INZ(2ð1)

.8/

 

 

D

 

 

 

 

9B

ð INZ(216)

 

 

 

D

 

 

 

 

9B

ð INZ(211)

 

 

B-42

System API Programming V4R1

 

 

 

 

 

 

 

Page 320
Image 320
IBM Version 4 manual Using Keys with List Spooled Files API-ILE RPG Example, To Opndat, Inzspcname Qtemp Dspcsize