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
 

 

Problem in Writing the Total Count!

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

New User


Joined: 10 Dec 2008
Posts: 60
Location: Chennai

PostPosted: Tue Sep 22, 2009 4:47 pm    Post subject: Problem in Writing the Total Count!
Reply with quote

Hi all,

First 5 lines of my Input is Some Junk Data. The remaining sample input is,

Code:


Part -- 1
aaa      yyyyyyyy   23

Part -- 2   
aaa      yyyyyyyy   04
bbb      xxxxxxxx   97

part -- 3   
aaa       yyyyyyyy   20
ccc      dddddddd   02   



My output should look like,


Code:


TOTAL NUMBER OF EXCEPTIONS FOR yyyyyyyy : 47
TOTAL NUMBER OF EXCEPTIONS FOR xxxxxxxx : 97
TOTAL NUMBER OF EXCEPTIONS FOR dddddddd :  2
----------------------------------------------
TOTAL EXCEPTIONS               : 146   

      << END OF REPORT >>



LRECL = 160 and Record Format = FB

This is the Sort step im trying,

Code:


OPTION ZDPRINT,SKIPREC=5                                             
  INCLUDE COND=(53,7,CH,NE,C'       ')                               
  SORT FIELDS=(53,47,CH,A)                                           
  OUTFIL REMOVECC,NODETAIL,                                           
    SECTIONS=(53,47,                                                 
     TRAILER3=(C'TOTAL EXCEPTIONS FOR ',53,47,' : ',                 
               TOT=(124,8,UFF,M10,LENGTH=8))),                       
     TRAILER3=(2:'------------------------------------------------',/,
               2:'TOTAL NUMBER OF EXCEPTIONS : ',                     
               30:TOT=(124,8,UFF,M10,LENGTH=8)),                     
     TRAILER1=(60:C' <<<< END OF REPORT >>>> ')                       



let me know where i'm going wrong!!!
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: Tue Sep 22, 2009 9:27 pm    Post subject:
Reply with quote

These DFSORT control statements will work. You can adjust them as needed to get the output in the layout you want:

Code:

  OPTION ZDPRINT,SKIPREC=5
  INCLUDE COND=(53,7,CH,NE,C'       ')
  SORT FIELDS=(53,47,CH,A)
  OUTFIL REMOVECC,NODETAIL,
    SECTIONS=(53,47,
     TRAILER3=(C'TOTAL EXCEPTIONS FOR ',53,47,' : ',
               TOT=(124,8,UFF,M10,LENGTH=8))),
     TRAILER1=(2:'------------------------------------------------',/,
               2:'TOTAL EXCEPTIONS : ',
               30:TOT=(124,8,UFF,M10,LENGTH=8),2/,
               60:C' <<<< END OF REPORT >>>> ')
Back to top
View user's profile Send private message
Vigneshwaran S
Warnings : 1

New User


Joined: 10 Dec 2008
Posts: 60
Location: Chennai

PostPosted: Wed Sep 23, 2009 1:35 pm    Post subject:
Reply with quote

Hi Frank,

Thanks!!!

Below step is giving syntax error,

Code:


TRAILER1=(2:'------------------------------------------------',/,
               2:'TOTAL EXCEPTIONS : ',
               30:TOT=(124,8,UFF,M10,LENGTH=8),2/,
               60:C' <<<< END OF REPORT >>>> ')


So i have changed the step ,

Code:


TRAILER1=(2/,                                 
          1:'TOTAL EXCEPTIONS : ',           
          21:TOT=(124,8,UFF,M10,LENGTH=8),2/,
          60:C' <<<< END OF REPORT >>>> ')   
                                             


This is the error msg,

Code:


                                                                               
            OPTION ZDPRINT,SKIPREC=5                                           
              INCLUDE COND=(53,7,CH,NE,C'       ')                             
              SORT FIELDS=(53,47,CH,A)                                         
              OUTFIL REMOVECC,NODETAIL,                                         
                SECTIONS=(53,47,                                               
                 TRAILER3=(C'TOTAL EXCEPTIONS FOR ',53,47,' : ',               
                           TOT=(124,8,UFF,M10,LENGTH=8))),                     
                 TRAILER1=(2:'------------------------------------------------',
                           2:'TOTAL EXCEPTIONS : ',                             
                         $                                                     
ICE007A 6 SYNTAX ERROR                                                         
                           30:TOT=(124,8,UFF,M10,LENGTH=8),2/,                 
                           $                                                   
ICE007A 0 SYNTAX ERROR                                                         
                           60:C' <<<< END OF REPORT >>>> ')                     
                           $                                                   
ICE007A 0 SYNTAX ERROR                                                         



Correct me if im wrong.
After changing the step i have got the desired result.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Wed Sep 23, 2009 3:05 pm    Post subject:
Reply with quote

