VB to VB copy using SORT.
-
- New Member
- Posts: 7
- Joined: Fri May 20, 2016 6:48 pm
VB to VB copy using SORT.
Hi,
I have to copy a VB to a new VB file. In this, I need to see if there is a records of length of 500 then I need to make it 480. Is that possible using SORT. Please help me.
I have to copy a VB to a new VB file. In this, I need to see if there is a records of length of 500 then I need to make it 480. Is that possible using SORT. Please help me.
Re: VB to VB copy using SORT.
How do you identify which record of 500 bytes is to be reduced in length - if there are more than two types. Which 20 bytes are not to be copied? Does the 500 bytes include the RDW?
Regards
Nic
Nic
-
- New Member
- Posts: 7
- Joined: Fri May 20, 2016 6:48 pm
Re: VB to VB copy using SORT.
I don't know whoe to check on the lenght. But every record will have RDW.
I did not get you. Can you please explian it again.if there are more than two types
-
- Global Moderator
- Posts: 490
- Joined: Sun Aug 25, 2013 7:24 pm
Re: VB to VB copy using SORT.
You will have some records of 500 (or 496 or 504) bytes. You intend to lose 20 bytes. Which ones? Are they all the for same type of record (nicc's point)? If not, how are the records you want to lose data for identified?
-
- New Member
- Posts: 7
- Joined: Fri May 20, 2016 6:48 pm
Re: VB to VB copy using SORT.
I forgot to tell the main information, the LRECL is 1000 and it should remain same after copy too. I need to find all the records which are of length 500 in the current file and last 20 butes should be removed while we copy it to output.
-
- Global Moderator
- Posts: 490
- Joined: Sun Aug 25, 2013 7:24 pm
Re: VB to VB copy using SORT.
You need, on INREC, to have IFTHEN=(WHEN=(logicalexpression to test the record-length part of the RDW on each variable-length record for being 500, in binary (you define the field as binary). Then you BUILD=(1,4,5,476) and that is it.
-
- New Member
- Posts: 7
- Joined: Fri May 20, 2016 6:48 pm
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute