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

Can we filter the columns of a record by sort card


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rsm_deepak

New User


Joined: 06 Apr 2005
Posts: 30
Location: visakhapatnam

PostPosted: Tue Feb 13, 2007 12:56 pm
Reply with quote

I need to do the following

1) The record having record length 500 and the key is 60-66 position of the record.
2) Take all the 60-66 position from the record, sort them
3) remove the duplicates(60-66).
4) write only 60-66 into the output file


This I need to do by sort only.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Tue Feb 13, 2007 1:02 pm
Reply with quote

Hi there,

You can use following sort statements:

Code:
//SYSIN DD *
  SORT FIELDS=(60,7,CH, A)
  SUM FIELDS=NONE
  OUTFIL OUTREC=(1:60,7)
/*
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Tue Feb 13, 2007 9:44 pm
Reply with quote

Actually, this DFSORT job would be more efficient since it sorts less data:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=... input file (FB/500)
//SORTOUT DD DSN=..  output file (FB/7)
//SYSIN    DD    *
  INREC FIELDS=(60,7)
  SORT FIELDS=(1,7)
  SUM FIELDS=NONE
/*


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

Use [URL] BBCode for External Links
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top