hi all.
I know I can do it with the window, but for information only.
how to close the frame in this example:
0010 DEFINE DATA LOCAL
0020 1 EMPLOYEES VIEW OF EMPLOYEES
0030 2 PERSONNEL-ID (A8)
0040 2 FULL-NAME
0050 3 FIRST-NAME (A20)
0060 3 NAME (A20)
0070 1 #NAME (A20)
0080 END-DEFINE
0090 *
0120 REPEAT
0130 SET CONTROL 'WL40C10B10/40F'
0140 INPUT / 'INSERT THE NAME ' #NAME
0150 SET CONTROL 'WB'
0180 *
0190 FIND EMPLOYEES WITH NAME=#NAME
0200 IF NO RECORDS FOUND
0210 SET CONTROL 'WL40C4B14/50F'
0220 INPUT 'NO RECORDS FOUND'
0230 SET CONTROL 'WB'
0240 ESCAPE BOTTOM
0250 END-NOREC
0260 DISPLAY EMPLOYEES
0270 END-FIND
0280 *
0290 END-REPEAT
0300 END
it write the employees into the frame.
now i work in local enviroment, but in 2 months i will work in mainframe enviroment with WEB I/O screen.
in web i/o, the SET CONTROL ‘WB’ hide the frame, but not in local.
how do i do?
sorry form my english.
thank you.
Even the Natural manual says:
However, since you asked…
The trouble with your program is that as you are reading the file, you are displaying employees and the page is not displayed until the page is full, or another statement triggers the display. In this case, if I look for FIRST-NAME = JOHN, I get a page and a half of Johns, but the half page display is not triggered until the program hits the INPUT statement at line 0140, which is after your window is reactivated at line 0130.
Adding an EJECT after your END-FIND will force the display of the final page before the window is active.
thank you for the answer.
but if i use define window i have the same problem.
it work only if i use eject.
but SET WINDOW OFF, it should not turn off the window?
example, (dont’work)
0010 DEFINE DATA LOCAL
0020 1 EMPLOYEES VIEW OF EMPLOYEES
0030 2 PERSONNEL-ID (A8)
0040 2 FULL-NAME
0050 3 FIRST-NAME (A20)
0060 3 NAME (A20)
0070 1 #NAME (A20)
0080 END-DEFINE
0090 *
0100 DEFINE WINDOW W1
0110 SIZE 10*40
0120 BASE 10/40
0130 DEFINE WINDOW W2
0140 SIZE 4*40
0150 BASE 14/50
0160 *
0170 REPEAT
0180 SET WINDOW 'W1'
0190 INPUT / 'INSERT THE NAME ' #NAME
0200 SET WINDOW OFF
0210 *
0220 FIND EMPLOYEES WITH NAME=#NAME
0230 IF NO RECORDS FOUND
0240 SET WINDOW 'W2'
0250 INPUT 'NO RECORDS FOUND'
0260 SET WINDOW OFF
0270 ESCAPE BOTTOM
0280 END-NOREC
0290 DISPLAY EMPLOYEES
0300 END-FIND
0310 * EJECT
0320 *
0330 END-REPEAT
0340 END
it work if i use EJECT at row 310
i’m studing natural, but i’ve problems with the windows.
at row 200 i think that the window turn off :oops: but dont work. I come from visual basic 6
thank you
Instead of using SET WINDOW, try:
...
0170 REPEAT
0190 INPUT WINDOW='W1' / 'INSERT THE NAME ' #NAME
0210 *
0220 FIND EMPLOYEES WITH NAME=#NAME
0230 IF NO RECORDS FOUND
0250 INPUT WINDOW='W2' 'NO RECORDS FOUND'
0270 ESCAPE BOTTOM
0280 END-NOREC
...
thank you.
now it’s work perfectly.