display record count



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

display record count

Postby samurai007 » Mon Nov 16, 2009 10:16 am

Hi,

I have a DFSORT job which calculates the record count in a given PS file and writes the result to an output file.
Is there anyway i can display the record count on the ISPF window directly, rather than writing it to an output dataset ?

Thanks,
Dinesh S
samurai007
 
Posts: 22
Joined: Mon Jul 20, 2009 10:42 pm
Has thanked: 0 time
Been thanked: 0 time

Re: display record count

Postby skolusu » Mon Nov 16, 2009 11:58 pm

samurai007,

The following DFSORT JCL will give you the desired results. It takes care of both fb and vb recfm and sends you a message to the terminal. Code your user-id you want to notify in the user-id section in step0100

//STEP0100 EXEC PGM=SORT                                   
//SYSOUT   DD SYSOUT=*                                     
//SORTIN   DD DSN=Your input file,DISP=SHR
//SORTOUT  DD DSN=&&C1,DISP=(,PASS),SPACE=(TRK,(1,0),RLSE)
//SYSIN    DD *                                           
  SORT FIELDS=COPY                                         
  OUTFIL REMOVECC,NODETAIL,VTOF,BUILD=(80X),
  TRAILER1=(' SE ''',                                     
            'THE TOTAL NUMBER OF RECORDS IN FILE ARE  : ',
            COUNT,'''',' U(USER-ID)')                 
//*                                                       
//STEP0200 EXEC PGM=IKJEFT01                               
//SYSPRINT DD SYSOUT=*                                     
//SYSTSPRT DD SYSOUT=*                                     
//SYSTSIN  DD DSN=&&C1,DISP=SHR                           
//*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: display record count

Postby samurai007 » Tue Nov 17, 2009 7:29 pm

Hey skolusu..

It was perfect.. just wat i wanted.. thanks...

If you don mind, could you please explain TRAILER1 statement alone completely; word-by-word ??
Am quite lost there.

Thanks,
Sam.
samurai007
 
Posts: 22
Joined: Mon Jul 20, 2009 10:42 pm
Has thanked: 0 time
Been thanked: 0 time

Re: display record count

Postby skolusu » Wed Nov 18, 2009 4:29 am

The trailer1 staement is a creating the message that is needed to send the notification to your terminal.

Trailer1 is creating the following text

 SE 'THE TOTAL NUMBER OF RECORDS IN FILE ARE  : 


and add the COUNT which shows the count of data records as 8 digits with leading zeros suppressed. And finally
' U(USERID)   



Thus resulting in a single line like this

 SE 'THE TOTAL NUMBER OF RECORDS IN FILE ARE  :      341' U(userid)           


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/servers/storage/supp ... tmpub.html
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post