I am running one COBOL pgm which is reading one VSAM file. Below is ithe input output section in my pgm.
FILE-CONTROL.
SELECT INPUT-FILE ASSIGN TO DDINPUT
ORGANIZATION IS INDEXED
ACCESS MODE IS RANDOM
RECORD KEY IS INPUT-KEY
FILE STATUS IS WS-INPUT-STATUS.
and FD entry is as follow.
FILE SECTION.
FD INPUT-FILE IS EXTERNAL (as this is in sub pgm)
COPY INPUTREC.
When I ran this pgm, it failed with file status code =04. Somewhere I found that when in FD we have only one record even if the file is VB it treats it is FB. So FB should have record contains or Varying clause.
When I updated my FD to.
FILE SECTION.
FD INPUT-FILE IS EXTERNAL
RECORD VARYING IN SIZE FROM 1 TO 215.
COPY INPLAYOUT.
job ran fine.
I have one doubt Can I specify this Varying clause to maximum length, like if I write this as eg RECORD VARYING IN SIZE FROM 1 TO 2500. then will it cause any issue?