Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RXVSAM oddity

Status
Not open for further replies.

rexxhead

Programmer
Jul 31, 2002
611
US
Something weird is happening. This is less a REXX question than it is an RXVSAM question.

I have a VSAM KSDS and I add a record to it:
Code:
vrc = RXVSAM("OPENOUTPUT","$VS","KSDS")
vrc = RXVSAM("WRITE","$VS",@key,"NEWREC")
vrc = RXVSAM("CLOSE","$VS")
vrc = RXVSAM("OPENINPUT","$VS","KSDS")
vrc = RXVSAM("READ","$VS",@key,"INREC")

The READ fails vrc=16 (record not found) although all other operations gave vrc=0. I have watched this operate (and fail consistently) and I am stumped.

Does anyone have any suggestions?




Frank Clarke
--America's source for adverse opinions since 1943.
 
What happens if you log off, log back on, and then try the read?
 
Thanx for the suggestion, papa.

Although it sounded like a good plan, vrc=0016 (record not found). The record is there; I can see it in FileAid and the hex configuration appears correct (uppercase letters, no nulls where blanks are expected, etc.).

I'm going to reload the cluster.

Frank Clarke
--America's source for adverse opinions since 1943.
 
Unload
Delete/Define
Reload

Still can't find it with a full-key READ...

What am I not seeing?

Frank Clarke
--America's source for adverse opinions since 1943.
 
I think I have a solution:

The panel where the key-to-be found is entered delivers whatever was typed. I expanded that to the full length of the key and it appears to be working.

Ah, sweet mystery of life, at last I've found you...

Frank Clarke
--America's source for adverse opinions since 1943.
 

"Ah, sweet mystery of life, at last I've found you... "

"Oh, you men are all alike. Seven or eight quick ones and then you're out with the boys to boast and brag."
Madeline Kahn/Elizabeth . . .

"I expanded that to the full length of the key and it appears to be working."
Good catch! The difference beteen spaces and "nothing" (binary zeros)?





 
papdba said:
Good catch! The difference beteen spaces and "nothing" (binary zeros)?

I'm not sure. It is the difference between doing a READ with a key-value whose length is less than that specified in the DEFINE and with one whose length is equal to the DEFINE. It looks like the system is saying to RXVSAM "Gosh, RXVSAM, I don't have a record here with a 17-byte key. All of them have 50-byte keys."

The code has facility for doing a READGENERIC and that has always worked, even when READ has just failed. [surprise]

Frank Clarke
--America's source for adverse opinions since 1943.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top