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
 
Sort a file with record length 4500

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

New User


Joined: 14 Sep 2005
Posts: 48
Location: Kentucky, USA

PostPosted: Wed Mar 26, 2008 11:47 pm    Post subject: Sort a file with record length 4500
Reply with quote

Hi,
I am trying to eliminate duplicate records from a file of Lrecl = 4500.
I am trying to use the following
Code:
SORT FIELDS=(1,4500,CH,A)
SUM FIELDS=NONE


Its giving me the following error
Code:
            SORT FIELDS=(1,4500,CH,A)                     
                                   $                     
ICE017A C CONTROL FIELD DISPLACEMENT OR LENGTH VALUE ERROR
            SUM FIELDS=NONE                               


I see it might be that the length specified is not acceptable. Is there anyway in which I can perform the sort on the whole file and eliminate the duplicate records.

Thanks,
Back to top
View user's profile Send private message
References
PostPosted: Wed Mar 26, 2008 11:47 pm    Post subject: Re: Sort a file with record length 4500 Reply with quote

Skolusu

DFSORT Developer


Joined: 07 Dec 2007
Posts: 223
Location: San Jose

PostPosted: Thu Mar 27, 2008 3:43 am    Post subject:
Reply with quote

Muffirulz,

The following DFSORT/ICETOOL jcl will give you the desired results.

Code:

//STEP0100 EXEC PGM=ICETOOL 
//TOOLMSG  DD SYSOUT=*       
//DFSMSG   DD SYSOUT=*       
//IN       DD DSN=Your 4500 lrecl dataset,
//            DISP=SHR
//T1       DD DSN=&&T1,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE)     
//T2       DD DSN=&&T2,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE)     
//KEEP     DD DSN=YOUR FINAL OUTPUT WITHOUT DUPS,
//            DISP=(MOD,CATLG,DELETE)
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)   
//TOOLIN   DD *
  SELECT FROM(IN) TO(T1) ALLDUPS DISCARD(KEEP) USING(CTL1)-
      ON(01,1500,CH) ON(1501,1500,CH) ON(3001,1000,CH)

  SPLICE FROM(T1) TO(T2) USING(CTL2) WITH(1,4500) WITHALL -
      ON(01,1500,CH) ON(1501,1500,CH) ON(3001,1000,CH)

  SELECT FROM(T2) TO(KEEP) FIRST USING(CTL3) -
      ON(4501,08,CH) ON(4001,500,CH)

//CTL1CNTL DD *
  INREC OVERLAY=(4501:8X)
  OUTFIL FNAMES=T1,REMOVECC,
  OVERLAY=(4501:SEQNUM,8,ZD),
  SECTIONS=(0001,256,SKIP=0L,
            0257,256,SKIP=0L,
            0513,256,SKIP=0L,
            0769,256,SKIP=0L,
            1025,256,SKIP=0L,
            1281,256,SKIP=0L,
            1537,256,SKIP=0L,
            1793,256,SKIP=0L,
            2049,256,SKIP=0L,
            2305,256,SKIP=0L,
            2561,256,SKIP=0L,
            2817,256,SKIP=0L,
            3073,256,SKIP=0L,
            3329,256,SKIP=0L,
            3585,256,SKIP=0L,
            3841,160,SKIP=0L,
  TRAILER3=(0001,256,
            0257,256,
            0513,256,
            0769,256,
            1025,256,
            1281,256,
            1537,256,
            1793,256,
            2049,256,
            2305,256,
            2561,256,
            2817,256,
            3073,256,
            3329,256,
            3585,256,
            3841,160,
            4501:4501,8))

  OUTFIL FNAMES=KEEP,OUTREC=(01,4500)
/*
//CTL2CNTL DD *
  SORT FIELDS=(0001,4000,CH,A,
               4501,0008,CH,D)
  INREC IFTHEN=(WHEN=(4501,8,CH,EQ,C' '),
       OVERLAY=(4501:SEQNUM,8,ZD)),
        IFTHEN=(WHEN=NONE,
       OVERLAY=(4501:8X))
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=KEEP,OUTREC=(01,4500)
/*


Hope this helps...

Cheers
Back to top
View user's profile Send private message
achittu

New User


Joined: 26 Feb 2007
Posts: 11
Location: hyderabad

PostPosted: Sun Mar 30, 2008 12:23 pm    Post subject: Reply to: Sort a file with record length 4500
Reply with quote

Try the following :

Code:

//STEP01   EXEC PGM=ICETOOL 
//TOOLMSG  DD SYSOUT=*       
//DFSMSG   DD SYSOUT=*       
//IN       DD DSN=Your 4500 lrecl dataset,DISP=SHR
//OUT      DD DSN=Your Output Dataset Name
//TOOLIN   DD *
  SELECT FROM(IN) TO(OUT) NODUPS ON(01,1500,CH) -
   ON(1501,1500,CH) ON(3001,1500,CH)
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Mon Mar 31, 2008 1:06 am    Post subject:
Reply with quote

Quote:
Try the following:

...


achittu,

If you had followed your own advice and tried that, you would have found out that it doesn't work. 4500 bytes is larger than the limit allowed for that kind of thing.
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