Page 1 of 1

How positioning a cursor in a multi maps mapset ?

PostPosted: Fri Apr 12, 2013 4:05 am
by michel123
Hello,

I have a problem to position a cursor on a field error in one of my 4 maps.

I displayed a first time, my screen with 4 SEND MAP MAPSET ACCUM, entered data, checked the data after RECEIVE MAP and redisplayed the screen to highlight the field in error. The field is highlighted, but the cursor is positioned at the top left of my screen.
My SEND is a SEND MAP MAPSET DATAONLY CURSOR.

Where is the problem? Missing there an option in my SEND MAP MAPSET DATAONLY CURSOR ?

Thanks.

Michel.

Re: How positioning a cursor in a multi maps mapset ?

PostPosted: Fri Apr 12, 2013 4:29 am
by Robert Sample
How did you set the position for the cursor? From the Application Programming Interface manual on the SEND MAP command:
CURSOR(data-value)
specifies the location to which the 3270 or 3604 cursor is to be
returned upon completion of a SEND MAP command.

The data value must be a halfword binary value that specifies the
cursor position relative to zero; the range of values that can be
specified depends on the size of the screen being used. If no data
value is specified, symbolic cursor positioning is assumed. See the
section about minimum BMS in the CICS Application Programming Guide
for more information about symbolic cursor positioning.

This option overrides any IC option of the ATTRB operand of DFHMDF. If
ACCUM is being used, the most recent value of CURSOR specified is used
to position the cursor.

The value specified in the CURSOR option must be positive. A negative
value leads to unpredictable results.
and from the Application Programming Guide manual:
The CURSOR option on the SEND MAP command allows you to override this specification, if necessary, when the map is displayed. If you specify CURSOR(value), BMS places the cursor in that absolute position on the screen. Counting starts in the first row and column (the zero position), and proceeds across the rows. Thus, to place the cursor in the fourth column of the third row of an 80-column display, you code CURSOR(163). Specifying CURSOR without a value signals BMS that you want "symbolic cursor positioning". You do this by setting the length subfield of the field where you want the cursor to minus one (-1). Length subfields are not defined on output-only maps, so you must define your map as INOUT to use symbolic cursor positioning. (We tell you about length subfields in "Formatted screen input" in topic 6.5.5, and about INOUT maps in "Receiving mapped data" in topic 6.5.) If you mark more than one field in this way, BMS uses the first one it finds. Symbolic cursor positioning is particularly useful for input-output maps when the terminal operator enters incorrect data. If you validate the fields, setting the length of any in error to -1, BMS places the cursor under the first error when you redisplay. "Processing the mapped input" in topic 6.5.8 shows this technique.

Re: How positioning a cursor in a multi maps mapset ?

PostPosted: Fri Apr 12, 2013 1:18 pm
by michel123
Hello,

yes I've looked into these two books.
I defined the cursor like this:

05 CT-CURSEUR PIC S9(04) COMP VALUE -1.

The mapsetx with the option INOUT :

MVISU01 DFHMSD TYPE=&SYSPARM, X
LANG=COBOL, X
MODE=INOUT, X
CTRL=(FREEKB,FRSET), X
DSATTS=(COLOR,HILIGHT), X
MAPATTS=(COLOR,HILIGHT), X
STORAGE=AUTO, X
TIOAPFX=YES


And the code :
MOVE CT-CURSEUR TO FONCTL

EXEC CICS
SEND MAP('MVISU11')
MAPSET('MVISU01')
FROM(MVISU11O)
DATAONLY
ALARM
ACCUM
CURSOR
END-EXEC

EXEC CICS
SEND PAGE
END-EXEC

it usually works when I have a one MAP for a MAPSET.

Re: How positioning a cursor in a multi maps mapset ?

PostPosted: Fri Apr 12, 2013 5:54 pm
by c62ap90
Example Symbolic Cursor Positioning:

       05 Map-Name-L  Pic s9(04) COMP.                               
       05 Map-Name-A  Pic  x(01).                                     
       05 Map-Name    Pic  x(30).                                     
           Receive Map...                                               
           Move -1 to Map-Name-L.  {after Send Map, Cursor stops here}
           EXEC CICS SEND                                             
                     MAP       ('XXXXXXXX')                           
                     MAPSET    ('XXXXXXXX')                           
                     FROM      (map area)                             
                     DATAONLY                                         
                     CURSOR                                           
           END-EXEC.                                                 

Re: How positioning a cursor in a multi maps mapset ?

PostPosted: Fri Apr 12, 2013 6:34 pm
by michel123
Yes, this I know.
But the structure of my screen forced me to describe my MAPSET with 4 distinct MAPs. The MAP2 describes a list of occurrences.

An initial input in MAP1. if ok, a list view in MAP2.
The map3 provides access to additional functions.

__________________________________________
| |
| MAP1 |
__________________________________________
| | |
| | |
| MAP2 | MAP3 |
| | |
_________________________________________
| |
| MAP4 |
_________________________________________

If error in MAP1, should I only redisplay this?

Re: How positioning a cursor in a multi maps mapset ?

PostPosted: Fri Apr 12, 2013 6:47 pm
by michel123
My screen better drawing :

Dessin MAPs.gif