Page 1 of 1

can I update records in a work file?

PostPosted: Sun May 01, 2022 11:24 am
by avtotheam
hi,
I'm trying to read a work file and update a record, is it possible?

Re: can I update records in a work file?

PostPosted: Sun May 01, 2022 7:32 pm
by sergeyken
1. There are no “files” in mainframe world. In some cases the word “file” is equivalent to “DDNAME”.

2. Record update (in-place) is possible only when using either BDAM or VSAM access methods to work with datasets. It does not matter either it is a permanent, or a temporary one.

3. Record update (creating a new copy of it) is possible with any dataset. It does not matter either it is a permanent, or a temporary one.

Re: can I update records in a work file?

PostPosted: Sun May 01, 2022 10:53 pm
by enrico-sorichetti
the question is about NATURAL work files, not mvs datasets

in many 4th generation languages
work file is a perfectly legal term
and people who know the language are able to understand the concept

Re: can I update records in a work file?

PostPosted: Sun May 01, 2022 11:26 pm
by sergeyken
Anyway, the work "files" do correspond to zOS work "DDNAMES":

Natural in Batch Mode under z/OS wrote:
CMWKFnn - Work Files 01-32

These datasets can be used by Natural work file statements like READ WORK nn and WRITE WORK nn.

If no DCB information (RECFM, LRECL, BLKSIZE, etc.) is available in the JCL or in the VTOC entry for the dataset, the defaults are defined by the WORK profile parameter or the NTWORK macro in the Natural parameter module.

The work file dataset names can be overwritten by subparameter DEST.