|
View previous topic :: View next topic
|
| Author |
Message |
ezplanet
New User
Joined: 24 Sep 2025 Posts: 4 Location: UK
|
|
|
|
30 Years ago I was a PL/1 expert programmer, now I have forgotten how to send a map the first time.
In COBOL you clear the map with
MOVE LOW-VALUES to MYMAPO
In PL/1 I tried with
dcl MYMAPO_LEN fixed bin(31) init(storage(MYMAPO));
/* character overlay of the entire map */
dcl MYMAPO_AREA char(MYMAPO_LEN) based(addr(MYMAPO));
MYMAPO_AREA = BYTE(0);
or simply initializing all fields with ''; or ' ';
nothing works. The first time I send the map once the programme is called, the attributes are garbled, PROT fileds are UNPROTECTED, colours are mixed.
Unitl the first RECEIVE MAP, at which point the attributes are set correctly.
The only way I found to clear the map is to send it once as maponly, then receive it immediately afterwards, clear or fill the fields and send it again, but the receive requires an Enter press which is not quite right. I am sure there is a better way.
How do I send the map properly the first time? |
|
| Back to top |
|
 |
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1216 Location: Dublin, Ireland
|
|
|
|
Check your Language Environment STORAGE setting. The default is not to initialise storage, so you can get whatever garbage is in storage displayed. I had something similar many years ago where MVS behaviour had changed and no longer initialised storage by default.
Garry. |
|
| Back to top |
|
 |
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1216 Location: Dublin, Ireland
|
|
|
|
Check your Language Environment STORAGE setting. The default is not to initialise storage, so you can get whatever garbage is in storage displayed. I had something similar many years ago where MVS behaviour had changed and no longer initialised storage by default.
Garry. |
|
| Back to top |
|
 |
ezplanet
New User
Joined: 24 Sep 2025 Posts: 4 Location: UK
|
|
|
|
| I ended up initializing every field one by one in PL/1, I do not remember having to do that, and it does not make sense either because the same map with COBOL can be cleaned by moving LOW-VALUES to the root of the structure. There must be a better way for PL/1. |
|
| Back to top |
|
 |
prino
Senior Member

Joined: 07 Feb 2009 Posts: 1322 Location: Vilnius, Lithuania
|
|
|
|
| ezplanet wrote: |
| I ended up initializing every field one by one in PL/1, I do not remember having to do that, and it does not make sense either because the same map with COBOL can be cleaned by moving LOW-VALUES to the root of the structure. There must be a better way for PL/1. |
Look at the "PLIFILL" builtin (RTFM), or try
| Code: |
dcl in_it char (32767) based;
substr(addr({MAP}) -> in_it, 1, stg({MAP})) = low(stg({MAP})); |
where {MAP} is your map. |
|
| Back to top |
|
 |
prino
Senior Member

Joined: 07 Feb 2009 Posts: 1322 Location: Vilnius, Lithuania
|
|
|
|
| Garry Carroll wrote: |
| Check your Language Environment STORAGE setting. The default is not to initialise storage, so you can get whatever garbage is in storage displayed. I had something similar many years ago where MVS behaviour had changed and no longer initialised storage by default. |
Never, never, never, never, never, never enable that option. CPU usage will go through the roof, likely reaching the orbit of Mars! And initialising FIXED DEC (or whatever they're called in COBOL) to binary zero might make you drown in SOC7s... |
|
| Back to top |
|
 |
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1216 Location: Dublin, Ireland
|
|
|
|
| prino wrote: |
]
Never, never, never, never, never, never enable that option. CPU usage will go through the roof, likely reaching the orbit of Mars! And initialising FIXED DEC (or whatever they're called in COBOL) to binary zero might make you drown in SOC7s... |
I would imagine that anyone considering a change to LE runtime options would first check and discover that options can be set for different circumstances. In the case of CICS, the CLER transaction can be used to change the options for a region, leaving the options elsewhere unchanged. See CEECOPTS, CEEDOPTS, CEEROPTS and CEEQDOPTS.
Garry. |
|
| Back to top |
|
 |
|
|