[HECnet] Slightly OT - How to concatenate multi line strings in DEC COBOL

Sampsa Laine sampsa at mac.com
Wed Sep 12 18:54:41 PDT 2012


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



More information about the Hecnet-list mailing list