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

AIX byte getting truncated


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
baljinders

New User


Joined: 21 Aug 2006
Posts: 72

PostPosted: Thu Apr 08, 2010 11:40 pm
Reply with quote

Hi All,

I am facing the below problem and not able to figure out the reason for this.

Field A of lenght starts from byte 1313
Field B of lenght 12 starts from where field A ends.

Alternate key 1 = field A
Alternate key 2 = Field A + B


when i create alternate index 1 with key field as (4,1313) , the 1st byte of the field gets truncated.
say it becomes BCD
but if i change it to (4,1312) , the field is correctly dislayed.
say ABCD

My primary key is of lenght 6 bytes and key field was defined as (6,0).


This is how the copybook fields appear when i check them in FA.

Code:
--------- FIELD LEVEL/NAME ---------- -PICTURE- -NUMBER START     END  LENGTH
5 FILLER                              X(100)        22         1213    1312     100
5 Field A                             X(4)          23          1313    1316       4
5 Field B                             X(12)         24          1317    1328      12



what can be the problem here ?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Apr 08, 2010 11:42 pm
Reply with quote

When you define the key position (for both primary and alternate keys), you use the OFFSET -- which starts at zero. The 1313th byte of the file is at offset 1312. Hence your truncation.
Back to top
View user's profile Send private message
baljinders

New User


Joined: 21 Aug 2006
Posts: 72

PostPosted: Fri Apr 09, 2010 12:11 am
Reply with quote

Thanks Robert,

That clears my doubt.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts first column truncated in search result IBM Tools 13
No new posts Dataset size increase on adding 1 byt... DFSORT/ICETOOL 8
Search our Forums:

Back to Top