# Printing map

**URL:** <https://techcommunity.softwareag.com/t/printing-map/176810>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-Code-Samples\
**Created:** [June 5, 2014, 10:13am UTC](https://techcommunity.softwareag.com/t/printing-map/176810 "2014-06-05T10:13:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eda\_Bilgin](https://avatars.discourse-cdn.com/v4/letter/e/d2c977/32.png) [@Eda\_Bilgin](https://techcommunity.softwareag.com/u/Eda_Bilgin)\
**Post date:** [June 5, 2014, 10:13am UTC](https://techcommunity.softwareag.com/t/printing-map/176810/1 "2014-06-05T10:13:21Z")

</div>

Hi all,

I would like to print data displayed by a map. Is there a way to code printing with input using map and PF key together ?

You can see on the picture, I used pf1 for returning menu and pf4 for store data. If I would like to use pf7 for print, how can I code this ?

A code sample, an example is appreciated.

Thanks and regards.  
Angel

 ![Capturemap2.PNG](https://global.discourse-cdn.com/techcommunity/original/2X/3/3c7208b109c226e0300a29ba0b6fcfb3cd81fa6d.png)

---

<div class="post-metadata">

**Author:** ![Steve\_Robinson](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/steve_robinson/32/107_2.png) [@Steve\_Robinson](https://techcommunity.softwareag.com/u/Steve_Robinson)\
**Post date:** [June 5, 2014, 12:11pm UTC](https://techcommunity.softwareag.com/t/printing-map/176810/2 "2014-06-05T12:11:39Z")

</div>

I am not sure I understand your problem. It seems quite straightforward:

SET KEY PF7  
:::::  
INPUT your screen  
\*  
IF _PF-KEY = ‘PF7’  
WRITE … stuff from map … /_ OR PRINT OR WRITE USING MAP  
END-IF

If this is not what you want to do, please expand your description.

---

<div class="post-metadata">

**Author:** ![Eda\_Bilgin](https://avatars.discourse-cdn.com/v4/letter/e/d2c977/32.png) [@Eda\_Bilgin](https://techcommunity.softwareag.com/u/Eda_Bilgin)\
**Post date:** [June 5, 2014, 1:23pm UTC](https://techcommunity.softwareag.com/t/printing-map/176810/3 "2014-06-05T13:23:29Z")

</div>

Hello,  
Thanks for reply. I didn’t know the statement : “write using map”. It is quite helpfull.

I tried it and I have an error :  
NAT0224 Input map in WRITE or write map in INPUT statement.

\*\*\* Explanation \*\*\*  
Either you have specified in a WRITE USING MAP statement the name of a  
map which is an input map, not an output map; or you have specified in  
an INPUT USING MAP statement the name of a map which is an output map,  
not an input map.  
Whether a map is an input or output (write) map is indicated in its  
Map Settings.

How will I set this map as an output map in map settings ? Is it related with print mode ? Please see 2 images I attached.

Thanks and regards,  
Angel

 ![set2.PNG](https://global.discourse-cdn.com/techcommunity/original/2X/f/fb5045cc2aa1b752a24f2105fb84ddcc83c49f53.png)  
 ![set1.PNG](https://global.discourse-cdn.com/techcommunity/original/2X/f/f4df940934cb98584d2738c304dc009f22e048b7.png)

---

<div class="post-metadata">

**Author:** ![Steve\_Robinson](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/steve_robinson/32/107_2.png) [@Steve\_Robinson](https://techcommunity.softwareag.com/u/Steve_Robinson)\
**Post date:** [June 10, 2014, 2:37pm UTC](https://techcommunity.softwareag.com/t/printing-map/176810/4 "2014-06-10T14:37:07Z")

</div>

I have not had time to get back to this.

In case you have not resolved your questions as yet:

The error message tells you all you need to know.

“Whether a map is an input or output (write) map is indicated in its  
Map Settings”

If you look at the top right of a map settings you will see two entries: INPUT and WRITE

INPUT means “input” and WRITE means “output”.

A map can only be one. Thus, in your case you need two “versions” of the map, one input, one output.

If you have the map as input, you can save it under a new name, then edit the map. Go to map settings and change the X from INPUT to WRITE. Now stow the “write map”.

You should be able to take it from there.

Almost forgot, PM (print mode) has no bearing on this at all.

steve

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [June 13, 2014, 3:45pm UTC](https://techcommunity.softwareag.com/t/printing-map/176810/5 "2014-06-13T15:45:49Z")

</div>

When you refer to “printing”, are you talking about a hardcopy (i.e. a screen print) ?

This can be done with terminal command %H, or “SET CONTROL H” from a program,  
which you can, of course, assign to a PF key.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:31pm UTC](https://techcommunity.softwareag.com/t/printing-map/176810/6 "2021-04-02T15:31:17Z")

</div>


