In COBOL, for variable-length records, the correct syntax is RECORD IS VARYING DEPENDING ON followed by the variable name that holds the actual record length. This is specified in the FD (File Description) section. The variable must be defined in WORKING-STORAGE as a 77-level item.