Re: learning PL/1 --

"cedarlakebuzzards" <cedarlakebuzzards-/[email protected]> Thu, 26 Aug 2010 09:55:15 -0000
Newsgroups gmane.comp.emulators.turnkey-mvs
Message-ID <[email protected]>
--- In [email protected], Ron Hudson <hudson.ra@...> wrote:
>
> Hi All
>
> Who is 'into' PL/1?
>
> So I am beginning a two week period off school, wherein I would like
to
> learn some PL/1
>
> I have IBM PL1-MVS-VM-Lang Ref.PDF  but for this problem it's not
helping.

For some basics, this manual will work.  There is a lot of stuff that
wont work.  You can find PL/I F manuals at
http://www.bitsavers.org/pdf/ibm/360/pli/


>
> For my first program the computer will guess the users number - so far
I
> actually put
> the number in the program itself later the user will interact with the
> program.
>
> Currently I am getting a message about the way I have declared a
variable in
> a function
> and what I am returning (listing attached)

I don't see any thing wrong with your code.  Back in the day, PL/I F did
have some strange problems and some stuff did not work like it was
supposed to (and IBM never fixed it).

>
> btw the only reason for the NOT function is because I don't know how
to type
> a 'not' character.

If your 3270 emulator supports it, you have to remap a couple of keys
for the 'not' and the 'bar' for concatenation and logical or.   You also
need the code page with the PL/I special characters.  For Hercules, the
config line is:

CODEPAGE 819/1047  # for PL/I special characters

With this 'codepage', the not and the bar will print correctly.  Without
the 'codepage', the special characters will

Alternately, you could use the 'char48' compiler options and I think you
could then use the
'NOT ='  construct.  That is the stuff you will find in the PL/I F
manuals.  It is different than the PL/I optimizing compiler.

>
> Note that as it stand this program would simply run to time our output
limit
> because I am not
> updating things inside the loop - but it's not running anyway.

Try adding a simple counter.  add 1 to the counter in the loop and add
to the condition to end the loop if the counter exceeds a given value. 
With this, the number of iterations will be limited.

>
> Thanks.
>
> Ron.
>