Page 1 of 1

VB file: find and copy matching record

PostPosted: Sun Apr 18, 2010 5:56 am
by RonaldCDcosta
I have a VB file as below:
Record length : 32187
Block size : 32191

I have a list of records to find from this file. The positon in file is 18, length 11.
I need to copy the complete row to a new VB file for these matching records and all non-matching records to anothe VB file.

Input : VB file
output1 : VB matching records
output2: VB non-matching records

How to do this?

I used below Sort, but it seems this works only for FB.
SORT FIELDS=COPY
INCLUDE COND=((18,11,CH,EQ,C'111111111111'),OR,
(18,11,CH,EQ,C'22222222222'),OR,
(18,11,CH,EQ,C'33333333333'))

Please help.

Re: VB file: find and copy matching record

PostPosted: Sun Apr 18, 2010 7:09 am
by dick scherrer
Hello,

This should work for vb files as well as fb. What happened when you tried this?

You need to post the jcl and any informational messages generated by the run.

Re: VB file: find and copy matching record

PostPosted: Sun Apr 18, 2010 7:29 am
by Robert Sample
Is the position 18 with or without the 4 bytes of the record descriptor word (RDW)? If you didn't include the RDW, your sort statements must be changed to position 22 to allow for the RDW.