Doubt on report



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Doubt on report

Postby shailaja85 » Thu Feb 16, 2012 8:26 pm

Can you please help some one?

Input File

----+----1
AAAAA
AAAAA
BBBBB
BBBBB
BBBBB
BBBBB
BBBBB
CCCCC
DDDDD
DDDDD
DDDDD
EEEEE
EEEEE
EEEEE
EEEEE

Expected Out Put

There are 15 lines (02 AAAAA, 05 BBBBB, 01 CCCCC, 03 DDDDD, 04 EEEEE) on Wednesday 02/15/2012.


Lay out of Input File-1
1-5 bytes Field-A


I need output as total number Field-A and each Field-A how many times it is occurred? And at end of the line it has to give yesterdays date (indicates this report for yesterday)


If it is not possible to generate the report in the above manner, please provide any report format which will gives all the above information (Total number of Field-A and individual Field-A numbers )
shailaja85
 
Posts: 20
Joined: Fri Feb 10, 2012 5:52 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Doubt on report

Postby shailaja85 » Fri Feb 17, 2012 1:16 pm

I am OK, if the above requirements have more than 1 step also.
shailaja85
 
Posts: 20
Joined: Fri Feb 10, 2012 5:52 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Doubt on report

Postby enrico-sorichetti » Fri Feb 17, 2012 1:48 pm

try something along the lines of

 000004 //ICE     EXEC PGM=SORT                                                 
 000005 //SYSPRINT  DD SYSOUT=*                                                 
 000006 //SYSOUT    DD SYSOUT=*                                                 
 000007 //DFSMSG    DD SYSOUT=*                                                 
 000008 //SORTIN    DD *                                                       
 000009 AAAAA                                                                   
 000010 BBBBB                                                                   
 000011 BBBBB                                                                   
 000012 BBBBB                                                                   
 000013 CCCCC                                                                   
 000014 CCCCC                                                                   
 000015 CCCCC                                                                   
 000016 CCCCC                                                                   
 000017 //SORTOUT   DD SYSOUT=*,DCB=(RECFM=FB,LRECL=80)                         
 000018 //SYSIN     DD *                                                       
 000019   OPTION EQUALS                                                         
 000020   SORT   FIELDS=(1,5,CH,A)                                             
 000021   OUTFIL REMOVECC,NODETAIL,                                             
 000022          SECTIONS=(1,5,                                                 
 000023                   TRAILER3=(1,5,11:COUNT=(M10,LENGTH=5))),             
 000024          TRAILER1=('ALL  ',11:COUNT=(M10,LENGTH=5))                     


to get ...

********************************* TOP OF DATA **********************************
AAAAA         1                                                                 
BBBBB         3                                                                 
CCCCC         4                                                                 
ALL           8                                                                 
******************************** BOTTOM OF DATA ********************************


to get the info in one line You must set some limit on the number of <keys> to be counted

(*) tested wit DFSORT, from having seen it lurking on the forum SYNCSORT should behave in the same way
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3003
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Doubt on report

Postby shailaja85 » Fri Feb 17, 2012 10:30 pm

Hi Enrico
Thanks for code and perfectly is working, the format which you have given is good,
IT WOULD BE GREATE if report contains yesterdays date and day. As well.
Like below

AAAAA         1                                                           
BBBBB         3                                                           
CCCCC         4                                                           
ALL           8 

PFB for counters for Wednesday 02/15/2012
or
PFB for counters for 02/15/2012 Wednesday
shailaja85
 
Posts: 20
Joined: Fri Feb 10, 2012 5:52 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Doubt on report

Postby Akatsukami » Fri Feb 17, 2012 10:35 pm

It would even better if you gave all the requirements in the first post :x
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Doubt on report

Postby bodatrinadh » Fri Feb 17, 2012 11:36 pm

I think there is no specific function/logic to generate day's value in Syncsort.
You have to go for Programming language (Either Cobol or SAS or etc...).

Thanks
-3nadh
Thanks
-3nadh
User avatar
bodatrinadh
 
Posts: 67
Joined: Thu Jan 12, 2012 9:05 pm
Has thanked: 0 time
Been thanked: 4 times

Re: Doubt on report

Postby enrico-sorichetti » Fri Feb 17, 2012 11:59 pm

since syncsort is pretty much aligned with dfsort
also syncsort should have the DATEx functions and the WEEKDAY function to do a bit of manipulations on date
it should be enough to check the manual
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3003
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Doubt on report

Postby enrico-sorichetti » Sat Feb 18, 2012 12:09 am

since <real writers> write around the problems, I did the same
used

 000019   OPTION EQUALS                                                         
 000020   SORT   FIELDS=(1,5,CH,A)                                             
 000021   INREC  OVERLAY=(81:DATE1(-)-1)                                       
 000022   OUTFIL REMOVECC,NODETAIL,                                             
 000023          SECTIONS=(1,5,                                                 
 000024                   TRAILER3=(1,5,C'*',COUNT=(M10,LENGTH=10),C'*')),     
 000025          TRAILER1=('ALL  ',C'*',COUNT=(M10,LENGTH=10),C'*',/,           
 000026                    'DATE ',C'*',81,10)                                 

to obtain

********************************* TOP OF DATA **********************************
AAAAA*         1*                                                               
BBBBB*         3*                                                               
CCCCC*         4*                                                               
ALL  *         8*                                                               
DATE *2012-02-16                                                               
******************************** BOTTOM OF DATA ********************************


horrid hack, but it works ( for DFSORT at least )

a SYNCSORT expert might come up with a better solution
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3003
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post