0% found this document useful (0 votes)
23 views2 pages

Load All Subfile

The document describes code for controlling a display screen using subroutines to clear and load a sequential file, display the sequential file, and reset to the first page when a key is pressed. It includes comments explaining the purpose of each section.

Uploaded by

StrongSarathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views2 pages

Load All Subfile

The document describes code for controlling a display screen using subroutines to clear and load a sequential file, display the sequential file, and reset to the first page when a key is pressed. It includes comments explaining the purpose of each section.

Uploaded by

StrongSarathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

SFLDSP

SFLDSPCTL
SFLCLR
SFLEND

Y
Y

30
31
32
33

0000.01 FRPGLF

IF

0002.00 FLODALL

CF

K DISK

0005.00 DSSRN

WORKSTN SFILE(DATA:SRRN)
S

4S 0

0006.00 /FREE
0007.00

EXSR CLRSFL;

// which is

0008.00

EXSR LODSFL;

// used to

0009.00

EXSR DSPSFL;

// clear and load SFL

0010.00

DOW (*IN03 = *OFF);

0011.00

WRITE FOOTER;

0012.00

EXFMT CONTROL;

0013.00

SELECT;

0014.00

WHEN (*IN03 = *ON);

0015.00

LEAVE;

0016.00

WHEN (*IN05 = *ON);

0016.01

SETLL *LOVAL EMPREC;

0017.00

EXSR CLRSFL;

// when F5 is pressed

0018.00

EXSR LODSFL;

// Reset to first page

0019.00

EXSR DSPSFL;

//

0020.00
ENDSL;
0021.00
ENDDO;
0022.00 *INLR = *ON;
0023.00 //**************************PROGRAM ENDS****************
0023.01 //*****************SUBROUTINE CLRSFL *******************
0024.00
BEGSR CLRSFL;
0025.00
*IN32 = *ON;
0026.00
WRITE CONTROL;
0027.00
*IN32 = *OFF;
0028.00
SRRN = 0;
0029.00
ENDSR;
0030.00 //*****************SUBROUTINE LODSFL *******************
0031.00
BEGSR LODSFL;
0032.00
READ RPGLF;
0033.00
DOW NOT %EOF(RPGLF);
0034.00
SRRN = SRRN + 1;
0035.00
WRITE DATA;
0036.00
READ RPGLF;
0037.00
ENDDO;

0038.00
*IN33 = *ON;
//once the file is ended the SFLEND will b
e turned ON
0039.00
ENDSR;
0040.00 //*****************SUBROUTINE DSPSF
0041.00
BEGSR DSPSFL;
0042.00
IF (SRRN > 0);
0043.00
*IN30 = *ON;
0044.00
ELSE;
0045.00
*IN30 = *OFF;
0046.00
ENDIF;
0047.00
*IN31 = *ON;
0048.00
ENDSR;
0049.00 /END-FREE

You might also like