AllExperts > Cobol 
Search      
Cobol
Volunteer
Answers to thousands of questions
 Home · More Cobol Questions · Answer Library  · Encyclopedia ·
More Cobol Answers
Question Library

Ask a question about Cobol
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About David Nelson
Expertise
I specialize in IBM z/OS COBOL and MicroFocus OCDS and Server Express non-OOP. Design, coding and performance oriented questions. Also linking to IBM Assembler from COBOL. Because the rules change with version, please state language level, version and platform environment. See CICS for questions about CICS.

Experience

Past/Present clients
Major Financial Institutions, State of NC (DHHS), Manufacturing, Financial services, Warehousing, Software developer and others.

 
   

You are here:  Experts > Computing/Technology > Cobol > Cobol > cobol

Cobol - cobol


Expert: David Nelson - 11/6/2009

Question
Is there any, pointer concept in cobol if yes please tell me it in detail with an example ?

Answer
COBOL does support POINTERs.
They can be associated with Data in either FILE, LINKAGE or a STORAGE section.
Also, you can have FUNCTION POINTER similar to C++ Function pointers and Procedure Pointer which works the same way.

The use of pointers is not real simple, but it is straight forward.  Consult your language reference manual for your specific compiler implementation for what is supported and sample code.

The data pointer can be set by: [SET pointer-name to ADDRESS OF Storage-variable-name] and related syntax.
Data pointers are commonly used.  I have never used a 'function pointer' in COBOL.

David  

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.