Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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
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    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

Alain Benveniste

New User


Joined: 14 Feb 2005
Posts: 88

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: 7130
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

New User


Joined: 14 Feb 2005
Posts: 88

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
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 JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us