IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

PL/1 SEND CICS MAP first time, attributes are garbled


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ezplanet

New User


Joined: 24 Sep 2025
Posts: 4
Location: UK

PostPosted: Wed Oct 01, 2025 7:31 pm
Reply with quote

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
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1216
Location: Dublin, Ireland

PostPosted: Mon Oct 06, 2025 2:46 pm
Reply with quote

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
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1216
Location: Dublin, Ireland

PostPosted: Mon Oct 06, 2025 3:09 pm
Reply with quote

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
View user's profile Send private message
ezplanet

New User


Joined: 24 Sep 2025
Posts: 4
Location: UK

PostPosted: Mon Oct 06, 2025 4:30 pm
Reply with quote

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
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1322
Location: Vilnius, Lithuania

PostPosted: Wed Oct 08, 2025 10:38 pm
Reply with quote

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
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1322
Location: Vilnius, Lithuania

PostPosted: Wed Oct 08, 2025 10:41 pm
Reply with quote

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
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1216
Location: Dublin, Ireland

PostPosted: Tue Oct 28, 2025 6:49 pm
Reply with quote

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
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts CICS UCTRAN=NO not working, need syst... CICS 3
No new posts CICS-Db2 connection issue CICS 1
No new posts After newcopy the CICS program user f... CICS 7
No new posts Starting a CICS Transaction from a Th... CICS 0
No new posts convert arbitrary UTC to local (SYD) ... COBOL Programming 1
Search our Forums:


Back to Top