Multi language browse using display sentence.

I agree with Ralph’s last post, except for one point. Depending on what system and version number you are running, you might want to take a look at READ … WITH REPOSITION in the documentation for your system to see if it is there.

The following code is from the latest mainframe documentation:

DEFINE DATA LOCAL
1 MYVIEW VIEW OF …
2 NAME
1 #STARTVAL (A20) INIT <‘A’>
1 #ATTR (C)
END-DEFINE

SET KEY PF3

READ MYVIEW WITH REPOSITION BY NAME = #STARTVAL
INPUT (IP=OFF AD=O) ‘NAME:’ NAME /
‘Enter new start value for repositioning:’ #STARTVAL (AD=MT CV=#ATTR) /
‘Press PF3 to stop’
IF *PF-KEY = ‘PF3’
THEN STOP
END-IF
IF #ATTR MODIFIED
THEN ESCAPE TOP REPOSITION
END-IF
END-READ

There are a few modifications I would make to this code.

If you need to see a few data fields of each record you might want to work with say ten records per screen. You could accomplish this by setting page size accordingly.

I would then put the INPUT statement through the second IF inside of an AT END OF PAGE clause. Then I would do an INPUT NO ERASE not a simple INPUT, positioned below the ten records.

From here you are limited only by your imagination your knowledge of Natural, and what you might want to do with “selected” records. In the INPUT NO ERASE statement you could have a place for a number to be entered corresponding to numbering the screen records 1 to 10. The within the READ loop you could do a GET ISN for the record selected, assuming you DISPLAYed the ISNs.

Add some color (CD= ) and perhaps some reverse video, and you will have a program that people will not believe is written in Natural.