Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: 'ACCEPT (12 50) B WITH PROMPT' What is 'PROMPT'
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: 686
Location: Earth

PostPosted: Tue Apr 03, 2007 2:56 pm    Post subject:
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

Site Director


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

PostPosted: Tue Apr 03, 2007 10:24 pm    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Tue Apr 03, 2007 10:31 pm    Post subject:
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: 686
Location: Earth

PostPosted: Wed Apr 04, 2007 12:23 pm    Post subject:
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: 686
Location: Earth

PostPosted: Wed Apr 04, 2007 8:19 pm    Post subject:
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    Post subject: Re: 'ACCEPT (12 50) B WITH PROMPT' What is 'PROMPT'
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

Site Director


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

PostPosted: Fri Apr 06, 2007 8:35 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts How to display data in command prompt shivadravid CLIST & REXX 7 Sun Jan 19, 2014 10:27 am
No new posts Cobol Accept date VS Db2 Current time... pmvino DB2 7 Fri Oct 05, 2012 7:59 pm
No new posts Can we accept data using ADDPOP popup... bipinpeter TSO/ISPF 5 Thu Sep 13, 2012 12:18 pm
This topic is locked: you cannot edit posts or make replies. Accept command to get the sysstem dat... santhoshk CICS 7 Tue Oct 11, 2011 6:40 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us