Hi,
I need to use the unattended WRITE to display (no pressing ENTER )
Thanks!
Hi,
I need to use the unattended WRITE to display (no pressing ENTER )
Thanks!
In the very simple situation where you just want to get to the end of a program to display the last page of the report, ensure that you have a cataloged object, and enter the EXECUTE command with the REPEAT option.
EX REPEAT yourpgm
Thank you Ralph for that information.
Sample screens
****** WINDOW ********
* *
* *
* *
* *
* *
* *
* STEP 1 *
**********************
****** WINDOW ********
* *
* *
* *
* *
* *
* STEP 1 *
* STEP 2 *
**********************
****** WINDOW ********
* *
* *
* *
* *
* STEP 1 *
* STEP 2 *
* STEP 3 *
**********************
.
.
.
.
.
****** WINDOW ********
* STEP 50 *
* STEP 51 *
* STEP 52 *
* STEP 53 *
* STEP 54 *
* STEP 55 *
* STEP 56 *
**********************
Hi Ekangal;
What is it you are trying to do?
It looks as if you are merely trying to apprise the user of where they are in processing. Is this correct?
steve
I need to perform a scrolling text for processing step.
Thanks.
Here is a simple piece of code that you can expand on for your needs:
DEFINE DATA LOCAL
1 #LOOP (I4)
END-DEFINE
*
FORMAT PS=50
*
SET KEY PF7=‘%W+1’
SET CONTROL ‘WL40C15F’
*
WRITE ‘.’ (N)
SKIP 8
FOR #LOOP = 1 TO 30
WRITE 10T ‘LOOPING…’ #LOOP
END-FOR
*
END
The basis of the code is simple, you create a page size (Lake in my terminology) that is as large as you need to accomodate all your steps (there is an upper bound of 250 in Natural). This is done by the FORMAT statement.
Then you create a window (Boat in my terminology) that is whatever size you feel is appopriate. This is done by the SET CONTROL statement (or a DEFINE WINDOW statement).
Next, you create an output consisting of thirty lines. Natural can only show you the output that will fit in the window. The WRITE and SKIP are to position the Boat on the Lake properly so the first screen you see shows LOOPING…1.
After seeing the first Pond (my terminology again), you can use PF7 to scroll down the list one line at a time.
In your case, you would probably issue a SET CONTROL ‘W+1’ in your program after finishing a STEP.
Some notes:
This could also be done with INPUT rather than WRITE.
You could create a “sunk boat” with “header text” that would not be erased as you scroll. The “window” (boat) with the “LOOPING…” would be a separate boat, positioned a line or two below the header text.
steve