IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ICETOOL . . . INCLUDE CONDITION PROBLEM . . .


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
xiinus

New User


Joined: 12 Mar 2007
Posts: 13
Location: india

PostPosted: Tue Jan 08, 2008 12:34 pm
Reply with quote

AM USING THE FOLLOWING CODE TO SELECT FEW RECORDS ON THE GIVEN CONDITION:

Code:

//S1    EXEC  PGM=ICETOOL                       
//TOOLMSG DD SYSOUT=*                           
//DFSMSG  DD SYSOUT=*                           
//IN DD DSN=FILE1,DISP=SHR
//OUT DD DSN=FILE2,             
//            DISP=(,CATLG,CATLG),           
//            SPACE=(80,(50,10)),               
//            LIKE='FILEX'                             
//TOOLIN   DD *                                 
  INCLUDE COND= (53,3,C'A,B,C,D',AND,         
         43,8,LT,C'20070101',AND,               
         43,8,GT,C'20051231')                   
/*                                             


HOWEVER WHEN I RUN IT . . . . I GET AN ERROR ->

"STATEMENT DOES NOT BEGIN WITH A VALID OPERATOR"

UNDER THE INCLUDE PART . . . please HELP
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Jan 08, 2008 10:27 pm
Reply with quote

That error is issued because you have:

Code:

//TOOLIN   DD *                                 
  INCLUDE ...       
/*                 


instead of:

Code:

//TOOLIN   DD *                           
COPY FROM(IN) TO(OUT) USING(CTL1)         
/*
//CTL1CNTL DD *                           
  INCLUDE ...
/*


Beyond that, you also have syntax errors in the INCLUDE statement. The correct syntax would be:

Code:

  INCLUDE COND=(53,1,SS,EQ,C'A,B,C,D',AND,   
         43,8,CH,LT,C'20070101',AND,           
         43,8,CH,GT,C'20051231')               


However, it's not clear if that syntax will give you what you want since you haven't described what you want.

Please show an example of the records in your input file (relevant fields only) and the expected output records, and explain the "rules" for getting from input to output.
Back to top
View user's profile Send private message
Ganesh.Deokar

New User


Joined: 30 Sep 2005
Posts: 26
Location: Buffalo,NY

PostPosted: Wed Jan 09, 2008 2:52 am
Reply with quote

Frank,

Does the control statement differs for SORT than ICETOOL? My system has SORT, so I used SORT.

I tried your syntax for INCLUDE in SORT:

Code:
INCLUDE COND=(53,1,SS,EQ,C'A,B,C,D',AND,   
                          43,8,LT,C'20070101')           


But this gives me "INCLUDE/OMIT INVALID FORMAT:.

Then I changed the syntax to below and it works:
Code:
INCLUDE COND=(53,1,SS,EQ,C'A,B,C,D',AND,   
                          43,8,ZD,LT,20070101)     
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Jan 09, 2008 3:57 am
Reply with quote

Quote:
Does the control statement differs for SORT than ICETOOL?


No.

You're right that the format is missing and results in an error msg (I missed this somehow when I tested the syntax). For the original syntax, CH format should be used to match the character constant. I've fixed my original post. Thanks for pointing this out.

You're using ZD format and a decimal constant which will work too.
Back to top
View user's profile Send private message
xiinus

New User


Joined: 12 Mar 2007
Posts: 13
Location: india

PostPosted: Wed Jan 09, 2008 9:51 am
Reply with quote

Thank you guys . . . icon_smile.gif
Back to top
View user's profile Send private message
xiinus

New User


Joined: 12 Mar 2007
Posts: 13
Location: india

PostPosted: Wed Jan 09, 2008 12:20 pm
Reply with quote

I need to select records who are type A or B or C or D from a file, also the records should be originated between the dates 01/01/2007 and 31/12/2005 . . .
like

record orig.date type
------- ----------- ------
1 15/6/2006 A
2 12/7/2006 Z
3 13/8/2006 B

so it should fetch me the records 1 and 3 . . . icon_smile.gif
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Jan 09, 2008 12:40 pm
Reply with quote

xiinus,

Logically speaking all the reocrds fall in the given range.

Moreover you just can't compare dates with provided format.
Back to top
View user's profile Send private message
xiinus

New User


Joined: 12 Mar 2007
Posts: 13
Location: india

PostPosted: Wed Jan 09, 2008 3:38 pm
Reply with quote

murali i believe that one of the record type is Z . . . hence it isn't supposed to be selected . . .also the date format on the files is yyyymmdd . . . i wrote the dates that way for simple understanding . . .

If you can then please help . . .
Back to top
View user's profile Send private message
Ganesh.Deokar

New User


Joined: 30 Sep 2005
Posts: 26
Location: Buffalo,NY

PostPosted: Wed Jan 09, 2008 7:03 pm
Reply with quote

Try this:

Code:
INCLUDE COND=(53,1,SS,EQ,C'A,B,C,D',AND,   
         43,8,ZD,LT,20070101,AND,           
         43,8,ZD,GT,20051231)         
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Jan 09, 2008 10:39 pm
Reply with quote

Quote:
INCLUDE COND=(53,1,SS,EQ,C'A,B,C,D',AND,
43,8,ZD,LT,20070101,AND,
43,8,ZD,GT,20051231)


This would NOT include 20051231 and 20070101 dates which I assume from what the OP said should be included.

I would use this DFSORT INCLUDE control statement:

Code:

  INCLUDE COND=(53,1,SS,EQ,C'A,B,C,D',AND,   
         43,8,CH,GE,C'20051231',AND,         
         43,8,CH,LE,C'20070101')             


Quote:
i wrote the dates that way for simple understanding . . .


Writing the dates that way instead of the way they actually appear leads to misunderstanding.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts ICETOOL returns no records JCL & VSAM 1
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top