View previous topic :: View next topic
|
Author |
Message |
meaanand
New User
Joined: 11 Sep 2004 Posts: 16
|
|
|
|
Hi all,
I am facing some truncation problem In Easytrieve, as I am new to Easytrieve please help me out on this issue.
We are getting a data which is created thru a COBOL program in cobol program the field is declared as 9(7)V99. So, it could hold 1234567.89
When this value is coming into Easytrieve they are referring the particular field as below.
AMOUT 31 8 N 2
I am assuming this declaration is equivalent to 9(6)V99 in COBOL. (Correct me if I am wrong) so in Easytrieve, this declaration is going to be 123456.78 or 234567.89. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
As you have posted, it might be either.
If you post a more complete ezt file definition, we can tell. |
|
Back to top |
|
|
meaanand
New User
Joined: 11 Sep 2004 Posts: 16
|
|
|
|
hi,
Code: |
RECCODE 1 1 A
UNIT 3 8 N
TRN-DT 17 6 A
AMT-P 31 8 N 2
PAID-NAME 50 3 A
BATCH-NO 2 4 A
REC-T 13 3 N MASK('ZZ9')
AMT-T 16 9 N MASK('$,$$$,$$9.99') |
is the file structure.
Below is the sample record
Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
P111919050 102708000000001234567800000 JOHNSON CA0000002487 |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
The sample record does not match the definiton you originally posted.
With the data you posted, there no "9" to consider? The data is in 31-38 and that is how the ezt definition is written.
Also, when posting code, jcl, data, etc, it is best to use the "Code" tag wich will make your post more readable as well as preserve alignment (refer your code/data above). You can Preview your post to see how it will appear to the forum and then Submit when you are satisfied with how your post appears. |
|
Back to top |
|
|
meaanand
New User
Joined: 11 Sep 2004 Posts: 16
|
|
|
|
If in the data we have as
Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
P111919050 102708000000001234567890000 JOHNSON CA0000002487 |
Easytrieve will consider as
123456.78 or 234567.89
Thank you.. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
With this definition:
Easytrieve will use 123456.78 (pos 31-38). Positon 39 is undefined in the posted layout, so Easytrieve never "sees" the 9 in pos 39.
Suggest you get the 2 file definitons "in sync". |
|
Back to top |
|
|
meaanand
New User
Joined: 11 Sep 2004 Posts: 16
|
|
|
|
Thanks Dicks. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome
d |
|
Back to top |
|
|
|