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
 

 

Sort a file with record length 4500

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

New User


Joined: 14 Sep 2005
Posts: 74
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

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
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: 14
Location: chennai

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: 7130
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
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm


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