IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Truncation problem In Easytrieve


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
meaanand

New User


Joined: 11 Sep 2004
Posts: 16

PostPosted: Thu Oct 30, 2008 1:18 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Oct 30, 2008 1:43 am
Reply with quote

Hello,

As you have posted, it might be either.

If you post a more complete ezt file definition, we can tell.
Back to top
View user's profile Send private message
meaanand

New User


Joined: 11 Sep 2004
Posts: 16

PostPosted: Thu Oct 30, 2008 2:18 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Oct 30, 2008 2:54 am
Reply with quote

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
View user's profile Send private message
meaanand

New User


Joined: 11 Sep 2004
Posts: 16

PostPosted: Thu Oct 30, 2008 8:49 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Oct 31, 2008 12:23 am
Reply with quote

Hello,

With this definition:
Code:
AMT-P           31 8 N 2 
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
View user's profile Send private message
meaanand

New User


Joined: 11 Sep 2004
Posts: 16

PostPosted: Fri Oct 31, 2008 7:45 pm
Reply with quote

Thanks Dicks.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Sat Nov 01, 2008 12:58 am
Reply with quote

You're welcome icon_smile.gif

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts z/vm installation problem All Other Mainframe Topics 0
No new posts Count the number of characters in a f... CA Products 1
No new posts File matching functionality in Easytr... DFSORT/ICETOOL 14
No new posts Job scheduling problem. JCL & VSAM 9
Search our Forums:

Back to Top