View previous topic :: View next topic
|
Author |
Message |
achusarath
New User
Joined: 21 Mar 2007 Posts: 26 Location: kerala
|
|
|
|
hi,
please tell why a data item declared as
01 A pic 9(4) comp do not accept values through accept verb. |
|
Back to top |
|
|
achusarath
New User
Joined: 21 Mar 2007 Posts: 26 Location: kerala
|
|
|
|
Code: |
DENTIFICATION DIVISION.
PROGRAM-ID. XYZ.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 A PIC 9(4) COMP.
PROCEDURE DIVISION.
P1.
ACCEPT A
DISPLAY A.
STOP RUN. |
|
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hi achu
It should work correctly.As far as I know there is no restriction to ACCEPT as per the datatype.What is the value you are trying to enter??Are you getting any error message?
Thanks
Arun |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Quote: |
As far as I know there is no restriction to ACCEPT as per the datatype |
No you can not.
ACCEPT is only capable of handling BYTE streams, not binary(COMP) data.
It is not allowed to code COMP field in ACCEPT field. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
arcvns wrote: |
It should work correctly.As far as I know there is no restriction to ACCEPT as per the datatype. |
You really should double check the Fine Manual prior to making such a broad statement.
"identifier-1
Can be a group item or an elementary alphabetic, alphanumeric, alphanumeric-edited, numeric-edited, external decimal, DBCS, national, or external floating-point data item." |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hi all
Thanks for correcting me |
|
Back to top |
|
|
|