Include only empty record



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

Include only empty record

Postby xcspg3 » Wed Jul 11, 2012 4:08 pm

Hi,
I've got this problem with INCLUDE COND: how to include all the empty records for SORTIN with LRECL=400.
I usually use the statement INCLUDE COND=(1,1,CH,EQ,C' ') but in this case I've 400 spaces and not only 1 space.

Thanks

Max
xcspg3
 
Posts: 29
Joined: Tue Sep 25, 2007 6:34 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Include only empty record

 

Re: Include only empty record

Postby BillyBoyo » Wed Jul 11, 2012 4:15 pm

If you consult the manual you'll see that you can do a "repeat" value in front of the literal. 250C' ' should give 250 spaces, for instance. You can also find out whether you can use X in the comparison. 250X is 250 spaces.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Include only empty record

Postby xcspg3 » Wed Jul 11, 2012 4:27 pm

I have tried but this is wrong: COMPARISON FIELD ERROR

max
xcspg3
 
Posts: 29
Joined: Tue Sep 25, 2007 6:34 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Include only empty record

Postby BillyBoyo » Wed Jul 11, 2012 4:31 pm

Which of the two did you try? Did you look in the manual? Have you looked up the error given? Did you not consult the manual but try beyond some limit that you would have found in the manual, say 256?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Include only empty record

Postby xcspg3 » Wed Jul 11, 2012 4:36 pm

COMPARISON FIELD ERROR : INCLUDE COND=(1,2,CH,EQ,2C' ')
No errors : INCLUDE COND=(1,2,CH,EQ,C' ')

I think that I can't use nC' ' in include cond, in DFSORT guide I have not found info about this syntax.

max.
xcspg3
 
Posts: 29
Joined: Tue Sep 25, 2007 6:34 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Include only empty record

Postby BillyBoyo » Wed Jul 11, 2012 4:53 pm

I'm not thinking. Can you try (1,2,CH,EQ,C' ') and (1,256,CH,EQ,C' ')?

EDIT: Fell in my own "trap". Now changed 400 to 256.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Include only empty record

Postby xcspg3 » Wed Jul 11, 2012 4:56 pm

Yes, no results.
max
xcspg3
 
Posts: 29
Joined: Tue Sep 25, 2007 6:34 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Include only empty record

Postby BillyBoyo » Wed Jul 11, 2012 5:12 pm

Mmmm.... yes, the 1,2 is truncated to the length of the literal...

You are able to code a literal up to 256 characters... I'll have to think.

If nothing else, Kolusu will rescue us later :-) Around 5pm or later UK time.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Include only empty record

Postby skolusu » Wed Jul 11, 2012 9:30 pm

xcspg3,

You don't have to code 400 spaces. You can check with a single space. But the limit is 256 bytes , so you need to split the 400 bytes into chunks of 256 bytes and check. Use the following control cards

//SYSIN    DD *                                         
  INCLUDE COND=(1,256,CH,EQ,C' ',AND,257,144,CH,EQ,C' ')
  SORT FIELDS=COPY                                     
//*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: Include only empty record

Postby xcspg3 » Thu Jul 12, 2012 12:38 pm

Thanks a lot.

Max
xcspg3
 
Posts: 29
Joined: Tue Sep 25, 2007 6:34 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post