How to declare VP999 COMP-3 in easy Trieve ?
-
- Posts: 9
- Joined: Sat Nov 05, 2011 9:03 pm
- Skillset: JCL, COBOL , VSAM
- Referer: Google
How to declare VP999 COMP-3 in easy Trieve ?
Could anyone tell me, how to declare VP999 COMP-3 in easy trieve and how to declare MASK for this field ?
-
- Global moderator
- Posts: 3805
- Joined: Tue Jan 25, 2011 12:02 am
- Skillset: Easytrieve Plus, Cobol, Utilities, that sort of stuff
- Referer: Google
Re: How to declare VP999 COMP-3 in easy Trieve ?
Can you describe in words what you feel VP999 COMP-3 is?
-
- Posts: 9
- Joined: Sat Nov 05, 2011 9:03 pm
- Skillset: JCL, COBOL , VSAM
- Referer: Google
Re: How to declare VP999 COMP-3 in easy Trieve ?
Its the picture clause in COBOL
-
- Global moderator
- Posts: 3805
- Joined: Tue Jan 25, 2011 12:02 am
- Skillset: Easytrieve Plus, Cobol, Utilities, that sort of stuff
- Referer: Google
Re: How to declare VP999 COMP-3 in easy Trieve ?
Yes, I know that 
What I want to know is what you think that definition describes.
I was surprised it compiled, but it does, but I don't think it does what you think it does. If you can describe what it should be defining, we can clear that up and sort out how to define it in Easytrieve Plus.

What I want to know is what you think that definition describes.
I was surprised it compiled, but it does, but I don't think it does what you think it does. If you can describe what it should be defining, we can clear that up and sort out how to define it in Easytrieve Plus.
-
- Global moderator
- Posts: 3805
- Joined: Tue Jan 25, 2011 12:02 am
- Skillset: Easytrieve Plus, Cobol, Utilities, that sort of stuff
- Referer: Google
Re: How to declare VP999 COMP-3 in easy Trieve ?
Language Reference (emphasis added) wrote:P symbol
The symbol P specifies a scaling position and implies an assumed decimal point
(to the left of the Ps if the Ps are leftmost PICTURE characters; to the right of the
Ps if the Ps are rightmost PICTURE characters). The assumed decimal point
symbol V is redundant as either the leftmost or rightmost character within such a
PICTURE description.
So, to make it simple, do you have three decimal places, or four?
If three, definition should be without the P, if four, definition should be without the V.
-
- Posts: 9
- Joined: Sat Nov 05, 2011 9:03 pm
- Skillset: JCL, COBOL , VSAM
- Referer: Google
Re: How to declare VP999 COMP-3 in easy Trieve ?
I have a field named
TAX-RATE VP999 COMP-3 in COBOL
Now I want to define this field in Easytrieve ... along with MASK
TAX-RATE VP999 COMP-3 in COBOL
Now I want to define this field in Easytrieve ... along with MASK
-
- Global moderator
- Posts: 3805
- Joined: Tue Jan 25, 2011 12:02 am
- Skillset: Easytrieve Plus, Cobol, Utilities, that sort of stuff
- Referer: Google
Re: How to declare VP999 COMP-3 in easy Trieve ?
Yes. I know. I also know it is a definition in a Cobol program. I know you want to define it in Easytrieve. I know you want to also define a MASK for it in Easytrieve.
What I do not know is what your field is/what you think it is.
The V and P should not be present in the same PICture clause, although the compiler seems to just ignore the V, like the manual describes.
You have them in the same PICture clause, in a Cobol definition. So, to be able to suggest something for you in Easytrieve I need to know what the field you want actually is. You have a "questionable" Cobol definition, so I am asking you to explain, in English words nothing to do with computers, your field.
I even simplified it to asking you how many decimal places your field has, three or four.
If you don't know, you'll have to find out before going any further.
Simply repeating the same things repeatedly will lead to nothing but simple repetition of the same things.
What I do not know is what your field is/what you think it is.
The V and P should not be present in the same PICture clause, although the compiler seems to just ignore the V, like the manual describes.
You have them in the same PICture clause, in a Cobol definition. So, to be able to suggest something for you in Easytrieve I need to know what the field you want actually is. You have a "questionable" Cobol definition, so I am asking you to explain, in English words nothing to do with computers, your field.
I even simplified it to asking you how many decimal places your field has, three or four.
If you don't know, you'll have to find out before going any further.
Simply repeating the same things repeatedly will lead to nothing but simple repetition of the same things.
-
- Global moderator
- Posts: 3805
- Joined: Tue Jan 25, 2011 12:02 am
- Skillset: Easytrieve Plus, Cobol, Utilities, that sort of stuff
- Referer: Google
Re: How to declare VP999 COMP-3 in easy Trieve ?
Your field is two bytes long, whatever your definition.
If the P is correct, you can't represent that in Easytrieve directly, as far as I am aware.
If you need to include it in a report, you'll have to define an additional field.
Something like this:
If the file-field is less than zero, assign "-" to the new sign field, else blank or "+" as you want.
If the P is correct, you can't represent that in Easytrieve directly, as far as I am aware.
If you need to include it in a report, you'll have to define an additional field.
Something like this:
Code: Select all
file-field position 2 P 3
to-use-file-field file-field position 2 P 0
w-print-file-field W 5 A.
w-always-zero w-print-file-field 1 A VALUE ZERO
w-copy-of-file-field w-print-file-filed +1 3 N
w-copy-of-file-field-sign w-print-file-filed +4 1 A
Code: Select all
w-copy-of-file-field = to-use-file-field
If the file-field is less than zero, assign "-" to the new sign field, else blank or "+" as you want.
-
- Similar Topics
- Replies
- Views
- Last post
-
-
Easy way to send PDS of source code to another user via inte
by mamustoe » Wed May 18, 2022 4:34 pm » in JCL - 4
- 1845
-
by willy jensen
View the latest post
Wed May 18, 2022 10:42 pm
-
-
- 3
- 5890
-
by sergeyken
View the latest post
Sat Dec 10, 2022 2:30 am
-
- 5
- 2734
-
by sergeyken
View the latest post
Thu Feb 25, 2021 8:19 pm
-
-
Moving High-Values from Comp-3 - COBOL Ver 6.4
by girik1001 » Thu Jul 20, 2023 12:08 pm » in IBM Cobol - 1
- 3925
-
by sergeyken
View the latest post
Thu Jul 20, 2023 6:38 pm
-
-
- 1
- 1784
-
by sergeyken
View the latest post
Fri Mar 26, 2021 11:59 pm