ffixed -- Test for Fixed-Length Records

SYNOPSIS
#include <lcio.h>
int ffixed(FILE *f);
DESCRIPTION
ffixed
indicates whether an open file contains records of a fixed
length.
RETURN VALUE
ffixed
returns a nonzero value for a fixed-format file, or 0 for a
variable-format file. VSAM KSDS and ESDS files are considered to be
variable-format files, and RRDS and LDS files are considered to be fixed-format
files. HFS files are always considered to be variable-format files.
EXAMPLE
For fixed-format files, the sequence number is the last eight characters of
the line. For variable-format files, the sequence number is the first eight
characters. This program removes the sequence number from a line read
from the file input:
#include <lcio.h>
#include <string.h>
char *line;
FILE *input;
/* If fixed format, */
/* throw away last 8 characters; */
if (ffixed(input))
line[strlen(line) - 8 ] = 0;
/* else, move string 8 bytes to left. */
else
memmove(line, line + 8, strlen(line) - 7);
RELATED FUNCTIONS
fattr
SEE ALSO

Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.