Discussion:
learning PL/1 -- [1 Attachment]
Ron Hudson
2010-08-25 22:49:36 UTC
Permalink
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 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)

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

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.

Thanks.

Ron.
cedarlakebuzzards
2010-08-26 09:55:15 UTC
Permalink
Post by Ron Hudson
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/
Post by Ron Hudson
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).
Post by Ron Hudson
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.
Post by Ron Hudson
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.
Post by Ron Hudson
Thanks.
Ron.
cedarlakebuzzards
2010-08-26 10:00:11 UTC
Permalink
OOPS
--- In turnkey-mvs-***@public.gmane.org, "cedarlakebuzzards"
<***@...> wrote:
...snip...

CODEPAGE 819/1047 # for PL/I special characters
Post by cedarlakebuzzards
With this 'codepage', the not and the bar will print correctly.
Without
Post by cedarlakebuzzards
the 'codepage', the special characters will not print correctly.
...snip...
Ron Hudson
2010-08-26 13:59:19 UTC
Permalink
I have found that there is a wc3270 command accessed by escaping the 3270
emulation
with control-] that places the single char 1/4 in the code.

This prints on the printouts as a ^ but acts like a ¬

Anyway the not function was deleted and the proper test was used.

That codepage change might clean some of this up, what else will change
though?

:^)
ron
Tony Harminc
2010-08-26 15:15:32 UTC
Permalink
Post by cedarlakebuzzards
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
CODEPAGE 819/1047  # for PL/I special characters
It also depends on whether the translation table is faithful, or is
one of those "helpful" ones that mismap one or more characters. It is
common for such tables to interchange the ¬ and ^ codepoints, and
often enough also the Š and | bars, all to match someone's notion of
convenience.

Tony H.
cedarlakebuzzards
2010-08-27 00:23:08 UTC
Permalink
Post by Tony Harminc
Post by cedarlakebuzzards
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
Post by Tony Harminc
Post by cedarlakebuzzards
need the code page with the PL/I special characters. For Hercules,
the
Post by Tony Harminc
Post by cedarlakebuzzards
CODEPAGE 819/1047 # for PL/I special characters
It also depends on whether the translation table is faithful, or is
one of those "helpful" ones that mismap one or more characters. It is
common for such tables to interchange the ¬ and ^ codepoints, and
often enough also the Š and | bars, all to match someone's notion of
convenience.
Tony H.
The "mismap" has been commonly accepted for years. If there is some
better way to do it, please share it with everyone. We are all anxious
to see it.
Tony Harminc
2010-08-27 00:39:29 UTC
Permalink
Post by Tony Harminc
It also depends on whether the translation table is faithful, or is
one of those "helpful" ones that mismap one or more characters. It is
common for such tables to interchange the ¬ and ^ codepoints, and
often enough also the Š and | bars, all to match someone's notion
of convenience.
Post by Tony Harminc
Tony H.
The "mismap" has been commonly accepted for years.  If there is some
better way to do it, please share it with everyone.  We are all anxious
to see it.
I'm talking about character translation table(s). Mapping of
keystrokes in your TN3270 is, of course, a personal matter. For
example my own choice for the logical NOT is CTRL-6, but if you prefer
CTRL-ALT-SHIFT-NUMLOCK or something, you can set it up any way you
like. Any modern font has all the required characters available, so
again, you can easily set things up in your TN3270 program to display
the appropriate characters.

What I object to is mapping some other character, such as caret or
exclamation mark, to the NOT in the Hercules (or application) table.
Well, again, I don't care what you do with your personal system,
obviously; where I care is when people start to distribute such
mismapping as defaults, or assume that other people use the same
mismapping.

The 819 and 1047 character sets (and 037 and all the EBCDIC country
variations, for that matter) encode the exact same set of characters.
Why people want to mismap things like NOT and the bars and such is
beyond me. Each codepage has a defined place for each of the
characters; why not leave them where they belong?

