Google
 

Trailing-Edge - PDP-10 Archives - TRAFFIC-20_V4_840514 - traffic-demonstrations/vet004.cbl
There are no other files named vet004.cbl in the archive.
IDENTIFICATION DIVISION.
PROGRAM-ID.   VET004.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT INFIL ASSIGN DSK 
ORGANIZATION INDEXED
ACCESS DYNAMIC
RECORD SNAME
RECORDING MODE ascii.
DATA DIVISION.
FILE SECTION.
FD INFIL
BLOCK CONTAINs 1 RECORDS
VALUE OF ID "DEMO4 IDX".
01 INREC DISPLAY-7.
	02 SNAME PIC X(12).
	02 FNAME PIC X(12).
WORKING-STORAGE SECTION.
01 ERR PIC S9(10) COMP.
01 HEREB4 PIC X VALUE "N".
LINKAGE SECTION.
01  USER-DATA     USAGE IS DISPLAY-7      PICTURE IS X(12).
01  ERROR-STATUS  USAGE IS COMPUTATIONAL  PICTURE IS S9.
01  ERROR-MESSAGE USAGE IS DISPLAY-7      PICTURE IS X(80).
01  FIELD-NAME	  USAGE IS DISPLAY-7	PICTURE IS X(30).
PROCEDURE DIVISION USING USER-DATA ERROR-STATUS ERROR-MESSAGE FIELD-NAME.
	IF HEREB4 = "Y" GO TO L1.
	OPEN INPUT INFIL.
	MOVE "Y" TO HEREB4.
L1.
	MOVE USER-DATA TO SNAME.
	READ INFIL INVALID
		MOVE "NOT ON FILE" TO ERROR-MESSAGE
		MOVE -3 TO ERROR-STATUS
		GO TO L99.
	ENTER MACRO TFRPUT USING "TFNAME",0,FNAME,ERR.
	ENTER MACRO TFRWRT USING "TFNAME",ERR.
	MOVE ZERO TO ERROR-STATUS.
L99.
	EXIT PROGRAM.