Discussion:
Icetool question
(too old to reply)
Neal Eckhardt
2008-01-29 21:24:14 UTC
Permalink
A user has asked if ICETOOL can compare two datasets and provide the
records that exist in file 2 that are not in file 1.

SO, if file1 is

1
2
3
4
5

and file2 is

1
2
3
4
6

the resulting file would contain

6

I don't think it can, but I thought I'd ask anyway.

Thanks,
Neal
h***@cusys.edu
2008-01-29 21:31:18 UTC
Permalink
Frank Yaeger just answered that for me:

There are several ways to do this with DFSORT/ICETOOL. If you just
want a list of the duplicate SSNs, the easiest way is to use an OCCURS
job something like this:

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
222222222
111111111
111111111
111111111
333333333
444444444
333333333
111111111
/*
//OUT DD SYSOUT=*
//TOOLIN DD *
OCCURS FROM(IN) LIST(OUT) HEADER('SSN') ON(1,9,CH) ALLDUPS
/*

OUT would have:

SSN
--------------------
111111111
333333333

If you want something else, show me an example of the input records
and what you want for output.

Frank Yaeger
Frank Yaeger
2008-01-29 23:38:58 UTC
Permalink
Howard Brazee wrote on 01/29/2008 01:31:18 PM:
> Frank Yaeger just answered that for me:
>
> There are several ways to do this with DFSORT/ICETOOL. If you just
> want a list of the duplicate SSNs, the easiest way is to use an OCCURS
> job something like this:
>
> //S1 EXEC PGM=ICETOOL
> //TOOLMSG DD SYSOUT=*
> //DFSMSG DD SYSOUT=*
> //IN DD *
> 222222222
> 111111111
> 111111111
> 111111111
> 333333333
> 444444444
> 333333333
> 111111111
> /*
> //OUT DD SYSOUT=*
> //TOOLIN DD *
> OCCURS FROM(IN) LIST(OUT) HEADER('SSN') ON(1,9,CH) ALLDUPS
> /*
>
> OUT would have:
>
> SSN
> --------------------
> 111111111
> 333333333

Howard,

To avoid confusion, that job I sent you was for this question you asked:

>Do you have some JCL that lists duplicate records?
>For instance, if columns 1-9 of an 80 character record have a SSN,
>I want a list of duplicate SSNs only.

That's different than Neal's situation. I just posted the correct job for
Neal's situation.

Frank Yaeger - DFSORT Development Team (IBM) - ***@us.ibm.com
Specialties: PARSE, JFY, SQZ, ICETOOL, IFTHEN, OVERLAY, Symbols, Migration

=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
Frank Yaeger
2008-01-29 23:24:32 UTC
Permalink
Neal Eckhardt wrote on ibm-main:
>A user has asked if ICETOOL can compare two datasets and provide the
>records that exist in file 2 that are not in file 1.
>
>SO, if file1 is
>
>1
>2
>3
>4
>5
>
>and file2 is
>
>1
>2
>3
>4
>6
>
>the resulting file would contain
>
>6
>
>I don't think it can, but I thought I'd ask anyway.

Sure it can. Here's a DFSORT/ICETOOL job that will do what you asked for.
I assumed your input files have RECFM=FB and LRECL=80, but the job can
be changed appropriately for other attributes.

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... input file1 (FB/80)
//IN2 DD DSN=... input file2 (FB/80)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=... output file (FB/80)
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SELECT FROM(T1) TO(OUT) ON(1,1,CH) NODUPS USING(CTL3)
/*
//CTL1CNTL DD *
INREC OVERLAY=(81:C'1')
/*
//CTL2CNTL DD *
INREC OVERLAY=(81:C'2')
/*
//CTL3CNTL DD *
OUTFIL FNAMES=OUT,INCLUDE=(81,1,CH,EQ,C'2'),
BUILD=(1,80)
/*

For complete information on all of the things you can do with DFSORT's
ICETOOL, see:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/6.0?DT=20060615185603


Frank Yaeger - DFSORT Development Team (IBM) - ***@us.ibm.com
Specialties: PARSE, JFY, SQZ, ICETOOL, IFTHEN, OVERLAY, Symbols, Migration

=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
Neal Eckhardt
2008-01-30 14:30:11 UTC
Permalink
On 29 Jan 2008 15:24:32 -0800, ***@US.IBM.COM (Frank Yaeger) wrote:

>Neal Eckhardt wrote on ibm-main:
>>A user has asked if ICETOOL can compare two datasets and provide the
>>records that exist in file 2 that are not in file 1.
>>
>>SO, if file1 is
>>
>>1
>>2
>>3
>>4
>>5
>>
>>and file2 is
>>
>>1
>>2
>>3
>>4
>>6
>>
>>the resulting file would contain
>>
>>6
>>
>>I don't think it can, but I thought I'd ask anyway.
>
>Sure it can. Here's a DFSORT/ICETOOL job that will do what you asked for.
>I assumed your input files have RECFM=FB and LRECL=80, but the job can
>be changed appropriately for other attributes.
>
>//S1 EXEC PGM=ICETOOL
>//TOOLMSG DD SYSOUT=*
>//DFSMSG DD SYSOUT=*
>//IN1 DD DSN=... input file1 (FB/80)
>//IN2 DD DSN=... input file2 (FB/80)
>//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
>//OUT DD DSN=... output file (FB/80)
>//TOOLIN DD *
>COPY FROM(IN1) TO(T1) USING(CTL1)
>COPY FROM(IN2) TO(T1) USING(CTL2)
>SELECT FROM(T1) TO(OUT) ON(1,1,CH) NODUPS USING(CTL3)
>/*
>//CTL1CNTL DD *
> INREC OVERLAY=(81:C'1')
>/*
>//CTL2CNTL DD *
> INREC OVERLAY=(81:C'2')
>/*
>//CTL3CNTL DD *
> OUTFIL FNAMES=OUT,INCLUDE=(81,1,CH,EQ,C'2'),
> BUILD=(1,80)
>/*

Sweet. So short and elegant. It does exactly what we need.

Thanks again, you always come through.

Neal
h***@cusys.edu
2008-01-30 15:16:56 UTC
Permalink
Looking at this code, it appears that the variable that I need to know
is in:


SELECT FROM(T1) TO(OUT) ON(1,1,CH) NODUPS USING(CTL3)

This compares only column 1? So if I want to compare a whole record
(columns 1-80) I would change it to:

SELECT FROM(T1) TO(OUT) ON(1,80,CH) NODUPS USING(CTL3)



I like to save off useful looking code in my own library - with
annotation.
tony babonas
2008-01-30 15:29:15 UTC
Permalink
or set up a symbol:

symnames dd *
thewholedarnrecord,1,80,ch
/*


then the control statement would be:

SELECT FROM(T1) TO(OUT) ON(thewholedarnrecord) NODUPS USING(CTL3)




-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@BAMA.UA.EDU] On Behalf
Of Howard Brazee
Sent: Wednesday, January 30, 2008 9:17 AM
To: IBM-***@BAMA.UA.EDU
Subject: Re: Icetool question

Looking at this code, it appears that the variable that I need to know
is in:


SELECT FROM(T1) TO(OUT) ON(1,1,CH) NODUPS USING(CTL3)

This compares only column 1? So if I want to compare a whole record
(columns 1-80) I would change it to:

SELECT FROM(T1) TO(OUT) ON(1,80,CH) NODUPS USING(CTL3)



I like to save off useful looking code in my own library - with
annotation.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.15/1249 - Release Date: 1/29/2008
9:51 AM


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.15/1249 - Release Date: 1/29/2008
9:51 AM


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
Frank Yaeger
2008-01-30 15:50:30 UTC
Permalink
Howard Brazee wrote on 01/30/2008 07:16:56 AM:
> Looking at this code, it appears that the variable that I need to know
> is in:
>
> SELECT FROM(T1) TO(OUT) ON(1,1,CH) NODUPS USING(CTL3)
>
> This compares only column 1? So if I want to compare a whole record
> (columns 1-80) I would change it to:
>
> SELECT FROM(T1) TO(OUT) ON(1,80,CH) NODUPS USING(CTL3)
>
> I like to save off useful looking code in my own library - with
> annotation.

Yes, that's right. ON(p,m,f) specifies the starting position (p), length
(m)
and format (f) of the field you want to SELECT (compare) on. You can use
multiple ON fields if you want to SELECT on more than one field.

For complete details on the SELECT operator of DFSORT's ICETOOL as well as
examples, see:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/6.11?DT=20060615185603

Frank Yaeger - DFSORT Development Team (IBM) - ***@us.ibm.com
Specialties: PARSE, JFY, SQZ, ICETOOL, IFTHEN, OVERLAY, Symbols, Migration

=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
Elardus Engelbrecht
2008-01-30 14:50:15 UTC
Permalink
Don Leahy wrote:

>On Jan 30, 2008 4:18 AM, Thomas Berg <***@swedbank.se> wrote:
>> Frank "Sure it can" Yaeger
>>
>Yeah, if you use the words "can't" and "DFSORT" in the same sentence,
>Frank can usually straighten you out. :-)

Actually, Frank "Sure it can" Yaeger can SORT you out! ;-D

He can also SPLICE you, JOIN/MERGE your parts while OMITting some parts
and then DISPLAY you for all with ICETOOL after SUMming you up ... ;-D

Groete / Greetings
Elardus Engelbrecht

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
tony babonas
2008-01-30 15:04:52 UTC
Permalink
From personal experience I can state that ICETOOL is cool. :-)



-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@BAMA.UA.EDU] On Behalf
Of Elardus Engelbrecht
Sent: Wednesday, January 30, 2008 8:50 AM
To: IBM-***@BAMA.UA.EDU
Subject: Re: Icetool question

Don Leahy wrote:

>On Jan 30, 2008 4:18 AM, Thomas Berg <***@swedbank.se> wrote:
>> Frank "Sure it can" Yaeger
>>
>Yeah, if you use the words "can't" and "DFSORT" in the same sentence,
>Frank can usually straighten you out. :-)

Actually, Frank "Sure it can" Yaeger can SORT you out! ;-D

He can also SPLICE you, JOIN/MERGE your parts while OMITting some parts
and then DISPLAY you for all with ICETOOL after SUMming you up ... ;-D

Groete / Greetings
Elardus Engelbrecht

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.15/1249 - Release Date: 1/29/2008
9:51 AM


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.15/1249 - Release Date: 1/29/2008
9:51 AM


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
ITURIEL DO NASCIMENTO NETO
2008-01-30 17:06:35 UTC
Permalink
DFSORT should provide an USERMOD creating an ALIAS called ICECOOL....

Atenciosamente / Regards / Saludos

Ituriel do Nascimento Neto
Banco Bradesco S/A
4254/DPCD Alphaville
Engenharia de Software - Sistemas Operacionais Mainframes

Tel: 55 11 4197-2021 Fax: 55 11 4197-2814



|-----Mensagem original-----
|De: IBM Mainframe Discussion List
|[mailto:IBM-***@BAMA.UA.EDU] Em nome de tony babonas
|Enviada em: quarta-feira, 30 de janeiro de 2008 13:05
|Para: IBM-***@BAMA.UA.EDU
|Assunto: Re: Icetool question
|
|From personal experience I can state that ICETOOL is cool. :-)
|
|

<HTML><font face="Tahoma" size="1"><HR>AVISO LEGAL <br>Esta mensagem é destinada exclusivamente para a(s) pessoa(s) a quem é dirigida, podendo conter informação confidencial e/ou legalmente privilegiada. Se você não for destinatário desta mensagem, desde já fica notificado de abster-se a divulgar, copiar, distribuir, examinar ou, de qualquer forma, utilizar a informação contida nesta mensagem, por ser ilegal. Caso você tenha recebido esta mensagem por engano, pedimos que nos retorne este E-Mail, promovendo, desde logo, a eliminação do seu conteúdo em sua base de dados, registros ou sistema de controle. Fica desprovida de eficácia e validade a mensagem que contiver vínculos obrigacionais, expedida por quem não detenha poderes de representação.


<HTML><font face="Tahoma" size="1"><HR>LEGAL ADVICE <br>This message is exclusively destined for the people to whom it is directed, and it can bear private and/or legally exceptional information. If you are not addressee of this message, since now you are advised to not release, copy, distribute, check or, otherwise, use the information contained in this message, because it is illegal. If you received this message by mistake, we ask you to return this email, making possible, as soon as possible, the elimination of its contents of your database, registrations or controls system. The message that bears any mandatory links, issued by someone who has no representation powers, shall be null or void.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
Chase, John
2008-01-30 17:57:52 UTC
Permalink
> -----Original Message-----
> From: IBM Mainframe Discussion List On Behalf Of ITURIEL DO NASCIMENTO
NETO
>
> DFSORT should provide an USERMOD creating an ALIAS called ICECOOL....

Indeed, in some ways it's approaching DWIM. Just needs "a little more
coding".... :-)

-jc-

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
Rick Fochtman
2008-01-30 20:48:29 UTC
Permalink
--------------------<snip>---------------------

>Indeed, in some ways it's approaching DWIM. Just needs "a little more
>coding".... :-)
>
>
--------------------<unsnip>--------------------
How about "DEBE" (Does Everything But Eat, for the "newbies") ?? <Big G>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
Frank Yaeger
2008-01-30 15:44:39 UTC
Permalink
Elardus Engelbrecht wrote on 01/30/2008 06:49:53 AM:
> Don Leahy wrote:
>
> >On Jan 30, 2008 4:18 AM, Thomas Berg <***@swedbank.se> wrote:
> >> Frank "Sure it can" Yaeger
> >>
> >Yeah, if you use the words "can't" and "DFSORT" in the same sentence,
> >Frank can usually straighten you out. :-)
>
> Actually, Frank "Sure it can" Yaeger can SORT you out! ;-D
>
> He can also SPLICE you, JOIN/MERGE your parts while OMITting some parts
> and then DISPLAY you for all with ICETOOL after SUMming you up ... ;-D

It OCCURS to me that several people on the list have SELECTed me for
some kind words. I've PARSEd them and I appreciate it! I hope they're
JUSTIFIED, but we probably shouldn't SQUEEZE any more mileage out of
this since it's not even Friday. :-)

Thanks.

Frank Yaeger - DFSORT Development Team (IBM) - ***@us.ibm.com
Specialties: PARSE, JFY, SQZ, ICETOOL, IFTHEN, OVERLAY, Symbols, Migration

=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
h***@cusys.edu
2008-01-30 16:22:45 UTC
Permalink
On 30 Jan 2008 07:44:39 -0800, ***@US.IBM.COM (Frank Yaeger) wrote:

>It OCCURS to me that several people on the list have SELECTed me for
>some kind words. I've PARSEd them and I appreciate it! I hope they're
>JUSTIFIED, but we probably shouldn't SQUEEZE any more mileage out of
>this since it's not even Friday. :-)

You have a way with words.
Continue reading on narkive:
Search results for 'Icetool question' (Questions and Answers)
5
replies
i got general snus at my qt?
started 2013-05-09 15:46:46 UTC
beer, wine & spirits
Loading...