IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

VSAM BUFFER SPACE?


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 178
Location: United States

PostPosted: Thu Mar 22, 2018 2:54 am
Reply with quote

I am getting an ILLOGIC error on a READ UPDATE of an ESDS VSAM file. It has no alternate index, the error occurs on the 34th record of an ESDS that contains 5000+ records. It read and updated the first 33 records with no problems.

EXEC CICS
READ FILE('CERESDS1') UPDATE INTO(ESDSWORK)
RIDFLD(BYTE-CNT) RBA
END-EXEC.

The RBA field is correctly pointing at the 34th record.
RBA = 4080, records are 120 bytes. (4080/120 = 34)
EIBFN = 0602 (READ)
EIBRCODE = 0208202B (ILLOGIC)
EIBRESP = 21
EIBRESP2 = 110 (ILLOGIC)

The only thing I can figure is out of buffers. I have never seen this before. Maybe somebody can shed some light on this.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Mar 22, 2018 3:24 am
Reply with quote

Quote:
The only thing I can figure is out of buffers.


hard to believe ( out of buffers ) ,
the performance might get much worse, but not cause a transaction abend
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Mar 22, 2018 3:25 am
Reply with quote

Buffer shortage would not give you this error. Tracking down the 0208202B gives me
Quote:
32(X'20') You specified an RBA that does not give the address of any data record in the data set.
And you do understand, I hope, that RBA is an offset and hence 4080 is pointing to the 35th record (that is, the first record of the second block) and not the 34th record?
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 178
Location: United States

PostPosted: Thu Mar 22, 2018 7:20 pm
Reply with quote

You are right about the RBA, but that doesn't change anything. There are over 5000 records in the file. The program rewrites all "Z' in in the next row after end of input data. I tested this with an input that contained 1 - 35 rows. If the input contains 5 rows, 5 rows are rewritten with input data, the 6th row is rewritten with all 'Z', and so forth. On a test with 33 input records they rewrite the first 33 ESDS records and write all 'Z' in the 34th (which explains why I was off by one... I was counting input and forgot it rewrites the following record) On a test with 34 input records it rewrites the 34th and fails trying to read 35the record to rewrite all 'Z's.

Here is what File Manager shows:

Code:
000031 6420180224030001D201803080011315051000000000000000113150012JCA
000032 6420180224030001D201803080011315051000000000000000113150012JCA
000033 6420180224030001D201803080011315051000000000000000113150012JCD
000034 ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
000035 6420180224030001D201803080011435051000000000000000114350010000
000036 6420180224030001D201803080011445051000000000000000114450010000
000037 6420180224030001D201803080011455051000000000000000114550010000


Nothing special about record 35 or any other record.

When posting data, common forum courtesy suggest to use the CODE tags
added them for You icon_cool.gif
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 178
Location: United States

PostPosted: Thu Mar 22, 2018 7:43 pm
Reply with quote

I forgot to say the test with 33 input records where it writes all 'Z' to the 34th record was the last test I ran prior to displaying what is in File Manager.

The program is a web service provider that is getting input from a CICS container sent by a web service client. I test it by feeding input using SOAPUI. I am going to change input to a file and run this program in batch to see if it fails there.
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 178
Location: United States

PostPosted: Thu Mar 22, 2018 8:13 pm
Reply with quote

In case anyone asks, here is the VSAM file definition in CICS:

