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
 

 

Wat will be the relevant parameters for VSAM creation.
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sanjay kumar tripathi

New User


Joined: 08 Jul 2008
Posts: 11
Location: chennai

PostPosted: Tue Jun 30, 2009 1:43 pm    Post subject: Wat will be the relevant parameters for VSAM creation.
Reply with quote

Hi all,

I have a requirement to create a vsam with average record length 127 and maximum of 381. The primary no. of records are 500000 and secondary 100000. I have created the VSam with following attributes.

DEFINE CLUSTER (NAME(vsam file) -
INDEXED -
NOREPLICATE -
RECORDS (500000,100000) -
RECORDSIZE (127,381) -
KEYS (25, 0) -
FREESPACE (10, 20) -
REUSE -
SHAREOPTIONS (4, 4)) -
DATA (NAME (vsamfile.DATA)) -
INDEX (NAME (vsamfile.INDEX))



But when i am running the program which uses this VSAM , after processing certain number of records(which is very less than 500000) its giving this error
COBOL: 24; VSAM:08, 0, 028

Could anyone please help me?
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 30, 2009 1:54 pm    Post subject:
Reply with quote

Please post the exact error messages and codes issued from the job output.

Also bear in mind
Quote:

When you define the cluster using the RECORDS parameter, the amount of free space specified is not considered in the calculations to determine primary allocation.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Jun 30, 2009 2:03 pm    Post subject:
Reply with quote

Read VSAM Demystified

I would say that we should make this a sticky, but that would be a waste of time.

few search, few look at manuals, most just post the question and wait for answers.
Back to top
View user's profile Send private message
sanjay kumar tripathi

New User


Joined: 08 Jul 2008
Posts: 11
Location: chennai

PostPosted: Tue Jun 30, 2009 2:16 pm    Post subject: Reply to: Wat will be the relevant parameters for VSAM creat
Reply with quote

I have used following declarative in the program

DECLARATIVES.
ERR-FLAGFILE SECTION.
USE AFTER ERROR PROCEDURE NEWVSAM.

DISPLAY 'ERROR DURING PROCESSING VSAMFILE'.
DISPLAY 'COBOL: ' WS-ARCH-STAT
'; VSAM:' FLG1 ', ' FLG2 ', ' FLG3.
MOVE 8 TO RETURN-CODE.
STOP RUN.
END DECLARATIVES.

Therefore i am getting following error message -

ERROR DURING PROCESSING VSAMFILE
COBOL: 24; VSAM:08, 0, 028
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 30, 2009 2:24 pm    Post subject:
Reply with quote

OK, let's get to the basics.

Were there any IDC or IEC messages issued by the failing program.

You have defined the cluster, and what next -
Did you load it with data by some method
Do you use the program to load the data
How many records have been processed.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Tue Jun 30, 2009 3:09 pm    Post subject:
Reply with quote

Post a LISTCAT in BBcode format for the file so we can see the definition.

Also, how many records got loaded?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Tue Jun 30, 2009 3:14 pm    Post subject:
Reply with quote

expat: wanna bet the program is loading the file and the COBOL code writes the maximum record length instead of the actual record length, and that the record count loaded is therefore about 167,000? icon_cool.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Jun 30, 2009 3:15 pm    Post subject: Reply to: Wat will be the relevant parameters for VSAM creat
Reply with quote

How to use bbcode
Back to top
View user's profile Send private message
sanjay kumar tripathi

New User


Joined: 08 Jul 2008
Posts: 11
Location: chennai

PostPosted: Tue Jun 30, 2009 3:37 pm    Post subject: Reply to: Wat will be the relevant parameters for VSAM creat
Reply with quote

I am not getting any other error mesage appart from that i mentioned. I have just created the VSAM with the specified attribute and then initialize it, because my program is using this in i/o mode. Thereafter my program is reading some values from databse and writing them into VSAM file.

Since VSAM is of variable record length, so i can not determine the exact reord being processed. In each and every run its used to be diferent.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 30, 2009 3:48 pm    Post subject:
Reply with quote

Mmmmmmm, setting up your own error messages when those that occur naturally from IBM are far more informative is not such a good idea. But then that's only my opinion.

Please post the LISTCAT requested by Robert.

Quote:
expat: wanna bet the program is loading the file and the COBOL code writes the maximum record length instead of the actual record length, and that the record count loaded is therefore about 167,000?

Robert: Bet against a sysprog ? NO WAY - they're shadier than an English summer

One thing that I have noticed is that when people load a cluster via a program rather than IDCAMS, they tend to be extremely lazy by not sorting the input file into key sequence order. Not only does this tend to take longer in total than a load from a sorted file + the sort time taken, it is also a recipe for more splits than you find at a schitzos comference.

