COBOL and FORTRAN programming on RSX-11M-Plus

484 views
Skip to first unread message

Owen Morgan

unread,
Feb 8, 2021, 5:50:49 PM2/8/21
to [PiDP-11]

Hoping someone can help me ... I've tried compiling and linking COBOL and FORTRAN programs but not having any success.

Compilation seems to complete with no errors, but attempting to run the linker fails ...

$ DIR *.FTN


Directory DU0:[USER]
8-FEB-2021 16:45

TMCLI.FTN;1         22.        18-DEC-1998 02:46
AREA.FTN;2          1.         07-FEB-2021 17:37
DO.FTN;1            3.         07-FEB-2021 17:38
HELLO.FTN;2         1.         07-FEB-2021 17:54

Total of 27./27. blocks in 4. files

$ FORTRAN TMCLI.FTN
$ LINK TMCLI.OBJ
LIN -- *DIAG*-11 undefined symbols segment TMCLI


    EOLST$
    EXIT
    EXIT$
    ICI$
    IOAI$
    ORGSQ$
    OSF$
    OTI$
    $NAM$
    $OTSVA
    $SEQC


Can someone tell me where I am going wrong? I'm also running into issues linking COBOL .obj where link completes but produces a .tsk that fails to run.

Johnny Billquist

unread,
Feb 8, 2021, 6:01:42 PM2/8/21
to pid...@googlegroups.com
Simple - you need to also include the libraries for the language.
With FORTRAN, that would be F77FCS if you are using FCS file services,
and F77RMS if you use RMS.

To keep it simple, stay with FCS for now.

So:

LINK TMCLI,LB:[1,1]F77FCS/LIB

With Cobol you have the same thing. However, Cobol is also slightly more
complicated, and you usually have the Cobol compiler generate a command
file used to actually link.

I can't exactly recall how you get that command file generated. You need
to have the command BLD installed, which helps with it, but I think you
should look in the manuals for details here.

Johnny
> --
> You received this message because you are subscribed to the Google
> Groups "[PiDP-11]" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pidp-11+u...@googlegroups.com
> <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pidp-11/de2708b2-53e4-48c2-aecd-89cd630c365cn%40googlegroups.com
> <https://groups.google.com/d/msgid/pidp-11/de2708b2-53e4-48c2-aecd-89cd630c365cn%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: b...@softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol

Owen Morgan

unread,
Feb 8, 2021, 7:40:32 PM2/8/21
to [PiDP-11]
Brilliant, I thought I might be missing something. Its not quite as simple as development on the Altair 8800!

I'll know what to look for in the documentation now, I'm slowly downloading (and printing some) of the DEC manuals.

I'm very impressed so far!

Thanks again!

Owen Morgan

unread,
Feb 8, 2021, 9:06:26 PM2/8/21
to [PiDP-11]
I think we're up and running now ...

$ FORTRAN HELLO
$ LINK HELLO,LB:[1,1]F77FCS/LIB
$ DIR HELLO.*


Directory DU0:[1,1]
8-FEB-2021 20:04

HELLO.FTN;2         1.         08-FEB-2021 20:03
HELLO.OBJ;2         1.         08-FEB-2021 20:03
HELLO.TSK;1         40.     C  08-FEB-2021 20:03

Total of 42./42. blocks in 3. files

$ RUN HELLO.TSK
HELLO WORLD        

On Monday, February 8, 2021 at 5:01:42 PM UTC-6 b...@softjar.se wrote:

Eric N

unread,
Feb 8, 2021, 10:05:18 PM2/8/21
to [PiDP-11]
What's the difference between LINK and TKB?  The syntax is a little different but the results appear to be the same:
LINK HELLO,LB:[1,1]F77FCS/LIB
TKB HELLO=HELLO,LB:[1,1]f77FCS/LB

Johnny Billquist

unread,
Feb 9, 2021, 5:48:59 AM2/9/21
to Eric N, [PiDP-11]
Simple...

$ set debug

$ link foo,bar/lib
FOO,,=
FOO,BAR/LB
//
TKB @ATLNK.TMP
$

So, as you can see, LINK is simply a way to run TKB from DCL, with DCL
syntax instead of TKB syntax.

SET DEBUG is always a pretty useful command in DCL in RSX, to see what
happens under the hood.

Johnny
> <https://groups.google.com/d/msgid/pidp-11/de2708b2-53e4-48c2-aecd-89cd630c365cn%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/pidp-11/de2708b2-53e4-48c2-aecd-89cd630c365cn%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> Johnny Billquist || "I'm on a bus
> || on a psychedelic trip
> email: b...@softjar.se || Reading murder books
> pdp is alive! || tryin' to stay hip" - B. Idol
>
> --
> You received this message because you are subscribed to the Google
> Groups "[PiDP-11]" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pidp-11+u...@googlegroups.com
> <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pidp-11/b96116f4-0015-4f60-8901-cd39462d477an%40googlegroups.com
> <https://groups.google.com/d/msgid/pidp-11/b96116f4-0015-4f60-8901-cd39462d477an%40googlegroups.com?utm_medium=email&utm_source=footer>.

