| Newsgroups |
gmane.comp.emulators.hercules390.mvs |
| Message-ID |
<[email protected]> |
Am 16.09.2019 um 23:28 schrieb Bernd Oppolzer berndoppolzer-/[email protected]
[H390-MVS]:
>
> Am 16.09.2019 um 17:11 schrieb Giuseppe Vitillaro
> giuseppe-yuD/ahkh7LvrZ44/[email protected] [H390-MVS]:
>> ?
>>
>> On Mon, 16 Sep 2019, Joe Monk [email protected] [H390-MVS] wrote:
>>
>> > "I guess in pure COBOL '68 that is not possible?"
>> >
>> > That's correct Peppe. If you read the paragraph it says:
>> >
>> > "Control bytes are automatically provided when a record *is*
>> written and are
>> > not communicated to the user when a file is read."
>> >
>> > Joe
>>
>> What a shame ;-)
>>
>> Thanks, a thing to remember.
>>
>> Now, for handling variable length datasets, possibly spanned,
>> in an high level language (I know is more than possible calling
>> access methods from assembler) what is left in our MVS3.8j toolbox?
>>
>> PLI is the more accessible way, if I got it correctly?
>>
>> Peppe.
>>
>>
>
> I remember that even in 1990 ca.,
> I wrote an ASSEMBLER subroutine to be used with COBOL main programs
> to support reading and writing variable length records in COBOL.
> The routine was called VLFILE, IIRC, and it supported
> up to 10 DD-names with fixed names (like VLF00001 to VLF00010)
> which could be opened, read, written and closed using different
> subfunctions (function names passed). That is, it had 10 DCBs internally,
> to be used via calls by the COBOL program (for up to 10 variable length
> files open at the same time, which was more than sufficient).
>
> The parameters looked like this, IIRC:
>
> - function name (OPEN, READ, WRITE, CLOSE)
> - file number (a number between 1 and 10)
> - pointer to record length field
> - pointer to buffer
>
> Don't recall the details, but
>
> for secure processing on read, the caller could specify in the
> length field the maximum length which it could accept (that is,
> the length of the buffer), and VLFILE could return the number of
> bytes actually read ... or an error return code, if the buffer is too
> small.
>
> The return code, IMO, should be returned using normal Reg 15
> conventions (hope this works for COBOL; if not, a separate
> result field for the return code should be provided)
>
> HTH, kind regards
>
> Bernd
>
maybe, this old story was on a VSE system, not MVS ...
but that doesn't really matter; the same idea is valid for
MVS, too. Only the macros to handle the files inside the VLFILE
subroutine will be different; the interface to COBOL will be the same.
Maybe I could find the original source somewhere;
if anybody is interested, I will start searching ... no guarantee for
success.
The original customer doesn't have a mainframe anymore (since 2002),
so there are no legal issues :-)
Kind regards
Bernd