IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How WITH NO ADVANCING will work


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
venosol
Warnings : 1

New User


Joined: 16 Nov 2006
Posts: 43
Location: Bangalore

PostPosted: Mon Mar 19, 2007 10:34 am
Reply with quote

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
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Mon Mar 19, 2007 10:42 am
Reply with quote

Hi There,


Please refer the manual

publib.boulder.ibm.com/infocenter/pdthelp/v1r1/index.jsp?topic=/com.ibm.entcobol4.doc/tpbeg16b.htm
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Mar 19, 2007 7:28 pm
Reply with quote

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 icon_smile.gif

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Mon Mar 19, 2007 7:34 pm
Reply with quote

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
View user's profile Send private message
j_sram

New User


Joined: 03 Jul 2006
Posts: 6

PostPosted: Wed Mar 21, 2007 4:39 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts Negative value - packed field - Natur... Java & MQSeries 0
No new posts TWS - ETT File triggering does not wo... IBM Tools 4
No new posts SAS Work space - B37 abend JCL & VSAM 15
No new posts IBM Pcomm macro startmacro command do... IBM Tools 0
Search our Forums:

Back to Top