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

ICETOOL Sorting and Discarding DUPS


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Harold Barnes

New User


Joined: 27 Oct 2015
Posts: 33
Location: United States

PostPosted: Sat Dec 14, 2019 5:55 am
Reply with quote

Simple A/N input
I want to sort and remove dups.

I get no output.

Please identify the errors of my ways.
Please be genitle. I'm an ICETOOL virgin.


S1 - ABEND=S000 U0016 REASON=00000000 017


Code:

//S1         EXEC PGM=ICETOOL
//DFSMSG    DD SYSOUT=*
//TOOLMSG  DD SYSOUT=*
//TOOLIN     DD *
//CTL1CNTL  DD *
//IN             DD DSN=&VARONLY
//OUT          DD DISP=(NEW,CATLG),
//                SPACE=(CYL,(5,5)),
//                DCB=(LRECL=80,RECFM=FB,BLKSIZE=8000),
//                DSN=&VARSUNIQ

 



Code:

CTL1CNTL :
SORT FIELDS=(1,10,CH,A)

PARMLIST :

OPTION RESINV=0,ARESINV=0,MSGDDN=DFSMSG,SORTIN=IN,SORTDD=CTL1,SORTOUT=OUT,DYNALL

OC,CMP=CLC,NOVLSHRT,EQUALS,VLSCMP
SORT FIELDS=(00001,0010,CH,A)
MODS E35=(SYNCT$35,4096,,N)
WER813I  INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED
WER428I  CALLER-PROVIDED IDENTIFIER IS "0001"
WER276B  SYSDIAG= 86225187, 98279851, 98279851, 30661780
WER164B  23,416K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B     0 BYTES RESERVE REQUESTED, 992K BYTES USED
WER146B  32K BYTES OF EMERGENCY SPACE ALLOCATED
WER189A  IN       DCB RECFM REQUIRED
WER108I  IN       : RECFM=     ; LRECL=      ; BLKSIZE=
WER073I  IN       : DSNAME=SYS19347.T183650.RA000<userid>.VARONLY.H08
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
SYT000I  SYNCTOOL RELEASE 2.1.8 - COPYRIGHT 2014  SYNCSORT INC.
SYT001I  INITIAL PROCESSING MODE IS "STOP"
SYT002I  "TOOLIN" INTERFACE BEING USED

         SELECT FROM(IN) TO(OUT) ON(1,10,CH) FIRST USING(CTL1)

SYT020I  SYNCSORT CALLED WITH IDENTIFIER "0001"
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Sat Dec 14, 2019 6:13 am
Reply with quote

Hi,

Is this all the error that you got. Were there more lines below?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sat Dec 14, 2019 8:55 am
Reply with quote

The line starting WER189A tells you what is wrong.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Sat Dec 14, 2019 9:21 am
Reply with quote

My guess is that you are missing symbolic assignments VARONLY="your input data set name" and VARSUNQ for the output data set name. Without that it assumed you're working with temporary data sets. Sounds more like a problem with the shown JCL as such and nothing much to do with ICETOOL.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2018
Location: USA

PostPosted: Mon Dec 16, 2019 7:01 pm
Reply with quote

Arun Raj wrote:
My guess is that you are missing symbolic assignments VARONLY="your input data set name" and VARSUNQ for the output data set name. Without that it assumed you're working with temporary data sets. Sounds more like a problem with the shown JCL as such and nothing much to do with ICETOOL.

Doesn't matter.

The statement
Code:
//IN             DD DSN=&VARONLY
would define a dataset with either regular DSN, or one with system-assigned temporary name. In any case, the default parameter is DISP=(NEW,DELETE), and - in case one has RTFM - no DCB parameter is defined for this non-existing dataset:
Code:
 WER189A  IN       DCB RECFM REQUIRED


P.S.
It's a shame to discuss such issues at the Experts Forum.
It is as obvious as 2 * 2 = 4
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Mon Dec 16, 2019 7:48 pm
Reply with quote

Use DISP=SHR.
I agree Sergeyken.
Back to top
View user's profile Send private message
Harold Barnes

New User


Joined: 27 Oct 2015
Posts: 33
Location: United States

PostPosted: Mon Dec 16, 2019 8:27 pm
Reply with quote

Yes, I am an idiot for assuming that the ICETOOL parms were the problem. The problem was a bit of fat-finger typing.

&VARONLY should have been &VARSONLY

&VARSONLY and &VARSUNIQ are defined with SET. (not temp files)

&VARONLY (typo) was processing as a temp file.

My failure to specify DISP= hid this error.

I'm so ashamed icon_redface.gif icon_redface.gif

Y'all are great. Thanks for being gentle.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Tue Dec 17, 2019 2:13 am
Reply with quote

Harold, It is totally fine as long as it is not always. icon_razz.gif
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Thu Dec 19, 2019 2:10 pm
Reply with quote

For a simple sort and remove dups, use a simple sort:
Code:
SORT FIELDS=(1,10,CH,A),EQUALS
SUM FIELDS=NONE

DFSORT Application Programming Guide wrote:
FIELDS=NONE eliminates records with duplicate keys. Only one record with each key is
kept and no summing is performed.

Use the EQUALS option to make sure that the first equal-keyed record is kept.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2018
Location: USA

PostPosted: Thu Dec 19, 2019 7:34 pm
Reply with quote

Marso wrote:
For a simple sort and remove dups, use a simple sort:
Code:
SORT FIELDS=(1,10,CH,A),EQUALS
SUM FIELDS=NONE

DFSORT Application Programming Guide wrote:
FIELDS=NONE eliminates records with duplicate keys. Only one record with each key is
kept and no summing is performed.

Use the EQUALS option to make sure that the first equal-keyed record is kept.

This is true in case we don't care about: which particular record of those with a duplicate key must go to the output? (Because other non-key fields may be different in every "duplicate" record).

If it is critical to choose a particular record, then it might be a more complex task (only a little bit).
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Thu Dec 19, 2019 8:50 pm
Reply with quote

Just for the sake of conversation:

DFSORT Application Programming Guide wrote:
When EQUALS is in effect with SUM, the first record of summed records is kept. When NOEQUALS is in effect with SUM, the record to be kept is unpredictable.

So this should be equivalent to Harold's initial command:
Code:

         SELECT FROM(IN) TO(OUT) ON(1,10,CH) FIRST USING(CTL1)

Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1245
Location: Bamberg, Germany

PostPosted: Fri Dec 20, 2019 12:22 am
Reply with quote

@Marso: For my understanding that's correct the way you described it.
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 -> SYNCSORT

 


Similar Topics
Topic Forum Replies
This topic is locked: you cannot edit posts or make replies. Automation need help in sorting the data DFSORT/ICETOOL 38
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
Search our Forums:

Back to Top