MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Printing total lines on a report

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
msdandy
Beginner


Joined: 12 Aug 2005
Posts: 5
Topics: 2

PostPosted: Fri Aug 12, 2005 11:01 pm    Post subject: Printing total lines on a report Reply with quote

HELP!!! I have tried every ICETOOL coding combination that I could think of. The manual is not really clear on how to print the total number detail lines in a report.

I need to print the total number of detail records preceded by comment in the report on the last line of the report using ICETOOL. The code that I am using is listed below:
Code:

//S0100    EXEC  PGM=ICETOOL,                                           
//             REGION=4096K                                             
//DFSMSG   DD  SYSOUT=A                                                 
//*                                                                     
//SRT1CNTL DD  *                                                       
 SORT FIELDS=(1,09,CH,A)                                               
/*                                                                     
//TOOLMSG  DD  SYSOUT=A                                                 
//*                                                                     
//TOOLIN   DD  *                                                       
    SORT FROM(ERRFILE) TO(RPTFILE) USING(SRT1)                         
    DISPLAY FROM(ERRFILE) LIST(RPTFILE) WIDTH(133)           -         
                                                                       
          DATE                                               -         
 
          TITLE('ELIGIBLE ITEMS OTHER THAN CORPORATE BONDS') -   
          PAGE                                               -   
          HEADER('DWR')                  ON(1,9,CH)          -   
          HEADER('CUSIP')                ON(11,9,CH)         -   
          HEADER('MOD-1')                ON(21,3,CH)         -   
          HEADER('MOD-2')                ON(25,3,CH)         -   
          HEADER('MOD-3')                ON(29,3,CH)         -   
          HEADER('MOD-4')                ON(33,3,CH)         -   
          HEADER('SHORT DESCRIPTION')    ON(37,30,CH)        -   
          HEADER('TR IND')               ON(68,1,CH)         -   
          HEADER('TR EFF DATE')          ON(70,8,ZD)         -   
          HEADER('NO ACCTS')             ON(79,11,ZD)        -   
          BLANK                                                   
          COUNT FROM(ERRFILE) USING(SRT2)                         
/*                                                               
//SRT2CNTL DD  *                                                 
 OUTFIL FNAMES=RPTFILE,TRAILER1=(30:'RECORDS WRITTEN:   ',COUNT) 
/*                                                               
//*                                                               
//ERRFILE  DD  DSN=NASDTRC.OUTFILE(+0),         
//             DISP=SHR                                           
//*                                                               
//RPTFILE  DD  DSN=NASDTRC.ICEFILE,             
//             DISP=(,CATLG,DELETE),                               
//             UNIT=SYSDA,                                         
//             SPACE=(CYL,(10,10),RLSE),                           
//             DCB=(LRECL=133,BLKSIZE=0,RECFM=FBA)                 
//*                                               

I would really, really appreciate your assistance. Thanks.
Back to top
View user's profile Send private message
Alain Benveniste
Beginner


Joined: 04 May 2003
Posts: 92
Topics: 4
Location: Paris, France

PostPosted: Sat Aug 13, 2005 6:29 am    Post subject: Reply with quote

A good thing for us to help you is that you post some input records and how you want them to look like in output.

Alain
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Sat Aug 13, 2005 10:24 am    Post subject: Reply with quote

DISPLAY does not have an option for writing a count.

COUNT writes the count to a message in TOOLMSG rather than to a data set.

You have the right idea using TRAILER1, but you need to do it with COPY rather than COUNT. Also you're trying to put all of the output to RPTFILE which won't work. You should put the SORT output to a temp file and use that as the input for DISPLAY. Then you should use MOD for RPTFILE so you can put the output of DISPLAY and COPY to it.

Here's a DFSORT/ICETOOL job that will do what I think you want.

Code:

//S0100    EXEC  PGM=ICETOOL
//TOOLMSG  DD  SYSOUT=*
//DFSMSG   DD  SYSOUT=*
//ERRFILE  DD  DSN=NASDTRC.OUTFILE(+0),
//             DISP=SHR
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//RPTFILE  DD  DSN=NASDTRC.ICEFILE,
//             DISP=(MOD,CATLG,DELETE),
//             UNIT=SYSDA,
//             SPACE=(CYL,(10,10),RLSE)
//TOOLIN   DD  *
    SORT FROM(ERRFILE) TO(T1) USING(SRT1)
    DISPLAY FROM(T1) LIST(RPTFILE) WIDTH(133)           -
          DATE                                               -
          TITLE('ELIGIBLE ITEMS OTHER THAN CORPORATE BONDS') -
          PAGE                                               -
          HEADER('DWR')                  ON(1,9,CH)          -
          HEADER('CUSIP')                ON(11,9,CH)         -
          HEADER('MOD-1')                ON(21,3,CH)         -
          HEADER('MOD-2')                ON(25,3,CH)         -
          HEADER('MOD-3')                ON(29,3,CH)         -
          HEADER('MOD-4')                ON(33,3,CH)         -
          HEADER('SHORT DESCRIPTION')    ON(37,30,CH)        -
          HEADER('TR IND')               ON(68,1,CH)         -
          HEADER('TR EFF DATE')          ON(70,8,ZD)         -
          HEADER('NO ACCTS')             ON(79,11,ZD)        -
          BLANK
    COPY FROM(ERRFILE) USING(SRT2)
/*
//SRT1CNTL DD  *
  SORT FIELDS=(1,09,CH,A)
/*
//SRT2CNTL DD  *
  OUTFIL FNAMES=RPTFILE,NODETAIL,
    OUTREC=(132X),
    TRAILER1=(30:'RECORDS WRITTEN:   ',COUNT)
/*
//*


Note that you could actually do this in one pass with DFSORT's OUTFIL reporting features, but that would take a bit more work to set up.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
msdandy
Beginner


Joined: 12 Aug 2005
Posts: 5
Topics: 2

PostPosted: Tue Aug 16, 2005 4:21 am    Post subject: ICETOOL HELP Reply with quote

Thanks, Frank. I'll try it today. I'll let you know if it works.
Back to top
View user's profile Send private message
msdandy
Beginner


Joined: 12 Aug 2005
Posts: 5
Topics: 2

PostPosted: Thu Aug 18, 2005 1:35 am    Post subject: ICETOOL Reply with quote

Thanks; it works perfectly!!! I am posting another question for you.
Back to top
View user's profile Send private message
stalin
Beginner


Joined: 22 Aug 2005
Posts: 23
Topics: 4

PostPosted: Mon Aug 22, 2005 5:02 am    Post subject: Reply with quote

Dear all can you please help me , how to count the total number of records in a dataset using jcl
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Mon Aug 22, 2005 5:54 am    Post subject: Reply with quote

stalin,


Please search before posting. check this link

http://www.mvsforums.com/helpboards/viewtopic.php?t=7&highlight=count

Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu Jul 31, 2008 12:45 pm    Post subject: Reply with quote

Quote:
DISPLAY does not have an option for writing a count.


It does now with z/OS DFSORT V1R5 PTF UK90013 (July, 2008). For example you could use DISPLAY with:

Code:

  COUNT('RECORDS WRITTEN:   ') EDCOUNT(U08)   


For complete details on all of the new DFSORT/ICETOOL functions available with PTF UK90013, see:

www.ibm.com/systems/support/storage/software/sort/mvs/ugpf/
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group