VB to VB copy using SORT.

IBM's Sort Product, ICETOOL, ICEMAN and ICEGENER.
Previous topicNext topic

Topic Author
Rozi Lakhani
New Member
Posts: 7
Joined: Fri May 20, 2016 6:48 pm

VB to VB copy using SORT.

Post by Rozi Lakhani » Sat Jan 07, 2017 8:25 am

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: 597
Joined: Wed Apr 23, 2014 8:45 pm

Re: VB to VB copy using SORT.

Post by nicc » Sat Jan 07, 2017 4:01 pm

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


Topic Author
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 » Tue Jan 10, 2017 11:42 am

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: 499
Joined: Sun Aug 25, 2013 7:24 pm

Re: VB to VB copy using SORT.

Post by William Collins » Wed Jan 11, 2017 11:19 pm

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?




Topic Author
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 » Thu Jan 12, 2017 2:19 pm

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: 499
Joined: Sun Aug 25, 2013 7:24 pm

Re: VB to VB copy using SORT.

Post by William Collins » Sat Jan 14, 2017 1:39 pm

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.




Topic Author
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 » Wed Jan 18, 2017 10:40 am

Thanks William. :)



Previous topicNext topic

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