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

Creating VSAM Variable length file - min.722/max.2000 length


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

Active User


Joined: 19 Mar 2009
Posts: 206
Location: Globe, India

PostPosted: Wed Feb 27, 2013 11:23 am
Reply with quote

I want to create KSDS VSAM - variable length file of max length 2000 bytes.
My record to be read/inserted/written/deleted will always have 722 bytes.

But whenever i perform CICS Write or Read or Update, i am getting RESP=22 i.e. LENERROR and RESP2 as 14 in WRITE and 13 in READ.

When i am specifying max length 2000 in LENGTH of READ/REWRITE, i am getting success.

Is there any problem in definition of this VSAM ?
I have specified Avg Record size as 1000 and Max record size is 2000.

We have to define this file as VSAM considering future perspective for application.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Feb 27, 2013 11:41 am
Reply with quote

If your lrecl is always 722 why tell the system that it may be different? It just leads to problems, as you have found out.
Back to top
View user's profile Send private message
rohanthengal

Active User


Joined: 19 Mar 2009
Posts: 206
Location: Globe, India

PostPosted: Wed Feb 27, 2013 2:12 pm
Reply with quote

You are right.
We will be using this file today for one product where length is constant.
But going forward same file will be used by different product and hence length may vary...
Here i have product as one of the components in key.
So, i have to define this file of VARIABLE LENGTH.
Back to top
View user's profile Send private message
rohanthengal

Active User


Joined: 19 Mar 2009
Posts: 206
Location: Globe, India

PostPosted: Wed Feb 27, 2013 2:14 pm
Reply with quote

When i am supplying max length 2000 while WRITING/REWRITING record.
It works successfully.

when i created its FCT entry, i copied it using CEDA COPY.. and source was FIXED BLOCK file.

So, i doubt if my file has been created with FIXED LENGTH property having max record length 2000 and avg length 1000.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Feb 27, 2013 3:00 pm
Reply with quote

We can see neither your program code, nor your VSAM definition.

We can say that something is wrong. For a more detailed answer, you need to provide more detail.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Feb 27, 2013 3:01 pm
Reply with quote

rohanthengal wrote:
So, i doubt if my file has been created with FIXED LENGTH property having max record length 2000 and avg length 1000.

Quite correct, as described in the manual.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Wed Feb 27, 2013 3:05 pm
Reply with quote

To add to mr Woodger's question show the FCT entry.
Back to top
View user's profile Send private message
rohanthengal

Active User


Joined: 19 Mar 2009
Posts: 206
Location: Globe, India

PostPosted: Wed Feb 27, 2013 11:26 pm
Reply with quote

Yes, finally my doubt was right.

I had created FCT by copying fixed length file. So altered FCT to record format 'V' and installed the same. Ultimately, program started running smooth.

Thanks a lot.
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 FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
Search our Forums:

Back to Top