On Sep 14, 2012, at 4:19 PM, Dave McGuire wrote:
On 09/14/2012 03:37 PM, Dennis Boone wrote:
so I updated the MODPARAMS.DAT, rebooted and ran NETCONFIG.COM, but I'm
getting errors when attempting to reach out over the ethernet. I know
the physical network connection is OK because tcpip is working fine.
Wasn't there something about starting DECnet first? Try rebooting again
now that the reconfig is done.
Starting DECnet changes the MAC address of the interface...could it
have been an ordering dependency there?
-Dave
That's definitely a dependency, unless you have a type of interface that supports multiple MAC addresses. The early ones (UNA and Lance) do not. QNA does, LQA emulates that but doesn't really want to. Tulip and later DEC-designed Ethernet adapters (and the FDDI adapters, for those of you that have one) all support multiple MAC addresses, because it was written into the DEC Ethernet architecture specification as a requirement.
paul
On 9/14/12 3:51 PM, Mark Wickens wrote:
On 14/09/12 20:37, Dennis Boone wrote:
> so I updated the MODPARAMS.DAT, rebooted and ran NETCONFIG.COM, but I'm
> getting errors when attempting to reach out over the ethernet. I know
> the physical network connection is OK because tcpip is working fine.
Wasn't there something about starting DECnet first? Try rebooting again
now that the reconfig is done.
De
Well, I never thought this would fix a VMS issue, but rebooting it solved the problem.
Sorry for wasting your bandwidth ;)
Thanks for the help!!!
Mark.
As Dave says, DECnet needs to change the MAC address on the network interface. If you booted and TCP/IP came up and then you fiddled with and started DECnet, the MAC address was already locked in by TCP And DECnet wasn't able to change it. The rebooting allowed things to happen in the proper order. Technically, you could have stopped TCP and then started DECnet and then re-started TCP and it probably would have worked - unless the sysgen parameters were needed and then only the reboot would have done it.
John H. Reinhardt
On 09/14/2012 03:37 PM, Dennis Boone wrote:
so I updated the MODPARAMS.DAT, rebooted and ran NETCONFIG.COM, but I'm
getting errors when attempting to reach out over the ethernet. I know
the physical network connection is OK because tcpip is working fine.
Wasn't there something about starting DECnet first? Try rebooting again
now that the reconfig is done.
Starting DECnet changes the MAC address of the interface...could it
have been an ordering dependency there?
-Dave
--
Dave McGuire, AK4HZ
New Kensington, PA
so I updated the MODPARAMS.DAT, rebooted and ran NETCONFIG.COM, but I'm
getting errors when attempting to reach out over the ethernet. I know
the physical network connection is OK because tcpip is working fine.
Cohort in crime points out that you do need to do the autogen dance to
get those modparams changes noticed, and that the lavc stuff may nail up
the interface before decnet gets there, so scssystemid and nodeid
matching may be important here.
De
On 14/09/12 20:37, Dennis Boone wrote:
> so I updated the MODPARAMS.DAT, rebooted and ran NETCONFIG.COM, but I'm
> getting errors when attempting to reach out over the ethernet. I know
> the physical network connection is OK because tcpip is working fine.
Wasn't there something about starting DECnet first? Try rebooting again
now that the reconfig is done.
De
Well, I never thought this would fix a VMS issue, but rebooting it solved the problem.
Sorry for wasting your bandwidth ;)
Thanks for the help!!!
Mark.
so I updated the MODPARAMS.DAT, rebooted and ran NETCONFIG.COM, but I'm
getting errors when attempting to reach out over the ethernet. I know
the physical network connection is OK because tcpip is working fine.
Wasn't there something about starting DECnet first? Try rebooting again
now that the reconfig is done.
De
On 13/09/12 12:06, Sampsa Laine wrote:
All I need is a function in C that takes a string and computes it's SHA1 hash (I've got the code for this) and returns the SHA1 hash as a string, I was thinking along the lines of
int sha1hash(char *stringToHash, char *hashStringOutput); /* returns -1 if something borks, otherwise 0 */
Anyone got a nice little bit of code for:
a) Wrapping that with the OpenVMS calling standard stuff in C (the strings will be passed in as descriptors etc, so I need to "unpack" them I suppose)
b) An example call from COBOL to that wrapper..
Anyone? :)
OK, well, my suggestion for these kinds of problems is 'DECUS archive'. If I ever get my semantic web browser up and running it will make this kind of issue trivial ;)
In the meantime I did a manual search of packages in the archive containing both 'C' and 'COB' files.
This was the list I got:
./vax89a1/cvlug/escdemo/escdemo-c.c
./vmslt01b/vu/cdwrite15_vms.c
./vmslt01b/vu/chkpw.c
./vmslt01b/vu/enable-ide.c
./vmslt01b/vu/fast_io_copy.c
./vmslt01b/vu/grant_revoke_id.c
./vmslt01b/vu/ide-info.c
./vmslt01b/vu/iishack2000-printerexploit.c
./vmslt01b/vu/rwmbx.c
./vmslt01b/vu/tcpfilter.c
./vax91b/france_1991/vaxf91a/vms/copy_folder.c
./vax91b/france_1991/vaxf91a/vms/get3.c
./vax91b/france_1991/vaxf91a/vms/latsym$setup.c
./vax91b/france_1991/vaxf91a/vms/mall.c
./vax91b/france_1991/vaxf91a/vms/show_cursor.c
./vax90b1/france/vaxf90a/vms/decw$creterm.c
./vax90b1/france/vaxf90a/vms/photo.c
./vax90b1/france/vaxf90a/vms/shar.c
These are C files contained in packages that also contain files with extension .COB
They are rooted here: http://www.decuslib.com/decus/http://www.decuslib.com/decus/vax91b/france_1991/vaxf91a/vms/
In there are a number of COBOL files. I single out one here: find_file_with_selection.cob this calls a number of external routines for example:
* On retrouve l'adresse de l'Item Liste
CALL "LIB$ANALYZE_SDESC" USING
BY DESCRIPTOR ITMLST
BY REFERENCE DUMMY1 ITMLST_ADDRESS.
CALL "LIB$MOVC3" USING DUMMY1
BY VALUE ITMLST_PTR
BY REFERENCE ITMLST_MASK.
* Taille du BUFFER...
CALL "LIB$GET_VM" USING TAILLE_BUFFER
BY REFERENCE BUFFER_ADDRESS
GIVING RETCODE.
IF RETCODE IS FAILURE THEN GO TO FIN.
* Attributes BLOCK : NBR_ITEMS * 8 + 4
MULTIPLY 8 BY NBR_ITEMS GIVING TAILLE_ATRBLK.
ADD 4 TO TAILLE_ATRBLK.
CALL "LIB$GET_VM" USING TAILLE_ATRBLK
BY REFERENCE ATRBLK_ADDRESS
GIVING RETCODE.
IF RETCODE IS FAILURE THEN GO TO FIN.
Hopefully with a few examples of calling external routines within
the archive you should be able to figure out what you need to do.
Regards, Mark.
--
http://www.wickensonline.co.ukhttp://declegacy.org.uk
All I need is a function in C that takes a string and computes it's SHA1 hash (I've got the code for this) and returns the SHA1 hash as a string, I was thinking along the lines of
int sha1hash(char *stringToHash, char *hashStringOutput); /* returns -1 if something borks, otherwise 0 */
Anyone got a nice little bit of code for:
a) Wrapping that with the OpenVMS calling standard stuff in C (the strings will be passed in as descriptors etc, so I need to "unpack" them I suppose)
b) An example call from COBOL to that wrapper..
Anyone? :)
Sampsa
On 13 Sep 2012, at 14:01, Mark Wickens wrote:
On 13/09/12 01:33, Jordi Guillaumes i Pons wrote:
It should be no problem. All the DEC compilers share a common ABI (VMS calling and condition handling standard). There is a manual in the "gray wall" just about that. I can't search for it now, but iirc the title is easy to pick up.
Basic summary: scalars are passed by reference, strings are passed by descriptor address. VMS C provides macros to build and manage descriptors (the ASCIZ convention is fortunately not used).
The HP OpenVMS Calling Standard manual I think is what you are referring to.
Unfortunately I don't think it's going to help Sampsa much - I had a quick flick through and it's all low level detail, it doesn't contain any examples of calling one language from another. More of a specification of the interface for new language implementations.
Mark
--
http://www.wickensonline.co.ukhttp://declegacy.org.uk
On 13/09/12 01:33, Jordi Guillaumes i Pons wrote:
It should be no problem. All the DEC compilers share a common ABI (VMS calling and condition handling standard). There is a manual in the "gray wall" just about that. I can't search for it now, but iirc the title is easy to pick up.
Basic summary: scalars are passed by reference, strings are passed by descriptor address. VMS C provides macros to build and manage descriptors (the ASCIZ convention is fortunately not used).
The HP OpenVMS Calling Standard manual I think is what you are referring to.
Unfortunately I don't think it's going to help Sampsa much - I had a quick flick through and it's all low level detail, it doesn't contain any examples of calling one language from another. More of a specification of the interface for new language implementations.
Mark
--
http://www.wickensonline.co.ukhttp://declegacy.org.uk
It should be no problem. All the DEC compilers share a common ABI (VMS calling and condition handling standard). There is a manual in the "gray wall" just about that. I can't search for it now, but iirc the title is easy to pick up.
Basic summary: scalars are passed by reference, strings are passed by descriptor address. VMS C provides macros to build and manage descriptors (the ASCIZ convention is fortunately not used).
Jordi Guillaumes i Pons
Barcelona - Catalunya - Europa
El 12/09/2012, a les 20:21, Sampsa Laine <sampsa at mac.com> va escriure:
Ah,
That for example calling C from COBOL is for OSF/1 only. I wonder how one does this on VMS..
Sampsa
On 12 Sep 2012, at 21:10, Michael Young wrote:
found this at odl.sysworks.biz/disk$axpdocdec971/progtool/d37aaa48.p341.bkb#2110 :
Example 12-8: C Include File " cobfunc "
void cobcancel ( /* CANCEL the named COBOL routine */
char *name
);
int cobcall ( /* Call a COBOL program from a C routine */
char *name, /* READ: name of the program */
int argc, /* READ: how many arguments */
char **argv /* READ: array of pointers to the arguments */
);
int cobfunc ( /* Call a COBOL program from a C routine, then CANCEL it */
char *name, /* name of the program */
int argc, /* how many arguments */
char **argv /* array of pointers to the arguments */
);
#ifdef __osf__
void cob_init ( /* init the RTL */
int argc, /* argument count */
char **argv, /* arguments */
char **envp /* environment variable pointers */
);
#endif
--Mike
On Sep 12, 2012, at 1:54 PM, Sampsa Laine <sampsa at mac.com> wrote:
Does anybody happen to have a nice sample bit of code on how to call a C function from DEC COBOL?
The documentation gave me this code:
/* crtn - c function to test use of argc and argv in c routines
* called from HP COBOL */
#include "cobfunc.h"
#include <stdio.h>
extern int _ _Argc;
extern char **_ _Argv[];
#define argc _ _Argc
#define argv (*_ _Argv)
void crtn()
{
int i;
i = 0;
for (i = 0; i < argc; i++) {
printf("argv[%d] = %s\n", i, argv[i]);
}
}
But I can't find cobfunc.h anywhere
Sampsa
On 12 Sep 2012, at 20:18, Sampsa Laine wrote:
Well this whole COBOL thing is verging on the humour value anyway, I think I might leave that til later :)
Sampsa
On 12 Sep 2012, at 20:13, Jordi Guillaumes i Pons wrote:
IIRC there was no screen section support in VAX COBOL.
Perhaps this can be a good excuse to learn the SMG$ RTL routines...
Jordi Guillaumes i Pons
Barcelona - Catalunya - Europa
El 12/09/2012, a les 17:10, Sampsa Laine <sampsa at mac.com> va escriure:
Tried to compile my little program on GORVAX but it has problems with the SCREEN SECTION that works on the AXP version..
I'm thinking I must have an old compiler or something. Anyone know what the latest is?
Anyone have a kit?
Sampsa
Michael Young
young at ecn.purdue.edu