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

HOW to remove the smaller length record from a VSAM


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

New User


Joined: 17 Jan 2008
Posts: 28
Location: Kolkata, INDIA

PostPosted: Thu May 24, 2012 5:25 pm
Reply with quote

I have VSAM file defined as maximum record length 200 bytes.
Somehow some other program (probably not compiled with the new copybook) have inserted a few 100 byte records in this file.

Now, while doing a IDCAMS REPRO from the VSAM to a 300 byte PS(FB) file. I am getting the error for those records as invalid length record.
But the key specified in the SYSPRINT for the invalid length record is very very partial. It only provide me first 5 byte of the KEY, where the KEY is of 16 bytes.

So I am unable to locate those invalid length records in the file quickly.
I need to locate and remove those records from the file.

Any idea would be helpful......
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: Thu May 24, 2012 5:29 pm
Reply with quote

Whack your input though a Sort step. OUTFIL for your "good" file, INCLUDEing (1,2,BI,EQ,200) and SAVE for second OUTFIL so you get a file with all the "baddies" on.
Back to top
View user's profile Send private message
Prasun De

New User


Joined: 17 Jan 2008
Posts: 28
Location: Kolkata, INDIA

PostPosted: Thu May 24, 2012 5:54 pm
Reply with quote

Thanks for the idea...

Tried, but got all records in BAD file.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu May 24, 2012 6:00 pm
Reply with quote

what is the minimum length - from the listcat.
Back to top
View user's profile Send private message
Prasun De

New User


Joined: 17 Jan 2008
Posts: 28
Location: Kolkata, INDIA

PostPosted: Thu May 24, 2012 6:06 pm
Reply with quote

The average length is 199 from listcat.. I don't find a minimum length.

Also, just to be precise, the file is IAM file (not exactly VSAM).
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu May 24, 2012 6:13 pm
Reply with quote

this thread reminds me of an automechanic friend of mine
who was asked about a problem with a customers vehicle.

he went round and round for a while until the customer finally told him
the vehicle was a motorcycle.

this, like many other questions posed to this forum,
are indications that the colleagues of the TS are just tired of dealing with him.
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 May 24, 2012 6:16 pm
Reply with quote

Since IAM and VSAM are different, why does your topic title reference VSAM? Why did you not mention such critical information in your original post? Why are you not looking for a solution in the IAM manuals?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu May 24, 2012 8:29 pm
Reply with quote

Prasun De wrote:
Also, just to be precise, the file is IAM file (not exactly VSAM).
That's not being precise, that's changing the topic all together. Here is a hint, but that's not very precise - just to show that SORT can work with IAM too icon_smile.gif

ibmmainframes.com/about57851.html

There are some more topics in the Forum, please search.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu May 24, 2012 9:55 pm
Reply with quote

Just an educated guess - you may need to use the following DFSORT statements:

Code:

   RECORD TYPE=V
   INCLUDE COND=(1,2,BI,EQ,204)


to tell DFSORT to append an RDW to your records and treat them as variable length.
Back to top
View user's profile Send private message
Prasun De

New User


Joined: 17 Jan 2008
Posts: 28
Location: Kolkata, INDIA

PostPosted: Wed May 30, 2012 10:18 am
Reply with quote

Thank You Frank...... The solution is working perfectly...

I apologize to all of you for the confusion I created around with the misguided requirement.

Actually this was due to my ineligibility... I was unaware of IAM datasets....
Someone told me about those datasets to be IAM after I posted the query..

Anyway, thank you all for you support...
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 Store the data for fixed length COBOL Programming 1
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
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top