Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
ICETOOL filter records based on file1 variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
Author Message
sangiah

Active User


Joined: 10 Jun 2005
Posts: 62

PostPosted: Wed Jun 15, 2005 9:05 am    Post subject: ICETOOL filter records based on file1 variable
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
References
PostPosted: Wed Jun 15, 2005 9:05 am    Post subject: Re: ICETOOL filter records based on file1 variable Reply with quote

Alain Benveniste

Active User


Joined: 14 Feb 2005
Posts: 89

PostPosted: Wed Jun 15, 2005 6:34 pm    Post subject: Re: ICETOOL filter records based on file1 variable
Reply with quote

Sangiah,

You will find here what you are looking for:
http://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 Moderator


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

PostPosted: Wed Jun 15, 2005 8:58 pm    Post subject:
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

Active User


Joined: 14 Feb 2005
Posts: 89

PostPosted: Wed Jun 15, 2005 10:22 pm    Post subject:
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1