Hi,

I'm confused, is it working or not with Frank's code ?


Gerry
Back to top
View user's profile Send private message
Vigneshwaran S
Warnings : 1

New User


Joined: 10 Dec 2008
Posts: 60
Location: Chennai

PostPosted: Wed Sep 23, 2009 3:16 pm    Post subject:
Reply with quote

Hi,

Frank code and My first Post was giving syntax errors.
Syntax error was due to this line,

Code:


TRAILER1=(2:'------------------------------------------------',/,



I guess '-----' is not allowed in TRAILER1. Please correct me if im wrong.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Wed Sep 23, 2009 3:23 pm    Post subject:
Reply with quote

Hi,

from the error output
Code:
TRAILER1=(2:'------------------------------------------------',
you are missing a /, from the end of the code

Franks code works perfectly for me.

Gerry
Back to top
View user's profile Send private message
Vigneshwaran S
Warnings : 1

New User


Joined: 10 Dec 2008
Posts: 60
Location: Chennai

PostPosted: Wed Sep 23, 2009 3:28 pm    Post subject:
Reply with quote

Hi,

Please check my Log i feel like i have not missed anything,

Code:


                                                                               
          OPTION ZDPRINT,SKIPREC=5                                             
            INCLUDE COND=(53,7,CH,NE,C'       ')                               
            SORT FIELDS=(53,47,CH,A)                                           
            OUTFIL REMOVECC,NODETAIL,                                           
              SECTIONS=(53,47,                                                 
               TRAILER3=(C'TOTAL EXCEPTIONS FOR ',53,47,' : ',                 
                         TOT=(124,8,UFF,M10,LENGTH=8))),                       
               TRAILER1=(2:'------------------------------------------------',/,
                         2:'TOTAL EXCEPTIONS : ',                               
                       $                                                       
E007A 6 SYNTAX ERROR                                                           
                         30:TOT=(124,8,UFF,M10,LENGTH=8),2/,                   
                         $                                                     
E007A 0 SYNTAX ERROR                                                           
                         60:C' <<<< END OF REPORT >>>> ')                       
                         $                                                     
E007A 0 SYNTAX ERROR                                                           

Back to top
View user's profile Send private message
Vigneshwaran S
Warnings : 1

New User


Joined: 10 Dec 2008
Posts: 60
Location: Chennai

PostPosted: Wed Sep 23, 2009 3:32 pm    Post subject:
Reply with quote

Hi,

Is there is any limitation for '---------' this line in TRAILER1 COMMAND??
Back to top
View user's profile Send private message
Vigneshwaran S
Warnings : 1

New User


Joined: 10 Dec 2008
Posts: 60
Location: Chennai

PostPosted: Wed Sep 23, 2009 3:45 pm    Post subject:
Reply with quote

Hi all,

Frank code is working fine. I have reduced length of '----' this line and it worked fine.

Code:


OPTION ZDPRINT,SKIPREC=5                             
  INCLUDE COND=(53,7,CH,NE,C'       ')               
  SORT FIELDS=(53,47,CH,A)                           
  OUTFIL REMOVECC,NODETAIL,                         
    SECTIONS=(53,47,                                 
     TRAILER3=(C'TOTAL EXCEPTIONS FOR ',53,47,' : ',
               TOT=(124,8,UFF,M10,LENGTH=8))),       
     TRAILER1=(1:'----------------------------',/,   
               1:'TOTAL EXCEPTIONS : ',             
               21:TOT=(124,8,UFF,M10,LENGTH=8),/,   
               1:'----------------------------',2/, 
               60:C' <<<< END OF REPORT >>>> ')     
                                                     
Back to top
View user's profile Send private message
Vigneshwaran S
Warnings : 1

New User


Joined: 10 Dec 2008
Posts: 60
Location: Chennai

PostPosted: Wed Sep 23, 2009 3:47 pm    Post subject:
Reply with quote

Hi,

Sorry for all the confusion.

Just curious to know, Why the same step was giving Syntax error before??
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: Wed Sep 23, 2009 8:41 pm    Post subject:
Reply with quote

Vicky,

The job I gave you works fine providing you do not go past column 71. If you do go past column 71 then it's interpreted as a continuation line which I'm guessing is what caused your error. But I don't know for sure since I don't know where each line starts in your job.

To avoid problems, instead of using all of those - characters, you can use n'-' for the number you want. For example, instead of:

Code:

 TRAILER1=(2:'------------------------------------------------',/,


you can use:

Code:

 TRAILER1=(2:48'-',/, 
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 Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts Display FTP Session Count within TSO Yolanda Harvey TSO/ISPF 3 Fri Mar 10, 2017 10:31 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm


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