🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

5 total messages Started by David Meyer Sat, 24 Oct 2026 01:18
SYSIN trouble with Iron Spring compiler for Linux
#21
Author: David Meyer
Date: Sat, 24 Oct 2026 01:18
57 lines
2758 bytes
I am a PL/I newbie trying to set up the Iron Spring compiler on my Linux
(Devuan Excalibur 6) box.

I think I have followed all the installation steps, and can use SA_make
to compile a "Hello, World!" program that runs as expected.

However, while slightly more complex programs that read input from SYSIN
(see example below) appear to compile normally, the program behaves
unexpectedly when run:

1. The initial prompt message ('input data:') is not displayed. In its
   place is just the cursor at the beginning of new line.

2. All input appears to be ignored unless each input line has at least
   one space character immediately preceeding the carriage return at the
   end of the line.

3. After all data has been entered as in 2., the 'input data:' prompt is
   displayed below the echoed input data and one line above
   'answer:'. (After displaying 'answer:', the result is printed as
   expected.)

(The program runs and reads SYSIN data as expected ('input data:'
displayed first, input lines don't require space before carriage return)
on OpenVMS with the Kednos compiler.)

Any clues what my problem is?

====================

/*	CA001 - Code Abbey Problem #1 - Sum "A+B"
 * 	2026/10/16 David Meyer <papa@sdf.org> +JMJ
 *
 * 	Language: PL/I (ANSI X3.74 1981)
 * 	Compiler: Kednos PL/I V3.8 for OpenVMS VAX
 * 	System:   VAX 7000/640 "Rosencrantz"
 */

CA001: PROCEDURE OPTIONS (MAIN);

DECLARE (a, b) FIXED BINARY;

PUT LIST ('input data:');
PUT SKIP;
GET LIST (a, b);
PUT LIST ('answer:');
PUT SKIP;
PUT LIST (a + b);
 
END;

====================

-- 
David Meyer
Takarazuka, Japan
papa@sdf.org
Re: SYSIN trouble with Iron Spring compiler for Linux
#22
Author: Peter Flass
Date: Sat, 24 Oct 2026 02:55
72 lines
4029 bytes
On 10/23/26 18:18, David Meyer wrote:
> I am a PL/I newbie trying to set up the Iron Spring compiler on my Linux
> (Devuan Excalibur 6) box.
> 
> I think I have followed all the installation steps, and can use SA_make
> to compile a "Hello, World!" program that runs as expected.
> 
> However, while slightly more complex programs that read input from SYSIN
> (see example below) appear to compile normally, the program behaves
> unexpectedly when run:
> 
> 1. The initial prompt message ('input data:') is not displayed. In its
>     place is just the cursor at the beginning of new line.
> 
> 2. All input appears to be ignored unless each input line has at least
>     one space character immediately preceeding the carriage return at the
>     end of the line.
> 
> 3. After all data has been entered as in 2., the 'input data:' prompt is
>     displayed below the echoed input data and one line above
>     'answer:'. (After displaying 'answer:', the result is printed as
>     expected.)
> 
> (The program runs and reads SYSIN data as expected ('input data:'
> displayed first, input lines don't require space before carriage return)
> on OpenVMS with the Kednos compiler.)
> 
> Any clues what my problem is?
> 
> ====================
> 
> /*	CA001 - Code Abbey Problem #1 - Sum "A+B"
>   * 	2026/10/16 David Meyer <papa@sdf.org> +JMJ
>   *
>   * 	Language: PL/I (ANSI X3.74 1981)
>   * 	Compiler: Kednos PL/I V3.8 for OpenVMS VAX
>   * 	System:   VAX 7000/640 "Rosencrantz"
>   */
> 
> CA001: PROCEDURE OPTIONS (MAIN);
> 
> DECLARE (a, b) FIXED BINARY;
> 
> PUT LIST ('input data:');
> PUT SKIP;
> GET LIST (a, b);
> PUT LIST ('answer:');
> PUT SKIP;
> PUT LIST (a + b);
>   
> END;
> 
> ====================
> 

The answer is ... it's complicated.
1. Iron Spring I/O is buffered by default, so normally your output, 
including the prompt, will not appear until a buffer is filled or the 
file is closed. I have borrowed from other compilers to get around this.
If you code "  dcl sysprint env(interactive);" it will turn off 
buffering to get your prompt to appear immediately.
2. Using "GET LIST" the program is going to keep reading characters from 
the input until the fields have been filled, so you have to terminate 
the second number with a space or comma to indicate that it;s done.
for example typing 1 2, 1,2, of 1,2B (B=space). A record boundary 
(carriage return) is ignored and the program is still looking for input 
[Most control characters are ignored. I'm not sure why I don't recognize 
^D as EOF, I'll put that on the list (bug 677)]
3. By default PUT LIST will put the output in quotes.

I know you're starting with a simple example, but there are better ways 
to do PL/I interactive I/O.
Re: SYSIN trouble with Iron Spring compiler for Linux
#23
Author: David Meyer
Date: Sat, 24 Oct 2026 04:39
32 lines
2411 bytes
Thanks. That solves my problems.

Peter Flass <Peter@Iron-Spring.com> writes:

> 2. Using "GET LIST" the program is going to keep reading characters from the
> input until the fields have been filled, so you have to terminate the second
> number with a space or comma to indicate that it;s done.
> for example typing 1 2, 1,2, of 1,2B (B=space). A record boundary (carriage
> return) is ignored and the program is still looking for input [Most control
> characters are ignored. I'm not sure why I don't recognize ^D as EOF, I'll put
> that on the list (bug 677)]

The Kednos compiler and apparently the earlier DEC VAX-11 PL/I compiler
terminate an input stream field on carriage return in addition to space,
comma, and tab. Is ignoring the carriage return typical of other PL/I
systems (IBM, Multics)?

> 3. By default PUT LIST will put the output in quotes.

PUT LIST didn't add quotes before I declared SYSIN with ENV
(INTERACTIVE). Is there a way to suppress the quotes in an interactive
environment?

> I know you're starting with a simple example, but there are better ways to do
> PL/I interactive I/O.

That is tantalizing. What ways are those? PUT EDIT?

-- 
David Meyer
Takarazuka, Japan
papa@sdf.org
Re: SYSIN trouble with Iron Spring compiler for Linux
#27
Author: Peter Flass
Date: Sat, 24 Oct 2026 14:32
33 lines
2759 bytes
On 10/23/26 21:39, David Meyer wrote:
> Thanks. That solves my problems.
> 
> Peter Flass <Peter@Iron-Spring.com> writes:
> 
>> 2. Using "GET LIST" the program is going to keep reading characters from the
>> input until the fields have been filled, so you have to terminate the second
>> number with a space or comma to indicate that it;s done.
>> for example typing 1 2, 1,2, of 1,2B (B=space). A record boundary (carriage
>> return) is ignored and the program is still looking for input [Most control
>> characters are ignored. I'm not sure why I don't recognize ^D as EOF, I'll put
>> that on the list (bug 677)]
> 
> The Kednos compiler and apparently the earlier DEC VAX-11 PL/I compiler
> terminate an input stream field on carriage return in addition to space,
> comma, and tab. Is ignoring the carriage return typical of other PL/I
> systems (IBM, Multics)?
> 
>> 3. By default PUT LIST will put the output in quotes.
> 
> PUT LIST didn't add quotes before I declared SYSIN with ENV
> (INTERACTIVE). Is there a way to suppress the quotes in an interactive
> environment?
> 
>> I know you're starting with a simple example, but there are better ways to do
>> PL/I interactive I/O.
> 
> That is tantalizing. What ways are those? PUT EDIT?
> 

Good question. In non-interactive use PL/I ignores physical record 
boundaries, which always drove me nutz. Multics treats the carriage 
return as the end of the input stream.
Re: SYSIN trouble with Iron Spring compiler for Linux
#30
Author: Peter Flass
Date: Sun, 25 Oct 2026 14:29
33 lines
2747 bytes
On 10/23/26 21:39, David Meyer wrote:
> Thanks. That solves my problems.
> 
> Peter Flass <Peter@Iron-Spring.com> writes:
> 
>> 2. Using "GET LIST" the program is going to keep reading characters from the
>> input until the fields have been filled, so you have to terminate the second
>> number with a space or comma to indicate that it;s done.
>> for example typing 1 2, 1,2, of 1,2B (B=space). A record boundary (carriage
>> return) is ignored and the program is still looking for input [Most control
>> characters are ignored. I'm not sure why I don't recognize ^D as EOF, I'll put
>> that on the list (bug 677)]
> 
> The Kednos compiler and apparently the earlier DEC VAX-11 PL/I compiler
> terminate an input stream field on carriage return in addition to space,
> comma, and tab. Is ignoring the carriage return typical of other PL/I
> systems (IBM, Multics)?
> 
>> 3. By default PUT LIST will put the output in quotes.
> 
> PUT LIST didn't add quotes before I declared SYSIN with ENV
> (INTERACTIVE). Is there a way to suppress the quotes in an interactive
> environment?
> 
>> I know you're starting with a simple example, but there are better ways to do
>> PL/I interactive I/O.
> 
> That is tantalizing. What ways are those? PUT EDIT?
> 

David, it might be better to take Iron Spring related questions to the 
list Iron-Spring@Groups.IO. To subscribe send eMail to
     Iron-Spring+subscribe@groups.io
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads