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

ICETOOL filter records based on file1 variable


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

New User


Joined: 10 Jun 2005
Posts: 62

PostPosted: Wed Jun 15, 2005 9:05 am
Reply with quote

ICETOOL filter records based on file1 variable.

I have 2 files

File-1
2005121

file-2
0001 2005121 9999 8888 1111
0002 2005111 8888 9999 2222
0003 2005121 7777 1111 3333

The output file should be (omit recors where 6,7 = file-1 1,7)
0001 2005121 9999 8888 1111
0003 2005121 7777 1111 3333
Back to top
View user's profile Send private message
Alain Benveniste

New User


Joined: 14 Feb 2005
Posts: 88

PostPosted: Wed Jun 15, 2005 6:34 pm
Reply with quote

Sangiah,

You will find here what you are looking for:
www-1.ibm.com/servers/storage/support/software/sort/mvs/tricks/srtmst02.html#t05

Alain
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 Jun 15, 2005 8:58 pm
Reply with quote

Actually, in this case it's easier and more efficient to use a DFSORT job like this:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
2005121
/*
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN    DD    *
  OPTION COPY
* Create DFSORT symbol as follows:
* MYDATE,'yyyyddd'
  OUTREC FIELDS=(C'MYDATE,''',1,7,C'''',80:X)
/*
//S2    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD *
0001 2005121 9999 8888 1111
0002 2005111 8888 9999 2222
0003 2005121 7777 1111 3333
/*
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
* Use MYDATE symbol in INCLUDE statement.
  INCLUDE COND=(6,7,CH,EQ,MYDATE)
/*


Quote:
omit recors where 6,7 = file-1 1,7


Actually, your output shows that you're using include, not omit.
Back to top
View user's profile Send private message
Alain Benveniste

New User


Joined: 14 Feb 2005
Posts: 88

PostPosted: Wed Jun 15, 2005 10:22 pm
Reply with quote

Oh yes, I hadn't envisaged that file 1 could have only one record...
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top