We have a variable length VSAM file (12000 120004) that I have defined as follows:
FILE ORDMSTR VS
ORDMSTR-RECORD 1 12000 A
ORDMSTR-KEY 1 6 A
ORDMSTR-ALPHA 1 3 A
ORDMSTR-REF-NUM-K 4 3 P
ORDMSTR-SEND-INFO 7 315 A
ORDMSTR-ORDER-YYMMDD 7 4 P
ORDMSTR-HHMMSS 11 4 P
ORDMSTR-RECORD 1 12000 A
ORDMSTR-KEY 1 6 A
ORDMSTR-ALPHA 1 3 A
ORDMSTR-REF-NUM-K 4 3 P
ORDMSTR-SEND-INFO 7 315 A
ORDMSTR-ORDER-YYMMDD 7 4 P
ORDMSTR-HHMMSS 11 4 P
etc (more detail fields follow)
Read is coded:
READ ORDMSTR KEY ORDMSTR-KEY STATUS
IF ORDMSTR : FILE-STATUS EQ 0
CONTINUE
ELSE
DISPLAY '*** ERROR READING ORDER MASTER. '
' KEY: ' PARM-ALPHA PARM-REFNO
' FILE STATUS: ' ORDMSTR:FILE-STATUS
GOTO JOB
END-IF
IF ORDMSTR : FILE-STATUS EQ 0
CONTINUE
ELSE
DISPLAY '*** ERROR READING ORDER MASTER. '
' KEY: ' PARM-ALPHA PARM-REFNO
' FILE STATUS: ' ORDMSTR:FILE-STATUS
GOTO JOB
END-IF
*****************************************************************************************
What am I missing? I thought this would work??
Thank you for your help,
Steve
Code'd and Aligned