GETFILE Examples


Example 1:

 

*

 

 

.GETFILE Example Program 1

.

 

 

INAME

DIM

40

TNAME

DIM

40

MYFILE

IFILE

 

.

 

 

  

OPEN

MYFILE,"EMP1"

  

GETFILE

MYFILE,ISINAME=INAME,TXTNAME=TNAME

  

DISPLAY

*HD,*R,"ISI File Name: ",INAME:

  

  

*HD,*R,"TXT File Name: ",TNAME

  

STOP

 

 

This example retrieves and displays the qualified ISAM file name and text file name.

 

Example 2:

 

*

 

 

.GETFILE Example Program 2

.

 

 

PNAME

DIM

40

PRTFILE

PFILE

 

.

 

 

  

PRTOPEN

PRTFILE,"",""

  

GETFILE

PRTFILE,PRTNAME=PNAME

  

DISPLAY

*HD,*R,"Selected Printer Name: ",PNAME

  

STOP

 

 

This example opens a printer dialog using the PRTOPEN instruction. Upon returning from the dialog, the selected printer name is retrieved.

Example 3:

 

Example SQL Statement:

 

select col1,col2,round(col3,1),col4 from table;

 

Tthe GETFILE QUERYCOLUMNS keyword returns a string as follows:

 

col1;col2;round(col3,1);col4

 



PL/B Language Reference FPOSITC Examples GETFNAME Examples