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
 

 

VSAM File Declaration for PD fields

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
selvaraja

New User


Joined: 04 Apr 2008
Posts: 17
Location: Maryland

PostPosted: Wed Nov 27, 2013 5:58 am    Post subject: VSAM File Declaration for PD fields
Reply with quote

Hi,

I have VSAM file with following KEY (COBOL Record Layout)

Code:
                                                  FIELD                       
 --------- FIELD LEVEL/NAME ---------- -PICTURE- -NUMBER START     END  LENGTH
 XXXX-RECORD                                                 1   10220   10220
 2 XXXX-FIXED-AREA                     GROUP          1      1    1133    1133
   3 XXXX-KEY                          GROUP          2      1      11      11
     5 XXXX-V1                         S999           3      1       2       2
     5 XXXX-V2                         S999           4      3       4       2
     5 XXXX-V3                         S9(13)         5      5      11       7



When I try to define it in EZSYTRIVE. It through the following error message.
Code:

FILE XXXX VS                                       
XXXX-RECORD                         1  10220      A
XXXX-KEY                            1     11      P
XXXX-ORG                            1      2      P
XXXX-TYPE                           3      2      P
XXXX-APPLICATION                    5      7      P



Error
Code:
           14   XXXX-KEY                            1     11      P             
EZTC0227E >>>                                             $ must be from 1 to 10


Code'd
Please help me on this
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Wed Nov 27, 2013 1:22 pm    Post subject: Reply to: VSAM File Declaration for PD fields
Reply with quote

You can't have a 21-digit packed-decimal, which is what you have defined.

Your key is made up of three separate packed-decimal fields. You'll need to define them individually, as even if you had enough digits, there would be no point in creating what would be an invalid definition.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Nov 29, 2013 7:04 pm    Post subject:
Reply with quote

1 11 P
as Bill says: violates syntax.
defining 3 packed fields as one displays a total lack of understanding on your part of how data is stored in the computer.


you are lucky that 11 was the number of bytes involved,
otherwise had it been 10,
you would encounter many errors if you ever actually addressed the field
and that would have been your question.

address the 11 bytes as alpha, always
and never address multiple numeric fields as 1 numeric field.
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 Fail to change physical VSAM filename... jacobdng CICS 5 Fri Jan 20, 2017 12:36 pm
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts Underlying DB2 VSAM LDS - SMF recording vasanthz All Other Mainframe Topics 6 Thu Jan 05, 2017 4:20 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am


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