Highlighted
Absent Member.
Absent Member.
1479 views

wait for the termination key

Jump to solution

In Rm cobol there was an option on the accept to wait for a termination key. In MF cobol there doesn't seem to be that option. Would anyone know if this is supposed to be enabled by default. I get mixed results. sometime a program will wait, other times when the value that is accepting the input gets filled it will automatically jump to the next statement.

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert
I am not experiencing this behavior using default MF settings but I do experiencing it when using the RM compatible ADISCTRL configuration.

This can be changed by starting up ADISCF and doing the following:
Press F2 Alter
Press F3 Accept/Display Options
Press F3 Individual Options
Choose option 7, Auto-Skip between fields
Choose option 1 No auto-skip and press Enter
Press ESC 3 times
Press F4 to Save
Press F3 to overwrite existing configuration
Choose RM compatible and press Enter
Press Esc to quit

Try again.

View solution in original post

0 Likes
8 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert
What did the syntax look like in RM COBOL and what are you using now?

There are options you can specify like REQUIRED or AUTO-SKIP that can affect how the accept behaves.
0 Likes
Highlighted
Absent Member.
Absent Member.

In the rm code I have things like 

accept foo no beep tab.

right now, I just have a regular accept and from what I can tell - if I don't have any other parameters - managed code with mf and rm dialect will move to the next statement when the control is full. if it's native code, rm will move to the next control and mf will allow to enter in as much text as i want.

0 Likes
Highlighted
Absent Member.
Absent Member.
This is covered in the documentation, but here's a quick summary.

In RM/COBOL, the default for ACCEPT is that the field is accepted when full. The TAB reserved word can be specified to override this behavior and wait for a termination key.

In Visual COBOL, the default for ACCEPT is that a termination key is required. As Chris said, there are various options to change this behavior. Visual COBOL does not by default have the TAB reserved word, but does when compiling with DIALECT(RMCOBOL); alternatively, the word TAB can be reserved with the reserved word directive ADDRSV(TAB), which will allow the word in the ACCEPT statement without specifying DIALECT(RMCOBOL), but that really just causes the word to be allowed in the ACCEPT statement syntax. There are many, some subtle, differences between ACCEPT/DISPLAY in Visual COBOL from RM/COBOL. If you really want RM/COBOL behavior, you need to use DIALECT(RMCOBOL) directive at compile time and use the RMCOBOL ADIS configuration (I think it may be named something like RMCOBOLV2) at runtime. Otherwise, you'll be spending a lot of time adjusting various directives, language syntax and ADIS configuration settings to get the behavior you want.
0 Likes
Highlighted
Absent Member.
Absent Member.
would you send a link where you found this?
0 Likes
Highlighted
Absent Member.
Absent Member.
also, if it is the default that a termination is required, which it sounds like it is, I'm curious why I am seeing different behaviors with managed and native when using the MF dialect and when setting accept positions,
0 Likes
Highlighted
Absent Member.
Absent Member.
normally, the accept waits till I press enter unless I have the screen position in the accept,
e.g. accept foo line 3 position 4
This makes the accept terminate as soon as the last character is entered.
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert
I am not experiencing this behavior using default MF settings but I do experiencing it when using the RM compatible ADISCTRL configuration.

This can be changed by starting up ADISCF and doing the following:
Press F2 Alter
Press F3 Accept/Display Options
Press F3 Individual Options
Choose option 7, Auto-Skip between fields
Choose option 1 No auto-skip and press Enter
Press ESC 3 times
Press F4 to Save
Press F3 to overwrite existing configuration
Choose RM compatible and press Enter
Press Esc to quit

Try again.

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.
Hey Chris, thanks for the details. I had been playing with adiscf for a while bat hadn't yet found those settings.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.