- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: How to define arguments for callable programs ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-17-2006 07:02 AM
тАО08-17-2006 07:02 AM
How to define arguments for callable programs written in COBOL
Thanks,
John
OpenVMS v7.2
COBOL v2.6-1060
Alpha hardware
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-17-2006 07:45 AM
тАО08-17-2006 07:45 AM
Re: How to define arguments for callable programs written in COBOL
[Welcome to the HP ITRC OpenVMS Forum]
All this is nswerred in great detail in the Cobol Users Guide: "Interprogram Communication
12.4 Accessing Another Program├в s Data Division"
You can only receive by reference.
You'll have to play games (typically LIB$COPYxxxx and LIB$MOVxxx calls, or even cobol helper functions) to deal with descriptors. And "SET {pointer-id} . . . TO REFERENCE OF identifier" to get at data passed by value.
"A called COBOL subprogram must have arguments passed to it using
BY REFERENCE, which is the default, or BY CONTENT. BY VALUE,
OMITTED, and BY DESCRIPTOR are HP extensions and will not work
as expected if passed to a COBOL program. These argument-passing
mechanisms are necessary when calling Run-Time Library Routines and
system service routines as described in Chapter 13."
Good luck,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-17-2006 07:57 AM
тАО08-17-2006 07:57 AM
Re: How to define arguments for callable programs written in COBOL
Thank you for the detailed response. I have been away from VMS for about 4 years. A little rusty, but that info sounds familiar. Thanks for the doc reference.
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-17-2006 10:47 PM
тАО08-17-2006 10:47 PM
Re: How to define arguments for callable programs written in COBOL
Attached is a COBOL example program that receives arguments BY DESCRIPTOR (or more specifically, receives Descriptors BY REFERENCE :-)
Look for the TIP_LOGON routine, and also the OUT_MSG that is called by SYS$PUTMSG with the message text passed BY DESCRIPTOR.
I don't think there's and BY VALUE passing in there but, as Hein pointed out, you just SET WS_POINTER_VAR TO REFERENCE LINKAGE_SECTION_VAR and the 32-bit value will be stuck in your pointer. (What if it's a pointer-64?)
Regards Richard Maher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2006 12:38 AM
тАО08-18-2006 12:38 AM
Re: How to define arguments for callable programs written in COBOL
VMS Features from Cobol. If you search the data base, there are a bunch of examples of various calls.
Search under Example-COBOL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2006 07:13 AM
тАО08-18-2006 07:13 AM
Re: How to define arguments for callable programs written in COBOL
Thanks,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2006 07:45 AM
тАО08-18-2006 07:45 AM
Re: How to define arguments for callable programs written in COBOL
It appears they are in an older database.
If you give me your email address I'll send you some examples, or log a call.
Bob C.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2006 08:53 AM
тАО08-18-2006 08:53 AM
Re: How to define arguments for callable programs written in COBOL
PLEASE, no plain e-mail adresses!
It is easy enough to morph them such tat a human can reconstruct it.
These fora, like so many others, are quite popular for address-minibg!.
I wil ask a moderator to change it aASAP.
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2006 09:27 AM
тАО08-18-2006 09:27 AM
Re: How to define arguments for callable programs written in COBOL
Not much has changed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2006 02:02 AM
тАО08-21-2006 02:02 AM
Re: How to define arguments for callable programs written in COBOL
Here's one I prepared earlier :-)
I knew I had a reasonable example of BY VALUE passing in COBOL so here it is. (A good example of I$CC calling also, if I do say so myself)
Good luck!
Regards Richard Maher