PFILE Examples


Example 1:

 

PRTFILE

PFILE

 

PRTFILE may be used for print spooling.

 

Example 2:

 

PTRPFILE

PFILE

^

PFILE1

PFILE

 

PFILE2

PFILE

 

  

...

 

  

CALL

SUB USING PFILE1

  

CALL

SUB USING PFILE2

  

...

 

SUB

LROUTINE

PTRPFILE

  

...

 

  

PRINT

PTRPFILE;...

  

...

 

  

RETURN

 

 

PTRPFILE is a Pointer Variable that contains the address of another PFILE variable at execution time. This assignment is usually accomplished via the parameterized CALL instruction. Once initialized, PTRPFILE may be used as any other PFILE variable. It takes on all the attributes of the pointed to PFILE variable.

 

Example 3:

 

AUDIT

PFILE

%BUFFER=100

 

This instruction defines a global print file. It is kept open during the CHAIN instruction.

 

Example 4:

 

AUDIT

PFILE

%%

 

This instruction defines a global PFILE whose attributes are undefined. Prior to opening, it must be defined by performing a LOADMOD instruction or a CALL instruction of a separately compiled routine that defines the file with a '%' operator.

 



PL/B Language Reference PERFORMF Examples PLFORM Example