ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

CA MetaCOBOL+ program with LOCATE PHYSICAL and OBTAIN PHYSICAL

book

Article ID: 49495

calendar_today

Updated On:

Products

Datacom DATACOM - AD Ideal CIS COMMON SERVICES FOR Z/OS 90S SERVICES DATABASE MANAGEMENT SOLUTIONS FOR DB2 FOR Z/OS COMMON PRODUCT SERVICES COMPONENT Common Services Datacom/AD CA ecoMeter Server Component FOC EASYTRIEVE REPORT GENERATOR FOR COMMON SERVICES INFOCAI MAINTENANCE IPC UNICENTER JCLCHECK COMMON COMPONENT Mainframe VM Product Manager CHORUS SOFTWARE MANAGER CA On Demand Portal CA Service Desk Manager - Unified Self Service PAM CLIENT FOR LINUX ON MAINFRAME MAINFRAME CONNECTOR FOR LINUX ON MAINFRAME GRAPHICAL MANAGEMENT INTERFACE WEB ADMINISTRATOR FOR TOP SECRET Xpertware

Issue/Introduction

Description:

We have a CA MetaCOBOL+ application program that does a "LOCATE PHYSICAL" on three tables in a CA Datacom/DB Database that has six Areas. It does an "OBTAIN PHYSICAL" on only the table with the largest record length of the three tables because it uses that record length as a template to put the other two tables in and then writes out any one of the three tables once it finds the record it wants.

My first question is:

We added a 4th table to this program but are unable to select/find any records on this new table, even though we know we have thousands of records.

My real question is:

Do all tables have to be in the same physical "Area" of a Database to do a "Locate/Obtain Physical?

Solution:

LOCATE PHYSICAL and OBTAIN PHYSICAL are Metacobol statements.

Their related Datacom/DB commands are respectively GSETP and GETPS.

LOCATE and OBTAIN PHYSICAL as well as other Metacobol statements can be found in CA-MetaCOBOL+ Program Development Reference CA-DATACOM/DB.
Their corresponding Datacom/DB commands can be found in the Appendix A for same manual.

GETPS and GSETP commands can be found in CA Datacom/DB Programming Guide.

"GETPS is a physical sequential command which retrieves the next physical record in an Area. Before using GETPS, issue a GSETP command to establish the table name and the associated elements that you want to retrieve."

"GSETP is a physical sequential command which you use to establish the table name and element list to set the start of a data area for physical block reads. Multiple tables in one area may participate in the record selection."

So the answer to your real question is:

YES, all the tables have to be in the same physical Area of a Database to do a "Locate/Obtain Physical".

Environment

Release:
Component: DB