Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Truncation problem In Easytrieve

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: Truncation problem In Easytrieve
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

Site Director


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

PostPosted: Thu Oct 30, 2008 1:43 am    Post subject:
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    Post subject: Reply to: Truncation problem In Easytrieve
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

Site Director


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

PostPosted: Thu Oct 30, 2008 2:54 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Fri Oct 31, 2008 12:23 am    Post subject:
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    Post subject:
Reply with quote

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

Site Director


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

PostPosted: Sat Nov 01, 2008 12:58 am    Post subject: Reply to: Truncation problem In Easytrieve
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm
No new posts Easytrieve - Report writing - Only 1 ... Abhi Nature CA Products 2 Wed Sep 14, 2016 11:40 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us