Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
Storage usage in a web service provider.

Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: Storage usage in a web service provider.
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    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1


Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Any limit on usage of cursors ? Jeethendra DB2 1 Sun Jul 12, 2020 10:23 am
No new posts Usage of processor directive and firs... Sakthidevi PL/I & Assembler 4 Fri Apr 10, 2020 6:27 pm
No new posts A job with SYSSTC service class is ge... mighty All Other Mainframe Topics 4 Fri Apr 10, 2020 2:31 pm
No new posts Using Virtual Tape Server TS7700 as c... Apoorva All Other Mainframe Topics 0 Sun Mar 22, 2020 4:47 pm
No new posts usage of CASE in WHERE clause abdulrafi DB2 10 Wed Mar 18, 2020 4:25 pm

Back to Top
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us