can I update records in a work file?



Software AG's platform-independent programming language with full support for open-source and Internet applications

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?
avtotheam
 
Posts: 1
Joined: Sun May 01, 2022 11:22 am
Has thanked: 0 time
Been thanked: 0 time

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.
User avatar
sergeyken
 
Posts: 438
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

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
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

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.
User avatar
sergeyken
 
Posts: 438
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times


Return to Natural

 


  • Related topics
    Replies
    Views
    Last post