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 0 record count in synctool report

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


Joined: 07 Apr 2004
Posts: 46
Topics: 29

PostPosted: Thu Mar 15, 2007 3:27 am    Post subject: Printing 0 record count in synctool report Reply with quote

I used the following code to print the count of records from input file using SYNCTOOL (hope SYNCTOOL commands are similar to ICETOOL).

Code:

OCCUR FROM(T1) LIST(DOUT) -                 
NOHEADER -                                 
ON(01,15,CH) ON(VALCNT,E'999999999')       


OCCUR FROM(T2) LIST(DOUT) -             
NOHEADER -                               
ON(01,15,CH) ON(VALCNT,E'999999999')     

OCCUR FROM(T3) LIST(DOUT) -             
NOHEADER -                             
ON(01,15,CH) ON(VALCNT,E'999999999')   

Where T1, T2 and T3 are 3 different input data sets. If the input file streams. If the input files are correct, I am getting the following output:
Code:

---+----1----+----2----+----
CYCLED ACCOUNTS   000045275
OVERLT ACCOUNTS   000005380
DELINQ ACCOUNTS   000084169


Now the problem I am encountering is if any one of the input file report count is '0' , I am not getting that output which I was looking for!

Ex: If DELINQ ACCOUNTS total is 0000000 (say input file is empty); the output look like
Code:

CYCLED ACCOUNTS   000045275
OVERLT ACCOUNTS   000005380
DELINQ ACCOUNTS   000000000

Could anybody help me how to solve this
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: Thu Mar 15, 2007 5:21 am    Post subject: Reply with quote

kris_madras,

Assuming that you only have 3 possible accouts try this untested job. Also you don't have to run 3 times to get the desired results. You can simply concatenate all your input files to sortin provided all of the datasets are of same length.


Code:

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*   
//SORTIN   DD DSN=YOUR INPUT CYCLED FILE,
//            DISP=SHR
//         DD DSN=YOUR INPUT DELINQ FILE,
//            DISP=SHR
//         DD DSN=YOUR INPUT OVERLT FILE,
//            DISP=SHR
//SORTOUT  DD SYSOUT=*   
//SYSIN    DD *         
 SORT FIELDS=(1,15,CH,A)
                                     
 OUTREC IFTHEN=(WHEN=INIT,                                   
         BUILD=(01,15,3C'0',80:X)),                         
        IFTHEN=(WHEN=(01,15,CH,EQ,C'CYCLED ACCOUNTS'),       
       OVERLAY=(16:C'1')),                                   
        IFTHEN=(WHEN=(01,15,CH,EQ,C'DELINQ ACCOUNTS'),       
       OVERLAY=(17:C'1')),                                   
        IFTHEN=(WHEN=(01,15,CH,EQ,C'OVERLT ACCOUNTS'),       
       OVERLAY=(18:C'1'))                                   

 OUTFIL REMOVECC,NODETAIL,                                   
 TRAILER1=(C'CYCLED ACCOUNTS ',TOT=(16,1,ZD,M11,LENGTH=9),/,
           C'DELINQ ACCOUNTS ',TOT=(17,1,ZD,M11,LENGTH=9),/,
           C'OVERLT ACCOUNTS ',TOT=(18,1,ZD,M11,LENGTH=9))   
/*


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
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