VB to VB copy using SORT.

IBM's Sort Product, ICETOOL, ICEMAN and ICEGENER.
Post Reply
Rozi Lakhani
New Member
Posts: 7
Joined: Fri May 20, 2016 6:48 pm

VB to VB copy using SORT.

Post by Rozi Lakhani »

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.
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: VB to VB copy using SORT.

Post by nicc »

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
Rozi Lakhani
New Member
Posts: 7
Joined: Fri May 20, 2016 6:48 pm

Re: VB to VB copy using SORT.

Post by Rozi Lakhani »

I don't know whoe to check on the lenght. But every record will have RDW.
if there are more than two types
I did not get you. Can you please explian it again.
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: VB to VB copy using SORT.

Post by William Collins »

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?
Rozi Lakhani
New Member
Posts: 7
Joined: Fri May 20, 2016 6:48 pm

Re: VB to VB copy using SORT.

Post by Rozi Lakhani »

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.
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: VB to VB copy using SORT.

Post by William Collins »

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.
Rozi Lakhani
New Member
Posts: 7
Joined: Fri May 20, 2016 6:48 pm

Re: VB to VB copy using SORT.

Post by Rozi Lakhani »

Thanks William. :)
Post Reply

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

Register

Sign in

Return to “IBM DFSort, ICETOOL, ICEMAN, ICEGENER.”