I understand the point of the KEYFROM option in WRITE. For example I could do a VSAM write using:
WRITE FILE(myfile) KEYFROM(mykey) FROM(myrecord)
The Enterprise PL/I for z/OS Language Reference manual also specifies that a KEYTO() option is allowed for WRITE. What would that be used for?
what is the point of WRITE KEYTO?
-
- Registered Member
- Posts: 15
- Joined: Fri Mar 03, 2017 2:01 am
- Contact:
- Akatsukami
- Global Moderator
- Posts: 122
- Joined: Tue Oct 20, 2015 3:20 am
- Location: Bloomington, IL
- Contact:
Re: what is the point of WRITE KEYTO?
The Language Reference does not state that KEYTO can be used with WRITE, but rather with READ; see page 299.
"I come to the conclusion that, men loving according to their own will and fearing according to that of the prince, a wise prince should establish himself on that which is in his own control and not in that of others." -- Niccolò Machiavelli
- Robert Sample
- Global Moderator
- Posts: 1900
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: what is the point of WRITE KEYTO?
From the version 5.1 Programming Guide page 295:
You can obtain the RBA for a record by using the KEYTO option, either on a WRITE statement when you are loading or extending the data set, or on a READ statement when the data set is being read. You can subsequently use an RBA obtained in either of these ways in the KEY option of a READ or REWRITE statement.
-
- Registered Member
- Posts: 15
- Joined: Fri Mar 03, 2017 2:01 am
- Contact:
Re: what is the point of WRITE KEYTO?
On page 313, the syntax diagram shows:
►► WRITE FILE (file-reference) FROM (reference) ►
►
KEYFROM(expression)
KEYTO(reference)
You do not have the required permissions to view the files attached to this post.
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute