On Fri, 27 Dec 2019 23:46:12 +0000, Frank Swarbrick
<[email protected]> wrote abour Re: VSAM record length 0:

> It turns out I was not quite on the right track.  The 'record format'
> of the file does allow for a CRLF sequence embedded in it, but it does
> it by Base64 encoding the data, rather than including an "additional"
> CRLF as I had assumed.

A CR/LF pair is normally just a line terminator, especially when the
record is Base64 encoded. Normally you just drop the line terminator.

If you plan on keeping the data encoded as Base64, there should be no
zero-length records. Since Base64 data are a byte stream, the only
record boundaries are going to be by some kind of convention: CR/LF on
Microsoft platforms; CR on Apple; and LF on UNIX.

> So now the question is, does z/OS have a Base64 decoding routine?
> I see that Enterprise PL/I has one, but I don't see anything for
> Enterprise COBOL.  I can probably call a function from the C Runtime
> if there is one.  (And no, I am probably not going to call a Java
> routine...)

You can implement Base64 encoding/decoding in COBOL, typically by using
one or two INSPECT ... REPLACING verbs. Take a look at RFC 3548 to see
the standard algorithm:
  <https://tools.ietf.org/html/rfc3548.html>

HTH.
-- 
Regards,

Dave  [RLU #314465]
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
[email protected] (David W Noon)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

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

Reply via email to