sammy crawford

unread,
Mar 24, 2021, 12:20:28 AM3/24/21
to [PiDP-11]
I'm probably late on this thread, but for the standard C81 "hello world" program, the COBOL thing is:
COBOL WORLD.CBL (you can omit the .CBL)
LINK/C81 WORLD.

Sammy



Neal G.

unread,
Mar 27, 2021, 1:20:39 PM3/27/21
to [PiDP-11]
Thanks Sammy,

I'd also add that this compile command is useful if you're working with COBOL source developed on other systems:
COBOL/ANSI_FORMAT WORLD.CBL
The ANSI_FORMAT switch informs the compiler that the source is in the traditional (standard) column layout.

For those getting started, Johnny Billquist has kindly provided the documentation on his MIM site,
which I could not find on bitsavers:
COBOL-81,  RSTS Users's Guide V2.3,  http://mim.update.uu.se/manuals/layered/c813.pdf

Don't be confused that the manuals are for RSTS. It seems that COBOL-81 runs in the RSX subsystem on RSTS so most of the information in the manuals is directly applicable to those of us running RSX-11M-Plus.

- Neal G.

Johnny Billquist

unread,
Mar 27, 2021, 3:03:17 PM3/27/21
to pid...@googlegroups.com
On 2021-03-27 18:20, Neal G. wrote:
> Thanks Sammy,
>
> I'd also add that this compile command is useful if you're working with
> COBOL source developed on other systems:
> COBOL/ANSI_FORMAT WORLD.CBL
> The ANSI_FORMAT switch informs the compiler that the source is in the
> traditional (standard) column layout.

I think you don't even need to add the .CBL. It assumes the default
extension, if none is given.
However, with COBOL-81, I think the default extension might be .C81

> For those getting started, Johnny Billquist has kindly provided the
> documentation on his MIM site,
> which I could not find on bitsavers:
> COBOL-81,  RSTS Users's Guide V2.3,
> http://mim.update.uu.se/manuals/layered/c813.pdf
>
> Don't be confused that the manuals are for RSTS. It seems that COBOL-81
> runs in the RSX subsystem on RSTS so most of the information in the
> manuals is directly applicable to those of us running RSX-11M-Plus.

That's why I put them there. I would love to find the RSX manuals, but I
haven't. But most things are the same. The actual installation procedure
is different between the systems, and there might be other small
differences, but the large majority of information applies just as well
under RSX. So if you are interested in Cobol development under RSX,
those manuals should be enough to get you going.

Speaking of which - if there is anyone around who is into Cobol
development, and who would be interested in helping me out, I could use
some aid in developing a library for doing TCP/IP communication from
Cobol under RSX.

I have libraries for C, FORTRAN-77, BASIC+2, OMSI Pascal and Xlisp. But
nothing for Cobol... And I don't know Cobol enough myself.

Fun fact - MIM is actually an RSX system, which is serving these
manuals... And those Cobol manuals are huge:

.dir us:[manUALS]c8*.*


Directory DU1:[MANUALS]
27-MAR-21 20:02

C811.PDF;1 23065. 31-AUG-16 21:12
C812.PDF;1 343303. 31-AUG-16 21:12
C813.PDF;1 465677. 31-AUG-16 21:14
C814.PDF;1 8604. 31-AUG-16 21:17

Total of 840649./840649. blocks in 4. files

Johnny

>
> - Neal G.
>
> On Tuesday, March 23, 2021 at 11:20:28 PM UTC-5 sfraw...@gmail.com wrote:
>
> I'm probably late on this thread, but for the standard C81 "hello
> world" program, the COBOL thing is:
> COBOL WORLD.CBL (you can omit the .CBL)
> LINK/C81 WORLD.
>
> --
> You received this message because you are subscribed to the Google
> Groups "[PiDP-11]" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pidp-11+u...@googlegroups.com
> <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pidp-11/393f9950-bbdd-4cbd-b65f-2526cf7f191fn%40googlegroups.com
> <https://groups.google.com/d/msgid/pidp-11/393f9950-bbdd-4cbd-b65f-2526cf7f191fn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Johnny Billquist

unread,
Mar 27, 2021, 3:08:11 PM3/27/21
to pid...@googlegroups.com
On 2021-03-27 20:03, Johnny Billquist wrote:
> On 2021-03-27 18:20, Neal G. wrote:
>> Thanks Sammy,
>>
>> I'd also add that this compile command is useful if you're working
>> with COBOL source developed on other systems:
>> COBOL/ANSI_FORMAT WORLD.CBL
>> The ANSI_FORMAT switch informs the compiler that the source is in the
>> traditional (standard) column layout.
>
> I think you don't even need to add the .CBL. It assumes the default
> extension, if none is given.
> However, with COBOL-81, I think the default extension might be .C81

Nope. My bad. It appears the default is indeed .CBL.

So

COBOL/ANSI WORLD

should be good.

Johnny
Reply all
Reply to author
Forward
0 new messages