Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Dynamic array request/response containers

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
Suja.Sai

New User


Joined: 26 Sep 2008
Posts: 12
Location: Bangalore

PostPosted: Tue Jan 24, 2017 11:37 am    Post subject: Dynamic array request/response containers
Reply with quote

Hi,

We have the below requirement.

The input request container has the count of number of records passed in the input request array container. For each input record fetched, we have to query the table and if the record is found in the table, then we have to put it in the response array container.

The response array container is declared as an unbounded dynamic array.

We do not have the count of the output records until we process the final input record. For each input record, there may/maynot be an output record.


Please suggest if the below approach is ok to populate the dynamic response array container?

Do the below processing for each record fetched from the table...
1) Calculate the dynamic response array length for the fetched record
2) GetMain
3) Populate the response array container
4) Put the response array container
5) FreeMain

I doubt if it is a good practice to use getmain and freemain frequently in a loop. Please let me know if there are other better ways to achieve this.


Please help.

Thanks,
Suja
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2465
Location: NY,USA

PostPosted: Tue Jan 24, 2017 11:51 am    Post subject:
Reply with quote

How if you build the output of all into cobol array and from there then into the response array containers?
Back to top
View user's profile Send private message
Suja.Sai

New User


Joined: 26 Sep 2008
Posts: 12
Location: Bangalore

PostPosted: Tue Jan 24, 2017 12:17 pm    Post subject:
Reply with quote

Is there any other way to do this other than using a cobol internal array?
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 Group selective VB records - Trailer ... Premnath_TJ DFSORT/ICETOOL 12 Sun Sep 13, 2020 3:38 am
No new posts Dynamic file read via JCL abdulrafi JCL & VSAM 4 Fri Aug 14, 2020 11:51 am
No new posts COBOL batch program using large size ... Akriti Mishra COBOL Programming 3 Thu Mar 26, 2020 11:37 pm
No new posts COBOL - Array result in single variab... vinu78 COBOL Programming 3 Thu Feb 20, 2020 5:29 pm
No new posts Dynamic cursor name in Cobol program Jlevine COBOL Programming 1 Fri Feb 14, 2020 2:55 am

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