View previous topic :: View next topic
|
Author |
Message |
venosol Warnings : 1 New User
Joined: 16 Nov 2006 Posts: 43 Location: Bangalore
|
|
|
|
How WITH NO ADVANCING will work ?
Suppose I had a DISPLAY statement Like this.
DISPLAY ' ENTER ONE DIGIT' WITH NO ADVANCING.
ACCEPT WS-NUM.
I tried it but I am getting some error. Please clarify me. |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You are confusing DISPLAY and WRITE.
As suggested by Ekta, please refer to the Fine Manual.
As a hint, "NO ADVANCING" will not work with DISPLAY or WRITE. . .
After checking in the manual, please let us know if you have questions
To go a little deeper - if you are putting output on paper asking the use to enter a digit, how will this work? The DISPLAY/WRITE output will not be visable until the job is already finished. If you have a requirement to interact with a user, a different approach is needed. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
It's kind of odd that only the NO ADVANCING option is there for DISPLAY. You'd think that there would be the full range of ADVANCING parameters.
I guess it must be intended for a foreground-oriented interactive program. |
|
Back to top |
|
|
j_sram
New User
Joined: 03 Jul 2006 Posts: 6
|
|
|
|
If you specify the WITH NO ADVANCING phrase and the output is going to a ddname, the printer control character + (plus) is placed into the first output position from the next DISPLAY statement. + is the ANSI-defined printer control character that suppresses line spacing before a record is printed.
For example:
DISPLAY ?ABC?
DISPLAY ?CDEF? WITH NO ADVANCING
DISPLAY ?GHIJK? WITH NO ADVANCING
DISPLAY ?LMNOPQ?
DISPLAY ?RSTUVWX?
If you use the statements above, the result sent to the output device is:
ABC
CDEF
+GHIJK
+LMNOPQ
RSTUVMX |
|
Back to top |
|
|
|