You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
will open the VTOC and that then you should be able to read its "records" (i.e., its data set control blocks, DSCBs) by means of
char dscb[96];
int r = fread(dscb, 1, 96, VTOCfh);
where 96 is the magic number representing the "data" part of a VTOC DSCB.
Alas, DSCBs are all 140 bytes long and fread correctly reads the first 96 bytes of a DSCB, including the "key" part, which is 44 bytes long. dscb[0..43] correctly holds the "keyid" part of the DSCB, which, for DSCBs of type 0xF1 contains the dataset name.
Now, at a minimum, the documentation is incorrect in stating that fread reads in the DSCB "data" part. OTOH, we do not have a way to properly read in a full DSCB (in Hercules, with JCC).
TRT would be to modify fread reading in the DSCB using the full 140 bytes extent. Note that trying to call fread with a 140 length, does not read correctly the DSCB.
Attached are three files that exhibit the behavior. Apologies for their convolutedness. Just compile the file tstvtocr.c with JCC and run the result at TSO.
Hi
the JCC documentation for
fopen
,open
, etc says that code likewill open the VTOC and that then you should be able to read its "records" (i.e., its data set control blocks, DSCBs) by means of
where
96
is the magic number representing the "data" part of a VTOC DSCB.Alas, DSCBs are all 140 bytes long and
fread
correctly reads the first 96 bytes of a DSCB, including the "key" part, which is 44 bytes long.dscb[0..43]
correctly holds the "keyid" part of the DSCB, which, for DSCBs of type0xF1
contains the dataset name.Now, at a minimum, the documentation is incorrect in stating that
fread
reads in the DSCB "data" part. OTOH, we do not have a way to properly read in a full DSCB (in Hercules, with JCC).TRT would be to modify
fread
reading in the DSCB using the full 140 bytes extent. Note that trying to callfread
with a 140 length, does not read correctly the DSCB.Attached are three files that exhibit the behavior. Apologies for their convolutedness. Just compile the file
tstvtocr.c
with JCC and run the result at TSO.all the best
Marco
jccvtocfread.zip
The text was updated successfully, but these errors were encountered: