Sort utility



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Sort utility

Postby jash » Tue Oct 06, 2009 11:16 am

Hello friends
1. I have a file containing records of length 80.i want to retrieve some characters let us take from 25 column to 29 th column .can i sort utility if yes how or any other utilities are there.
2.Which sort is efficient internal sort or external sort.how ?
jash
 
Posts: 12
Joined: Sun Oct 04, 2009 12:05 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Sort utility

Postby Anuj Dhawan » Tue Oct 06, 2009 12:02 pm

1. If I understood correctly, yes you can use SORT product. To name any other utility, for one, FileAid can be your choice .

Suggest you show us a rather practical example of input records, expected output and the rules to get the output. Please tell us the LRECL and RECFM of the input/output files.

Which sort product do you use? If you're not sure to determine if you're using DFSORT (from IBM) or Syncsort (from Syncsort, Inc), run the PGM=ICEMAN JOB, actually any PGM=SORT or PGM=ICEMAN JOB. Look at the SYSOUT output. If it has ICExxxs messages, you're using DFSORT. If it has WERxxxs messages, you're using Syncsort.
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*    <--- look at messages
//SORTIN DD *
//SORTOUT DD DUMMY
//SYSIN DD *
  SORT FIELDS=COPY
/* 


2. Answer is... it depends. In "back-end" sort product at your shop will be invoked anyways.
Anuj
Anuj Dhawan
 
Posts: 273
Joined: Mon Feb 25, 2008 3:53 am
Location: Mumbai, India
Has thanked: 6 times
Been thanked: 4 times

Re: Sort utility

Postby Frank Yaeger » Tue Oct 06, 2009 8:43 pm

1. I have a file containing records of length 80.i want to retrieve some characters let us take from 25 column to 29 th column .can i <use> sort utility if yes how or any other utilities are there.


If you just want columns 25-29 in the output data set, you can use these DFSORT control statements:

   OPTION COPY
   INREC BUILD=(25,5)


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:

http://www.ibm.com/support/docview.wss? ... g3T7000080

2.Which sort is efficient internal sort or external sort.how ?


The following discussion in "z/OS DFSORT Tuning Guide" might help explain the concepts involved:

http://publibz.boulder.ibm.com/cgi-bin/ ... 0528173317
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post