Tony H.
Mike Schwab
2010-08-27 01:53:12 UTC
Permalink
On Thu, Aug 26, 2010 at 7:23 PM, cedarlakebuzzards
<deleted>>
Post by Tony Harminc
It also depends on whether the translation table is faithful, or is
one of those "helpful" ones that mismap one or more characters. It is
common for such tables to interchange the ¬ and ^ codepoints, and
often enough also the Š and | bars, all to match someone's notion
of
Post by Tony Harminc
convenience.
Tony H.
The "mismap" has been commonly accepted for years.  If there is some
better way to do it, please share it with everyone.  We are all anxious
to see it.
Available with Hercules 380 and will be included in Turnkey 4.
--
Mike A Schwab, Springfield IL USA
Where do Forest Rangers go to get away from it all?
afg0510-XzQKRVe1yT0V+D8aMU/
2010-08-27 18:50:24 UTC
Permalink
cedarlakebuzzards wants to hear...

on Thursday, August 26, 2010 8:23 PM
Subject: [turnkey-mvs] Re: learning PL/1 --
The "mismap" has been commonly accepted for years. If there is some
better way to do it, please share it with everyone. We are all anxious
to see it.
Post by cedarlakebuzzards
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,
See here: http://www.autohotkey.com/
It replaces my growing collection of short key strokes called 'hotkeys'
by 'special keys' and my 'hotstrings' to password(-fragments), commonly
used abbreviations and/or all the usual stuff we need to fill into online
forms,
like name and address. I could even write a logon script.

Most of my hotstrings are comma-letter-letter like:
,an --> Andreas
,ge --> Geissbuehler

Below is is a 'hotkey' (Ctrl + \) It sends a ¬

^\::¬ # this transforms Ctrl+\ to: ¬

I repeat what I wrote on Thursday, July 15, 2010 11:43 AM
Subject: [turnkey-mvs] hotstrings:
<CUT> .... </CUT>
This package has many features immensly useful in general and
to herc users in particular to type repetitive operator commands.
I'd say try it !

Andreas
Ron Hudson
2010-08-27 23:30:46 UTC
Permalink
I set the codepage but that doesn't change the character in wc3270 - still a
1/4 in RPF

Printed the file with PRINTOFF and the listing still had a ^ not a ¬

- not that that is really important I know what a 1/4 or a ^ is now.

Ron.
Post by afg0510-XzQKRVe1yT0V+D8aMU/
cedarlakebuzzards wants to hear...
on Thursday, August 26, 2010 8:23 PM
Subject: [turnkey-mvs] Re: learning PL/1 --
The "mismap" has been commonly accepted for years. If there is some
better way to do it, please share it with everyone. We are all anxious
to see it.
Post by cedarlakebuzzards
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,
See here: http://www.autohotkey.com/
It replaces my growing collection of short key strokes called 'hotkeys'
by 'special keys' and my 'hotstrings' to password(-fragments), commonly
used abbreviations and/or all the usual stuff we need to fill into online
forms,
like name and address. I could even write a logon script.
,an --> Andreas
,ge --> Geissbuehler
Below is is a 'hotkey' (Ctrl + \) It sends a ¬
^\::¬ # this transforms Ctrl+\ to: ¬
I repeat what I wrote on Thursday, July 15, 2010 11:43 AM
<CUT> .... </CUT>
This package has many features immensly useful in general and
to herc users in particular to type repetitive operator commands.
I'd say try it !
Andreas
Greg Price
2010-08-28 03:07:33 UTC
Permalink
Post by Ron Hudson
Printed the file with PRINTOFF and the listing still had a ^ not a ¬
Maybe it is a x'B0' (or similar) and not a x'5F'?

I get these sometimes when using different mechanisms
going through a EBCDIC->ASCII-> cycle.

The first transforms the EBCDIC ¬ to an ASCII ^,
and the seconds transforms an ASCII ^ to an EBCDIC ^.

Er, unless the first transforms an EBCDIC ¬ to an ASCII ¬ and
the second transforms the ASCII ¬ to an EBCDIC whatever.

You get the idea...

Cheers,
Greg
cedarlakebuzzards
2010-08-29 10:17:12 UTC
Permalink
Changing the codepage alone will not make the PL/I special characters
display or print. The 3270 emulator has to get the correct code for
the key into the system. As presented below, the autohotkey can do the
same thing. It really is a matter of personal preference.