Code:
I FILE                     
RESULT - OVERTYPE TO MODIFY
  File(CERESDS1)           
  Accessmethod(Vsam)       
  Openstatus( Open )       
  Enablestatus( Enabled )   
  Readstatus( Read )       
  Updatestatus( Update )   
  Addstatus( Addable )     
  Browsestatus( Browse )   
  Deletestatus( Nodelete ) 
  Exclstatus(              )
  Disposition( Share )     
  Rlsaccess( Notrls )       
  Emptystatus( Noemptyreq )
  Dsname( TFS.CERIDIAN.INPUT
  Table( Nottable )         
  Loadtype( Noload )       
  Cfdtpool(          )     
  Tablename(          )
  Updatemodel( Locking )         
  Maxnumrecs( 00012000 )         
  Keylength( 000 )               
  Recordsize( 00120 )           
  Rbatype(Notextended)           
  Remotesystem()                 
  Installtime(03/19/18 14:14:01)

CODE' d
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Mar 22, 2018 9:11 pm
Reply with quote

You get the error at record 35

because

(*)
Quote:
The number 35 is a number of motivation, creativity and imagination, adventure, vision and opportunity.


motivation, to find the error
creativity and imagination , You will have to use lots of lateral thinking
adventure, that' s what debugging is
vision, synonym of nightmare
opportunity, to spend a lot of time staring at Your screen

sorry, I could not resist icon_wink.gif

(*) found somewhere on the net
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Thu Mar 22, 2018 9:14 pm
Reply with quote

If I may suggest,
1.Try UNLOCK the ESDS before READNEXT, just to make sure its not getting locked "with a read for update".
2. Try comparing this ESDS definition against the working ESDS definition, spot on any potential differences.
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 178
Location: United States

PostPosted: Thu Mar 22, 2018 9:45 pm
Reply with quote

Rohit Umarjikar wrote:
If I may suggest,
1.Try UNLOCK the ESDS before READNEXT, just to make sure its not getting locked "with a read for update".
2. Try comparing this ESDS definition against the working ESDS definition, spot on any potential differences.


Thanks for the suggestions. The UNLOCK didn't work, but was worth a try. I think I will try a new definition that's a little different, just to see.
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 178
Location: United States

PostPosted: Thu Mar 22, 2018 9:48 pm
Reply with quote

enrico-sorichetti wrote:
You get the error at record 35

because

(*)
Quote:
The number 35 is a number of motivation, creativity and imagination, adventure, vision and opportunity.


motivation, to find the error
creativity and imagination , You will have to use lots of lateral thinking
adventure, that' s what debugging is
vision, synonym of nightmare
opportunity, to spend a lot of time staring at Your screen

sorry, I could not resist icon_wink.gif

(*) found somewhere on the net


Well, I WAS looking for something different to work on! So, it isn't wrong.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Mar 22, 2018 10:34 pm
Reply with quote

What does the system show you with
Code:
CEDC I FI(CERESDS1) GR(*)
(this is a multiple screen display, BTW).
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 178
Location: United States

PostPosted: Thu Mar 22, 2018 10:53 pm
Reply with quote

Robert Sample wrote:
What does the system show you with
Code:
CEDC I FI(CERESDS1) GR(*)
(this is a multiple screen display, BTW).


What you said about "next block" made me think. I used a VSAM tool we have to look at records and it shows the RBA as 4096 instead of 4080. All subsequent RBAs are off by 16 bytes. Record 68 should be 8040 and it's 8056. The next record is 8192, another 16 bytes added. It's adding 16 bytes to the RBA every 4096 bytes. I do not know how this happened, there is nothing in the definition that would cause it. I can't tell if that's just a peculiarity of the VSAM tool we are using, but I think I will redefine the file with 128 byte records.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Mar 22, 2018 11:09 pm
Reply with quote

That could cause an ILLOGIC condition since you'd be reading across the CI boundary.
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 419
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Fri Mar 23, 2018 12:19 am
Reply with quote

It's been many years and all things RRDS are fuzzy, but can you switch to RRN rather than RBA?
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 178
Location: United States

PostPosted: Fri Mar 23, 2018 12:53 am
Reply with quote

dneufarth wrote:
It's been many years and all things RRDS are fuzzy, but can you switch to RRN rather than RBA?


That is part of my problem, too. I haven't used much VSAM in 10 years and probably 25 years since I used an ESDS file. It is being used here as a "scratch pad" file to pass data to batch because it's fast and only CICS can modify it. I remember now that you should always define records that are a factor of the CI size.

Thanks to everyone for jogging my memory!
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 178
Location: United States

PostPosted: Fri Mar 23, 2018 10:42 pm
Reply with quote

A follow-up:

For anyone interested, I have found using RBA for accessing an ESDS file in CICS is unreliable. The RBA value is never consistent, regardless of record size and CI size.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Fri Mar 23, 2018 10:56 pm
Reply with quote

What was RBA value shown when IDCAMS PRINT is done? is it different that what was passed in the program?
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 178
Location: United States

PostPosted: Sat Apr 14, 2018 1:51 am
Reply with quote

Yes.

I have to add 16 bytes to the RBA address every time an ILLOGIC error occurs. The record size is defined as 120, I add 120 to the RBA for each record. The RBA in the file utility goes from 3720 to 3840 to 3960 to 4096 to 4216, etc.

The record and CIsize don't matter, the RBA address will still shift at some point, sometimes by as much as 256 bytes.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts CVDA value for RRDS VSAM dataset. CICS 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
Search our Forums:

Back to Top