I am using the CICS Link3270 Bridge to perform robotic operation of a CICS/NATURAL application. (My only access to the CICS/NATURAL application is via its 3270 UI).It mostly works very well - via the bridge I am able to capture the 3270 output streams, and provide the required 3270 input streams.
Unfortunately, there is one problem: the underlying NATURAL application throws a NAT1132 error when a program executes a REINPUT statement without the FULL option. The problem does not occur when the FULL option is present. The text of the error message is: NAT1132 Line size mismatch in IOPATTR buffer at offset nnnnnnn.
A question about your problem. In your REINPUT statements that have not worked do you have an explicit or implicit error message? As in REINPUT ‘this is an error’ .
Do you have any MARK FIELD options?
I am sure you probably know the difference between REINPUT and REINPUT FULL, but I am equally sure that not everyone understands the difference.
An INPUT statement generates code that is basically in three parts.
Draws the screen
Handles error messages and the cursor
Reads the screen
REINPUT FULL creates a totally new screen; that is, it returns to the start of step 1) (re-executes INPUT).
By contrast, REINPUT does not re-execute an INPUT statement; it returns to step 2). I have not looked recently, but it used to be the case that the Natural documentation said REINPUT returns to and re-executes an INPUT statement. This was incorrect and confused many programmers.
I am guessing that perhaps the Bridge expects only complete screens.
Without the environment you have, I cannot really test at all.
If you have error messages, could you try a REINPUT without any error messages or MARKs?
In answer to your questions: my REINPUT statement does have an error message, but does not have the MARK option.
I have been able to reproduce the problem using the simple NATURAL program listed below. (Full disclosure: I am an experienced CICS COBOL programmer, but my knowledge of NATURAL is limited to what I have read in the manuals).
0010 DEFINE DATA
0020 LOCAL
0030 1 #PARTNUMBER (A06) INIT <"000000">
0040 1 #PARTNAME (A20)
0050 END-DEFINE
0060 *
0070 RP1. REPEAT
0080 *
0090 INPUT (AD=MT)
0100 "GREG1" /
0110 "Part Number:" #PARTNUMBER /
0120 "Part Name :" #PARTNAME
0130 *
0140 DECIDE FOR FIRST CONDITION
0150 WHEN #PARTNUMBER = '.'
0160 ESCAPE BOTTOM (RP1.)
0170 WHEN #PARTNUMBER = '000001'
0180 MOVE 'WINDSCREEN' TO #PARTNAME
0190 WHEN #PARTNUMBER = '000002'
0200 MOVE 'HEADLIGHT' TO #PARTNAME
0210 WHEN #PARTNUMBER = '000003'
0220 MOVE 'HUBCAP' TO #PARTNAME
0230 WHEN NONE
0240 MOVE '**UNKNOWN**' TO #PARTNAME
0250 REINPUT 'Part number not found.'
0260 END-DECIDE
0270 *
0280 END-REPEAT
0290 *
0300 END
I have used the Link3270 Bridge successfully in the past with other (non-NATURAL) applications that send partial screen updates. The problem in this case is that my bridge program never gets to see the partial screen update stream, because NATURAL refuses to send it.
I can’t see a way to try out your suggestion of issuing the REINPUT command without an error message - it appears to be a compulsory syntax element of the command.
I am going to investigate the tracing facilities of NATURAL to try to obtain more information about the error.
Thanks again for taking an interest in my problem,
What is interesting is how close your program is to a solution of your problem.
I once wrote some code almost identical to yours without a REINPUT.
0070 RP1. REPEAT
0080 *
0090 INPUT (AD=MT)
0100 “GREG1” /
0110 “Part Number:” #PARTNUMBER /
0120 “Part Name :” #PARTNAME
0130 *
0135 if #test = ‘a’
0136 reset #partnumber#partname#a
escape top
end-if
0140 DECIDE FOR FIRST CONDITION
0150 WHEN #PARTNUMBER = ‘.’
0160 ESCAPE BOTTOM (RP1.)
0170 WHEN #PARTNUMBER = ‘000001’
move ‘a’ to #test
0180 MOVE ‘WINDSCREEN’ TO #PARTNAME
0190 WHEN #PARTNUMBER = ‘000002’
move ‘a’ to #test
0200 MOVE ‘HEADLIGHT’ TO #PARTNAME
0210 WHEN #PARTNUMBER = ‘000003’
0220 MOVE ‘HUBCAP’ TO #PARTNAME
move ‘a’ to #test
0230 WHEN NONE
0240 MOVE ‘UNKNOWN’ TO #PARTNAME
0250 ** REINPUT ‘Part number not found.’
0260 END-DECIDE
0270 *
0280 END-REPEAT
0290 *
0300 END
I had an alpha field which was either blanks or said something like "here is the partname for the given partnumber " or the “partnumber you specified was not found”
I have not run the code above (no Natural on this computer). It may not work, but hopefully the intent is clear.
Actually, the CICS 3270 Bridge docu recommends starting Natural with profile parameter DSC=OFF (i.e. set 3270 data-stream compression to OFF).
NB. The terminal command %RO- turns compression OFF. %RO+ turns it back ON.
Greg, I still do not have access to Natural. If memory serves you do not have to have a REINPUT message. Could you try this and see if it works?
Peter ,
I think you may be on to something. If compression is on, the original INPUT statement might have a space keeper for the message line not a full line indicator.
Greg, could you put a SET CONTROL ‘M12’ in your code and an error message for a REINPUT? M12 puts the message line on line 12.
This is a TP monitor issue. I believe that Peter was referring to
Natural for Mainframes 8.2.7
TP Monitor Interfaces
CICS 3270 Bridge Support
Greg, if you would like to access SAG documentation from within the Community, you can change your profile to include documentation as an “area of interest.” The procedure is found in the Tech Community Access to Documentation FAQs: http://techcommunity.softwareag.com/pwiki/-/wiki/Main/Tech Community+Access+to+Documentation+FAQs
Refer to the second bullet there.