On Sat, 28 Dec 2019 00:31:57 +0000, Frank Swarbrick
<frank.swarbr...@outlook.com> wrote abour Re: VSAM record length 0:

> I understand that.  I thought the CRLF would be "in the clear", which
> would make the record (in the sequential file, sent from an ASCII
> system) 0 length.  But that was an invalid assumption.  The "field"
> that includes the CRLF is base64 encoded rather than containing an
> actual CRLF.

Base64 swallows everything in the input stream, without assuming any
record or field delimiters. It is treated as a pure byte stream. You
need to decode it the same way and then find any delimiters in the
decoded stream. All the encoded characters are from the 6-bit collating
sequence defined by Base64, but widened to ASCII or EBCDIC.

> I'm not sure how INSPECT...REPLACING can be used since there is not a
> 1-byte to 1-byte correspondence...

You'll need to use at least 2 INSPECT verbs and then meld the pieces.
The issue is to take 3 bytes and convert it to 4 to encode, and 4 bytes
to 3 to decode.

I implemented Base64 in PL/I about 25 years ago, using the TRANSLATE()
builtin function. That largely corresponds to INSPECT ... REPLACING in
COBOL. I think I still have that code on a tape cartridge, but I don't
think the tape drive I used to back it up still works. ... :-(
-- 
Regards,

Dave  [RLU #314465]
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
david.w.n...@gmail.com (David W Noon)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to