I had 3 tries: the ibm doc + iEYIBAL , well, got it almost right
I spend too much time correcting th 12 byte logic etc., got lost.
this morning, I just read the hercules dasdload.c  for the VS format, and bingo. needed some oisters fand foie gras for breakfast. :-)

the first two records have fixed length, the firsrt record contains the "container 
block size"

the directory block have 12 byte header with 256 btes data, or a eof (data length 0) to end the directory.

then beginning with the directory blocks, you always have a 12 byte header which contains the length of the followong data.
there are zero length records to terminate.

since you know the blocksize, you fill a buffer as much as you can 12+datalen, or upt to an eof like 12 indicator.
you have you data size, add + 4 for the seg +4 of for the block.

data for a member terminate with a 12 header indicating length 0 thus end of 
block

since you want to ind$file back to mvs, in U format, all record need to have the same size, ind$file is in fact fixed with blocksize,
ok, add some padding, so recfm u gets all the  blocks of same size..

when the data are back, first I removed the padding with a little program, but finally, no need, IEBcopy sems to do the same reconstruction: either some 12 end of data block, or less than 12 bytes in the block. the actually block size is not important as long as is is big enough.

very old and robust technique.

take an unloaded file, change the recfm to u and browse with ispf..

best


On 24/04/2021 19:04, Paul Gilmartin wrote:
On Sat, 24 Apr 2021 18:14:20 +0200, Peter Sylvester wrote:
finally I hacked a little python (need to learn rexx) to reconstruct the 
bdws/rdws of an ind$file
corrupted iebcopy unloaded pds.

this (is |was known to be)  possible since the content is self describing.

I'm curious.  How did you reconstruct BDWs/RDWs?  Are they implied by the
IEBCOPY PDSU format (I believe that's RECFM=VBS.)?

Had all the transfers been in binary, sparing you CRLF problems?

(I need to learn Python.)

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to