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

Storage usage in a web service provider.

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: 180
Location: United States

PostPosted: Tue Jun 04, 2019 8:12 pm
Reply with quote

I do not have a problem, I am just looking to insure a storage technique I am using will not cause problems. I think it is OK, but it doesn't hurt to ask.

I use CICS containers for web services (provider and client). I do not know how many rows my web service providers will return in a response, as that is determined by DB2 cursors. It could be 1, 2, 100, etc. The version of CICS/TS I am using does not support appending containers, so I must acquire the memory for the containers before starting to fill them.

As I said, I don't know how many rows I will actually need, but I do know how many rows the web service client can reasonably handle without choking the server. So, I define the maximum number of occurrences I think it can handle using an occurs clause:

01 SciStatResponse.                             
   05 SciCompletion      PIC X(32).             
   05 SciArray-num       PIC S9(9) COMP-5 SYNC. 
   05 SciArray-cont      PIC X(16).             
01 SciArray-Hdr.                                 
   05 SciArray occurs 99.                       
      10 ResType         PIC X(4).               
      10 ResBatch        PIC X(4).               
      10 ResDocId        PIC X(12).             
      10 ResMessID       PIC X(5).               
      10 ResMessTxt      PIC X(36).             
      10 ResDate         PIC X(24).             
      10 ResExpire       PIC Z(4).           

I then compute the length I actually need to send where XX = the actual number of occurrences used:

COMPUTE OutMem = (Length of SciArray * XX). 
MOVE XX TO SciArray-num.                     
EXEC CICS                                   
    PUT CONTAINER('SCISTAT2001')             
   FROM (SciArray-Hdr)                       

My only concern with this approach is I want to make sure CICS releases all of the memory I defined. I don't see why it wouldn't, but it doesn't hurt to check.
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 Usage of BINSEARCH PL/I PL/I & Assembler 1
No new posts Is there a way to determine Clist usa... CLIST & REXX 0
No new posts DB2 group member usage DB2 0
No new posts Any limit on usage of cursors ? DB2 1
No new posts Usage of processor directive and firs... PL/I & Assembler 4
Search our Forums:

Back to Top