Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Accessing VSAM from C/C++ - How to pass BUFND/BUFNI values

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> HomeWorks & Requests
View previous topic :: :: View next topic  
Author Message
syamaprasad pg

New User


Joined: 04 Jul 2012
Posts: 2
Location: UK

PostPosted: Fri Jul 06, 2012 2:52 am    Post subject: Accessing VSAM from C/C++ - How to pass BUFND/BUFNI values
Reply with quote

Hi,
I am writing an Z/os C++ program to extract and process data from a VSAM KSDS file. The program is called by a PERL CGI script running under Z/os Webserver.
It all worked fine untill I increased the number of records in the VSAM file to around 10000. Then I saw a significant reduction in the response time of VSAM. This in turn resulted the CGI script to timeout and a "no responce" message to the web user.
When I tried tweaking the db performance by increasing the BUFND/BUFNI I found that there is nothing similar to MODECB or ACB in C/C++ , where I can give these parameters. fopen or fread/flocate doesn't accept any "AMP=" parameters. I can't use a DD statement to override BUFND/BUFNI (since this program is running under webserver). I don't think I can use __asm in c++ to supply assembler call to modecb(even if I can I don't know where I will get ACB name from ) .
Is this possible at all in C/C++? (i.e passing of AMP= parameter without using JCL DD statements?).
METAL C is not an option for me since I use STL in my programs :-)
Back to top
View user's profile Send private message

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2504
Location: Atlanta, Georgia, USA

PostPosted: Fri Jul 06, 2012 3:36 am    Post subject: Reply to: Accessing VSAM from C/C++ - How to pass BUFND/BUFN
Reply with quote

The only thing that comes close is the "FIELDS" keyword of the "SHOWCB" Macro, where you can specify -

BUFNO - Number of buffers used for the data or index component.

As you've said, "BUFNI" and "BUFND" are normally defined at the "ACB" level.

Is there an equivalent to the "IFGACB" Macro in C/C++?

At X'10' of the above DSECT, you'll find label ACBBUFND and at X'12' you'll find ACBBUFNI. Both are aligned halfwords.

To establish addressability (R10 used as an example with VSAMACB the label for the ACB) -

Code:

          LA    R10,VSAMACB         POINT TO 'ACB'
          USING IFGACB,R10          INFORM ASSEMBLER         
          OPEN  ((R10),(INPUT)),    OPEN ACB AS 'INPUT', AMODE=31       X
                MODE=31

HTH....
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8154
Location: East Dubuque, Illinois, USA

PostPosted: Fri Jul 06, 2012 3:41 am    Post subject:
Reply with quote

Have you tried an ALTER on the cluster to give it more BUFFERSPACE?
Back to top
View user's profile Send private message
syamaprasad pg

New User


Joined: 04 Jul 2012
Posts: 2
Location: UK

PostPosted: Fri Jul 06, 2012 12:20 pm    Post subject: Reply to: Accessing VSAM from C/C++ - How to pass BUFND/BUFN
Reply with quote

Hi ,
Thanks for the quick replies
1) Alter on BUFSPC did't seem to do much for my program performance. At last I was able to achieve some of my performance goals by changing the program logic.
But since the AMP= parameters are so readily available for assembler , I am failing to see the reason why it is not open for a c++ program.
Still like to pass these parameters via the program and see if it gives some boost to my pgm.
2) I haven't found any VSAM assembly macro equalivant code for C++. Didn't find any thing that points to an ACB structure. It is all so well hidden :-). Did go thru the pseudo hlasm code generated by the compiler and searched for any mention of ACB. None so far.
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 -> HomeWorks & Requests All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
No new posts BI,TO=ZD Changing Values Tyler Dunbar DFSORT/ICETOOL 4 Tue Jul 25, 2017 12:12 am

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