I use Vista3270 and I mapped <shift-6> to be the "not" key.
Post by Ron Hudson
I set the codepage but that doesn't change the character in wc3270 - still a
1/4 in RPF
Printed the file with PRINTOFF and the listing still had a ^ not a ¬
- not that that is really important I know what a 1/4 or a ^ is now.
Ron.
Post by afg0510-XzQKRVe1yT0V+D8aMU/
cedarlakebuzzards wants to hear...
on Thursday, August 26, 2010 8:23 PM
Subject: [turnkey-mvs] Re: learning PL/1 --
The "mismap" has been commonly accepted for years. If there is some
better way to do it, please share it with everyone. We are all anxious
to see it.
Tony
Post by Ron Hudson
Post by afg0510-XzQKRVe1yT0V+D8aMU/
Post by cedarlakebuzzards
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,
Post by Ron Hudson
Post by afg0510-XzQKRVe1yT0V+D8aMU/
See here: http://www.autohotkey.com/
It replaces my growing collection of short key strokes called 'hotkeys'
by 'special keys' and my 'hotstrings' to password(-fragments), commonly
used abbreviations and/or all the usual stuff we need to fill into online
forms,
like name and address. I could even write a logon script.
,an --> Andreas
,ge --> Geissbuehler
Below is is a 'hotkey' (Ctrl + \) It sends a ¬
^\::¬ # this transforms Ctrl+\ to: ¬
I repeat what I wrote on Thursday, July 15, 2010 11:43 AM
<CUT> .... </CUT>
This package has many features immensly useful in general and
to herc users in particular to type repetitive operator commands.
I'd say try it !
Andreas
cedarlakebuzzards
2010-08-29 10:20:13 UTC
Permalink
Thanks for sharing the info about the autohotkey software.
Post by afg0510-XzQKRVe1yT0V+D8aMU/
cedarlakebuzzards wants to hear...
on Thursday, August 26, 2010 8:23 PM
Subject: [turnkey-mvs] Re: learning PL/1 --
The "mismap" has been commonly accepted for years. If there is some
better way to do it, please share it with everyone. We are all anxious
to see it.
Post by cedarlakebuzzards
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,
See here: http://www.autohotkey.com/
It replaces my growing collection of short key strokes called
'hotkeys'
Post by afg0510-XzQKRVe1yT0V+D8aMU/
by 'special keys' and my 'hotstrings' to password(-fragments),
commonly
Post by afg0510-XzQKRVe1yT0V+D8aMU/
used abbreviations and/or all the usual stuff we need to fill into online
forms,
like name and address. I could even write a logon script.
,an --> Andreas
,ge --> Geissbuehler
Below is is a 'hotkey' (Ctrl + \) It sends a ¬
^\::¬ # this transforms Ctrl+\ to: ¬
I repeat what I wrote on Thursday, July 15, 2010 11:43 AM
<CUT> .... </CUT>
This package has many features immensly useful in general and
to herc users in particular to type repetitive operator commands.
I'd say try it !
Andreas
Rick Fochtman
2010-08-26 19:32:04 UTC
Permalink
-------------------------------------<snip>------------------------------------
[Attachment(s) <#TopText> from Ron Hudson included below]
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 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)
btw the only reason for the NOT function is because I don't know how
to type a 'not' character.
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.
Thanks.
Ron.
-------------------------------------------<unsnip>----------------------------------------------------
Ron, I can't do diddly-squat with your attachment. You might do better
by simply imbedding the questionable parts of your program into your
message.

A "Logical NOT" on a standard 3270 is the upper-case version of a
numeral 6. It looks like a capital "L", rotated 90 degrees
counter-clockwise and flipped so that the sign faces down instead of up.
Sort of like a horizontal line with no support at the right end. I don't
know how your terminal emulator processes the value, but in S/360 hex
it's a X'5F'.

I can help with PL/1, since it was my "second language", after
Assembler. and before FORTRAN. Talk to me off-list and we'll see what
can be done.

Rick
Ron Hudson
2010-08-26 20:56:51 UTC
Permalink
Thanks Rick, It should have been just a plain text message.

I have a workaround for the "not" sign ¬ in wc3270 - no worries.
Program runs now.
Ron, I can't do diddly-squat with your attachment. You might do better by
simply imbedding the questionable parts of your program into your message.
Continue reading on narkive:
Loading...