Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
ICETOOL . . . INCLUDE CONDITION PROBLEM . . .

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: ICETOOL . . . INCLUDE CONDITION PROBLEM . . .
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 Moderator


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

PostPosted: Tue Jan 08, 2008 10:27 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Wed Jan 09, 2008 3:57 am    Post subject:
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    Post subject:
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    Post subject:
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: 1439
Location: Bangalore,India

PostPosted: Wed Jan 09, 2008 12:40 pm    Post subject:
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    Post subject:
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    Post subject: Reply to: ICETOOL . . . INCLUDE CONDITION PROBLEM . . .
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 Moderator


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

PostPosted: Wed Jan 09, 2008 10:39 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts More than 1 Include criteria for sing... Roy Ware SYNCSORT 6 Wed Sep 13, 2017 11:45 pm
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us