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

'ACCEPT (12 50) B WITH PROMPT' What is 'PROMPT'


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

New User


Joined: 02 Apr 2007
Posts: 4
Location: INDIA

PostPosted: Tue Apr 03, 2007 2:25 pm
Reply with quote

What happens if this statement was executed by cobol compiler i.e. what is the use of prompt in accept and in what version of cobol this can be used.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Tue Apr 03, 2007 2:56 pm
Reply with quote

Quote:
Hai I am very much interested in Mainframe Technology.

Good to know icon_lol.gif
The program looks different. Is it running on mainframe?
I am curious to see some replies here. icon_cool.gif
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: Tue Apr 03, 2007 10:24 pm
Reply with quote

Hello,

Seems like i've seen that in MicroFocus COBOL. . .

If i recall at all correctly, it works like the old
Code:
ACCEPT cccc FROM CONSOLE
and prompts the user (not the system console operator) for the input.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Apr 03, 2007 10:31 pm
Reply with quote

Quote:
The selected Attachment is moved to Mainframe CD to avoid server overload!

404 File Not Found: The File files/acc-prompt.cob does not exist.
You guys must have xray vision..... icon_confused.gif
Why was 807 bytes attached as a download?
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Wed Apr 04, 2007 12:23 pm
Reply with quote

Bill,
I was able to see the attachement when I opened it.
here is the code which O/P posted.
Code:
ACCEPT WITH PROMPT.

77  A PIC S99 SIGN IS LEADING SEPARATE CHARACTER

EXAMPLE
..............
   IDENTIFICATION DIVISION.
   PROGRAM-ID. ACC.
   DATA DIVISION.
   WORKING-STORAGE SECTION.
            77 A PIC s9(3)V99 LEADING SEPARATE.
            77 B PIC s9(3)V99 TRAILING SEPARATE.
                        77 NAME PIC A(10).
    PROCEDURE DIVISION.
    START-PARA.
      DISPLAY (10 20) "ENTER VALUE OF A".
      ACCEPT (10 50) A WITH PROMPT.
      DISPLAY (12 20) "ENTER VALUE OF B".
      ACCEPT (12 50) B WITH PROMPT.
      DISPLAY(14 20) "ENTER NAME".
                              ACCEPT(14 50) NAME WITH PROMPT.
      ADD A TO B.
                              DISPLAY (16 20) "VALUE OF A IS " A.
      DISPLAY (18 20) "VALUE OF B IS " B.
                              DISPLAY (20 20) " NAME IS  " NAME.
      STOP RUN.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Wed Apr 04, 2007 8:19 pm
Reply with quote

Definitely not standard mainframe cobol.
Some different 'flavour' of cobol may be supporting such syntax.
(10 , 20) may be co-ordinates on the raster screen.
Quote:
10- line number
20- column number

Need to here from O/P.
Back to top
View user's profile Send private message
PrinceAlexander

New User


Joined: 02 Apr 2007
Posts: 4
Location: INDIA

PostPosted: Fri Apr 06, 2007 3:50 pm
Reply with quote

Finally I found answer to my question.
prompt is a keyword used for prompting the data display of an identifier .i.e. its like justification. I helps only on display and not on storage.
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: Fri Apr 06, 2007 8:35 pm
Reply with quote

Hello,

Always good to hear when an answer is found icon_smile.gif

I don't understand this
Quote:
.i.e. its like justification

Please clarify.

By the way, are you running on an IBM mainframe or some other platform?
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 Is the 'prompt' data for the DSLIST p... TSO/ISPF 2
No new posts How to display data in command prompt CLIST & REXX 7
No new posts Cobol Accept date VS Db2 Current time... DB2 7
No new posts Can we accept data using ADDPOP popup... TSO/ISPF 5
This topic is locked: you cannot edit posts or make replies. Accept command to get the sysstem dat... CICS 7
Search our Forums:

Back to Top