Recall once this happened and during the load the job blew out after about 40 minutes. Irate developer screaming "You told me how much space to allocate - you got it wrong, you don't know what your on about ..... blah blah blah". I took a look at the file and it was split to pieces. I sorted the input and then reran, the job took about 25 minutes and the file was pristine on completion well within the space estimate that I'd given him. Sending him an email to explain the situation was a joy icon_lol.gif

Maybe this is the case here too
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Tue Jun 30, 2009 4:48 pm    Post subject:
Reply with quote

expat: Splits or every record written at maximum record length (or even both) -- the LISTCAT output will tell us. Presuming the COBOL file status is 24 per the message, the problem seems likely to be one of the two.

And sysprogs being shadier than an English summer? I doubt it. Maybe shadier than Seattle in the winter but not an English summer! icon_smile.gif

sanjay: you need to give us something more than you have -- such as the LISTCAT output. How many records are being processed before the problem occurs (approximately -- we understand how the count can vary a bit from run to run)? Is your input file sorted in the same sequence as the VSAM file key? And why are you using shareoptions of (4,4) -- unless you have specific requirements for (4,4) you are much better off using the more standard (2,3)? This could be the proximate cause of the error you're getting if the file is DISP=SHR; you cannot add space to a (4,4) VSAM file unless you have DISP=OLD specified.
Back to top
View user's profile Send private message
sanjay kumar tripathi

New User


Joined: 08 Jul 2008
Posts: 11
Location: chennai

PostPosted: Tue Jun 30, 2009 6:29 pm    Post subject: Reply to: Wat will be the relevant parameters for VSAM creat
Reply with quote

Thanks robert for the help.
I changed the disp mode to OLD and now its working fine.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 30, 2009 6:47 pm    Post subject:
Reply with quote

Good shot Rob, I never knew that. Thanks.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Tue Jun 30, 2009 7:02 pm    Post subject:
Reply with quote

Thanks, expat -- I've run into that a time or two over the years. DISP=SHR and SHR(4,4) won't let you extend the VSAM file, even if there is secondary specified.

I still think there are other issues, but as long as the o/p is satisfied ...
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 30, 2009 7:20 pm    Post subject:
Reply with quote

Quote:
but as long as the o/p is satisfied ...

He will settle the invoice icon_biggrin.gif
Back to top
View user's profile Send private message
sanjay kumar tripathi

New User


Joined: 08 Jul 2008
Posts: 11
Location: chennai

PostPosted: Wed Jul 01, 2009 6:06 pm    Post subject: Reply to: Wat will be the relevant parameters for VSAM creat
Reply with quote

You are right robert, now i am facing one new issue.
Even VSAM is getting populated with the records perfectly, now its not in sorted order.
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 988
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Wed Jul 01, 2009 6:19 pm    Post subject:
Reply with quote

Records in a VSAM KSDS have to be in ascending key sequence. If what you're seeing is not sorted in the order you expect, then you have specified the key position incorrectly.

GArry.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Wed Jul 01, 2009 6:25 pm    Post subject:
Reply with quote

What do you define as "sorted order"? The file will be kept in key sequence, no matter how you sorted it for input. The key sequence is the first 25 bytes of the record according to your first post. What sequence do you expect the records to be in?
Back to top
View user's profile Send private message
sanjay kumar tripathi

New User


Joined: 08 Jul 2008
Posts: 11
Location: chennai

PostPosted: Wed Jul 01, 2009 6:30 pm    Post subject:
Reply with quote

For example, records are getting stored like this:-

GB1X605 09070111006006099999999990
GB1X605 09070111006006199999999990
MT0353DMLA090701010010000MT0353DMLA
MT0353DMLA090701020010000ADDRESS
MT8000LMLA090701020040000NAME
MT8000LMLA090701060010000
MT8000LMLA090701070010000
SA0015ARUH090701010010000SA0015ARUHI
SA0015ARUH090701020010000ADDRESS

But it shuld come in sequence of M,G and S
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Wed Jul 01, 2009 6:42 pm    Post subject:
Reply with quote

Then your VSAM file definition is wrong. What is the actual key starting position and length supposed to be?

Assuming these are the first bytes of the records, they are sequenced as you specified in your first post -- G comes before M comes before S in the English alphabet, and that is how they are stored in the file. Further, MT0353 comes before MT8000 so these records are also sequenced as you specified in your original post.
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
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am
No new posts CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm
No new posts VSAM define for large file jerryte JCL & VSAM 9 Wed Oct 05, 2016 1:51 am
No new posts CICS VSAM RLS READ akodakka CICS 3 Tue Oct 04, 2016 3:09 pm
No new posts ISPF Tables Creation newsysprg TSO/ISPF 6 Wed Jul 13, 2016 2:21 pm


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