Check if the data in file is greater than 'x' using DFSORT



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Check if the data in file is greater than 'x' using DFSORT

Postby shivanshu26shiv » Mon Jun 01, 2015 9:01 pm

I need to check if the data in i/p file is greater than 200 using DFSORT,

I/p file:
________________
any-positive-integer
________________

LRECL = 18, BLKSIZE = 18, TYPE = FB

I am using,

OUTREC IFTHEN=(WHEN=(1,18,ZD,GT,+200),BUILD=(1,18))

I have also tried,

INCLUDE=(1,18,ZD,GT,+200)

but its not working...

O/p contains only I/p data...pls help to rectify
or let me know if any other info required,
shivanshu26shiv
 
Posts: 33
Joined: Mon Jun 01, 2015 8:45 pm
Has thanked: 4 times
Been thanked: 0 time

Re: Check if the data in file is greater than 'x' using DFSORT

 

Re: Check if the data in file is greater than 'x' using DFSO

Postby Terry Heinze » Mon Jun 01, 2015 9:47 pm

In the future, please post your question in the appropriate area.
.... Terry
Terry Heinze
 
Posts: 193
Joined: Wed Dec 04, 2013 11:08 pm
Location: Richfield, MN, USA
Has thanked: 10 times
Been thanked: 11 times

Re: Check if the data in file is greater than 'x' using DFSO

Postby shivanshu26shiv » Mon Jun 01, 2015 9:49 pm

I apologize.., but pls elaborate yourself...
shivanshu26shiv
 
Posts: 33
Joined: Mon Jun 01, 2015 8:45 pm
Has thanked: 4 times
Been thanked: 0 time

Re: Check if the data in file is greater than 'x' using DFSO

Postby BillyBoyo » Mon Jun 01, 2015 9:52 pm

The topic has been moved to the correct part of the forum.

Can you show a sample of your data, please?

These users thanked the author BillyBoyo for the post:
shivanshu26shiv (Mon Jun 01, 2015 9:58 pm)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Check if the data in file is greater than 'x' using DFSO

Postby shivanshu26shiv » Mon Jun 01, 2015 9:57 pm

Thanks for moving but pls do tell me the place to avoid any future dicrepancies,

As I have said, data consists of 1 line positive integer for eg;
------------------
123-> here I need to check that 123 < 200,
------------------
or
------------------
321-> here I need to check that 321 > 200,
------------------
shivanshu26shiv
 
Posts: 33
Joined: Mon Jun 01, 2015 8:45 pm
Has thanked: 4 times
Been thanked: 0 time

Re: Check if the data in file is greater than 'x' using DFSO

Postby BillyBoyo » Mon Jun 01, 2015 10:15 pm

For DFSORT questions, there is a DFSORT section underneath the IBM Utilities and Tools

OK, you said, but we didn't know exactly what you'd got wrong. Now we do. Your data is not ZD, so what you coded on the INCLUDE won't work.

Use UFF instead of ZD as the type in your INCLUDE.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Check if the data in file is greater than 'x' using DFSO

Postby shivanshu26shiv » Mon Jun 01, 2015 10:47 pm

Thanks BillyBoyo,

INCLUDE=(1,18,UFF,GT,+200) worked,
but
IFTHEN=(WHEN=(1,18,UFF,GT,+200),BUILD=(1,18)) didn't..

Anyways thanks.
shivanshu26shiv
 
Posts: 33
Joined: Mon Jun 01, 2015 8:45 pm
Has thanked: 4 times
Been thanked: 0 time

Re: Check if the data in file is greater than 'x' using DFSO

Postby BillyBoyo » Mon Jun 01, 2015 11:11 pm

You say the IFTHEN didn't work, but how would you know? All it is doing is creating a new current record, identical to the old.

If you change the BUILD to =(1,18,C'!') I think you'll find it "working", just not doing what you hoped it would do. The only way records can be selected is with INCLUDE COND=, OMIT COND= and INCLUDE=/OMIT= on OUTFIL. IFTHEN is nothing to do with record selection.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Check if the data in file is greater than 'x' using DFSO

Postby shivanshu26shiv » Mon Jul 06, 2015 7:42 pm

It worked, thanks a lot :)
shivanshu26shiv
 
Posts: 33
Joined: Mon Jun 01, 2015 8:45 pm
Has thanked: 4 times
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post