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
 

 

AIX byte getting truncated

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: AIX byte getting truncated
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: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Thu Apr 08, 2010 11:42 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts 2 byte YEAR from Y'DATE2' field tecnokrat DFSORT/ICETOOL 2 Tue Feb 07, 2017 12:05 pm
No new posts Truncated error message after VERIFY ... David Sde TSO/ISPF 4 Mon Sep 05, 2016 11:26 pm
No new posts Need Help to Define 36 Input Fields (... satish.ms10 CLIST & REXX 2 Sat May 07, 2016 3:08 pm
No new posts fields truncated in csv file sakrat JCL & VSAM 30 Wed May 13, 2015 10:45 pm
No new posts How to store 2 digit numeric data in ... cnugemini COBOL Programming 4 Thu Jun 26, 2014 8:02 pm


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