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
 

 

HOW to remove the smaller length record from a VSAM

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: HOW to remove the smaller length record from a VSAM
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Thu May 24, 2012 5:29 pm    Post subject: Reply to: HOW to remove the smaller length record from a VSA
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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: 7913
Location: Bellevue, IA

PostPosted: Thu May 24, 2012 6:16 pm    Post subject:
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

Senior Member


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

PostPosted: Thu May 24, 2012 8:29 pm    Post subject:
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

http://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 Moderator


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

PostPosted: Thu May 24, 2012 9:55 pm    Post subject:
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    Post subject:
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    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 How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 pm
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am
No new posts Joinkeys operation when key1 and key2... Susanta DFSORT/ICETOOL 5 Wed Nov 02, 2016 5:35 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am


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