Change Appearence in Maps


We have several envirments for Natural under Cics.
One of the envirments is for Production and the other are for development & testing.

They look the same except the cics logging, but once you logged in they are the same.
Now days, we want to change the appearance in our production env.
Can I add a Frame for all maps?
How do I do it?

With Reagrds,

Hi Hezi,

If I understand correctly what you mean by “frame”, you wish to have something on your screens show that you are in the production environment so you know you’re there as opposed to dev, QA etc. Is this correct?

You will need to modify all your maps to include this label, which you will populate by having a common subprogram that you call which determines environment based on the location of one of your system files (i.e., FNAT dbid & fnr will do). You could even get fancier than that with AIVs that get set with LOGONEX1, but that isn’t required.

I know of no way to just “frame” your maps without touching them all.

Hope this helps!

If Brian’s interpretation of what you want to do is correct, there is a way to achieve this with “minimal” work. If is not correct, please add further explanation of what you are trying to do.

It involves using what are called “Layouts” with your maps.

I will poke around to find an article I wrote for Inside Natural that explains Layouts and post it here, probably later this afternoon or later this evening.


Okay, I have attached the Inside Natural issue as a PDF file.

If you have any questions, either just post them (if of general interest), or e-mail me if the question(s) is specific to your needs.

IN Vol 15 No 4.pdf (222 KB)


We have already a subprogram which determines in what env we are.
Can I change the layout in all maps using batch process to add them a frame color?

Colored frames are available for pop-up windows, not for normal, full-screen maps. The frame takes up space - adding “lines” and “columns” to the size of the map. On normal maps, you are already using the full 24x80 screen. There is no room for a frame.

If by “layout” you mean the one specified in the map profile (as suggested by Steve), then you make a single change in each environment - paste the environment variable into the layout. If all your maps specify the same layout, then execute a CATALL, and you’re done; there is no need for a batch edit process. If you need to specify the layout in each map profile, then do this manually.

If by “layout” you mean the physical positions of the fields and captions on the screen, then the answer is NO. Do not attempt to maintain map source code (for example, inserting your environment value into the map header) via a batch process. Maps contain proprietary code - their internal structure is different from programs and subprograms. Making source code changes can easily break them. For safety, map changes must be implemented manually. This includes specifying a layout in each map profile.

Ok, I understand.
I will try to change a few as you wrote.

Thanks you all


How can I add ‘Framed’ without using set/define windows?
I mean only in the Map code/


There is a wonderful “trick” I learned from Andreas Schutz that I keep finding strange uses for.

Andreas called this a “pre-processing” rule. I believe the original use was to change values from marks to euros “in a map” rather than in many places in the code.

The reason this works is as follows. Write a Layout for a Map. In the Layout, create a PF key processing rule. This will always be executed after the Layout is executed, BUT, before the “real map” is executed.

So, you could code something like SET CONTROL ‘WL78C22F’ in the processing rule for the Layout (thats all, just one statement).

You should see a framed window with whatever is in your map.

Here is a “driver program”


Next, create a Layout FRAM03, as discussed above with the SET CONTROL processing rule. Just so you can “see” what is going on, add text like “This is from the Layout”.

For the MAP FRAM02, simply put some text like “This is from the map”
Use PF2 to specify a layout FRAM03 for the map FRAM02. Specify DYNAMIC.

Now run the driver program. You should see the two text lines (one each from FRAM02 and FRAM03) inside a frame.

I am presently trying to color the frame. Will report on this later.


Okay, have the color working. Sometimes it helps to actually read the manual to get the syntax correct.

In the Layout. prior to the SET CONTROL ‘WL78C22F’ in the processing rule, insert SET CONTROL ‘=FR=YE’

Now you should get a yellow border to your frame

Working backwards now:

In the driver program you could have a variable, say, #COLOR (A2)

In the map FORM02, you must insert #COLOR using The Define Variables from the main menu for the map editor. Then use PF key for Paramater data area (forget which one offhand).

In the Layout FORM03, do a similar insert of #COLOR. Also insert some code code like:


Or, just use a decide statement to do this. Or,

COMPRESS ‘=FR=’ #color into #setter leaving no space

where #setter is a local defined variable (use the local pf key from the main menu for form02) formatted say A10.



Go to the driver program. Give a value to #COLOR. You should be able to change #COLOR in the driver program and get different colored frames.

fun stuff



It works great.
I will be happy to add color to the frame



Can I use parameters in the “Layout” from the map?
How can I pass Parameters in the “Layout”?


Sorry, for that.
No need to answer (Thanks for the layout manual).