View previous topic :: View next topic
|
Author |
Message |
PrinceAlexander
New User
Joined: 02 Apr 2007 Posts: 4 Location: INDIA
|
|
|
|
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 |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Quote: |
Hai I am very much interested in Mainframe Technology. |
Good to know
The program looks different. Is it running on mainframe?
I am curious to see some replies here. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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.....
Why was 807 bytes attached as a download? |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
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 |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
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 |
|
|
PrinceAlexander
New User
Joined: 02 Apr 2007 Posts: 4 Location: INDIA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Always good to hear when an answer is found
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 |
|
|
|