can I update records in a work file?

Software AG's platform-independent programming language with full support for open-source and Internet applications
avtotheam
Posts: 1
Joined: Sun May 01, 2022 11:22 am
Skillset: cics programer
cobol
natural
batch
Referer: google

can I update records in a work file?

Postby avtotheam » Sun May 01, 2022 11:24 am

hi,
I'm trying to read a work file and update a record, is it possible?

User avatar
sergeyken
Posts: 458
Joined: Wed Jul 24, 2019 10:12 pm
Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
Referer: Internet search

Re: can I update records in a work file?

Postby sergeyken » Sun May 01, 2022 7:32 pm

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.
Javas and Pythons come and go, but JCL and SORT stay forever.

enrico-sorichetti
Global moderator
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Skillset: tso,rexx,assembler,pl/i,storage,mvs,os/390,z/os,
Referer: www.ibmmainframes.com

Re: can I update records in a work file?

Postby enrico-sorichetti » Sun May 01, 2022 10:53 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort

User avatar
sergeyken
Posts: 458
Joined: Wed Jul 24, 2019 10:12 pm
Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
Referer: Internet search

Re: can I update records in a work file?

Postby sergeyken » Sun May 01, 2022 11:26 pm

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.
Javas and Pythons come and go, but JCL and SORT stay forever.


  • Similar Topics
    Replies
    Views
    Last post