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
 

 

Syncsort - Report with heading having the count of records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
TAPAS PATEL

New User


Joined: 03 Apr 2009
Posts: 47
Location: CHENNAI

PostPosted: Mon Nov 16, 2009 11:50 am    Post subject: Syncsort - Report with heading having the count of records
Reply with quote

Hi,
I have a requirement to generate a exception report, with the break title as Exception message and count of records which fall under that exception. Please find the details of the input file and the code that I have written below.

Input record:

Code:

123565EXCEPTION1
898845EXCEPTION2
099909EXCEPTION3
155909EXCEPTION1
909045EXCEPTION2
898898EXCEPTION2
888343EXCEPTION3


ICETOOL Code:

Code:


//VALREPT  EXEC PGM=ICETOOL                                       
//*                                                               
//TOOLMSG DD SYSOUT=*                                             
//DFSMSG  DD SYSOUT=*                                             
//EXCPFL  DD  DSN=XXX.EXCEPT.FILE,DISP=SHR                   
//TEMP    DD  DSN=XXX.EXCEPT.FILE.TEMP,DISP=SHR                   
//VALRPT  DD  DSN=XXX.EXCEPT.FILE.REPORT,                         
//            DISP=(NEW,CATLG,CATLG),                             
//            UNIT=TSTDA,                                         
//            SPACE=(CYL,(5,15),RLSE),                           
//            DCB=(LRECL=121,RECFM=FBA,BLKSIZE=0)                 
//TOOLIN  DD *                                                     
* THIS STEP GENERATES EXCEPTION REPORT                           
SORT FROM(EXCPFL) TO(TEMP) USING(CARD)                             
DISPLAY  FROM(TEMP) LIST(VALRPT) -                                 
DATE TITLE('*****EXCEPTION REPORT*****') PAGE -     
HEADER('KEY NUMBER')   ON(1,6,ZD,A0)  -                       
* HEADER('ERROR DESCRIPTION')  ON(7,74,CH) -                       
BTITLE('ERROR MESSG:') BREAK(7,74,CH)                             
/*                                                                 
//CARDCNTL DD *                                                   
  SORT FIELDS=(7,74,CH,A)                                         
/*                                                                 
//SYSPRINT DD   SYSOUT=*                                           
//SYSOUT   DD   SYSOUT=*                                           


This code gives me the report with the proper heading, but I am not able to understand how to incorporate the record count, i.e. I also want the heading to have count of records which have a particular exception message, for ex: EXCEPTION1 records are 2

Please let me know if there are more details required on this.
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: Mon Nov 16, 2009 11:48 pm    Post subject:
Reply with quote

Please show the expected ouput records. Explain the "rules" for getting from input to output.

Please give the RECFM and LRECL of the input file, and the starting position, length and format of all relevant fields.
Back to top
View user's profile Send private message
TAPAS PATEL

New User


Joined: 03 Apr 2009
Posts: 47
Location: CHENNAI

PostPosted: Tue Nov 17, 2009 10:23 am    Post subject:
Reply with quote

Hi Frank,
The RECFM of the input file is FB and LRECL is 80. Please find the snapshots of current and expected output below.

Current Output:

Code:


111/17/09        *****EXCEPTION REPORT*****        - 1 -

 ERROR MESSG:  EXCEPTION1
 
 KEY NUMBER
 --------------
       123565
       155909

111/17/09        *****EXCEPTION REPORT*****        - 2 -

 ERROR MESSG:  EXCEPTION2
 
 KEY NUMBER
 --------------
      898845
      909045
      898898

111/17/09        *****EXCEPTION REPORT*****        - 3 -

 ERROR MESSG:  EXCEPTION3
 
 KEY NUMBER
 --------------
      099909
      888343



Expected Output:

Code:


111/17/09        *****EXCEPTION REPORT*****        - 1 -

 ERROR MESSG:  EXCEPTION1
 NUMBER OF RECORDS: 2

 KEY NUMBER
 --------------
       123565
       155909

111/17/09        *****EXCEPTION REPORT*****        - 2 -

 ERROR MESSG:  EXCEPTION2
 NUMBER OF RECORDS: 3

 KEY NUMBER
 --------------
      898845
      909045
      898898

111/17/09        *****EXCEPTION REPORT*****        - 3 -

 ERROR MESSG:  EXCEPTION3
 NUMBER OF RECORDS: 2

 KEY NUMBER
 --------------
      099909
      888343



As for the rules go, I just need the report to be broken by the field starting from 7 coulmn till 80 column ( as shown in the current ICETOOL step) there by showing the value of column as a break title along with the number of records which have the same value. Please let me know if there are any more queries.
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 Nov 18, 2009 12:42 am    Post subject:
Reply with quote

If it's ok to have the NUMBER OF RECORDS after the KEY NUMBERs rather than before the KEY NUMBERs, you can use DFSORT's BCOUNT operand, like this:

Code:

...
BTITLE('ERROR MESSG:') BREAK(7,74,CH)   -
BCOUNT('NUMBER OF RECORDS:') 
...
Back to top
View user's profile Send private message
TAPAS PATEL

New User


Joined: 03 Apr 2009
Posts: 47
Location: CHENNAI

PostPosted: Wed Nov 18, 2009 10:30 am    Post subject:
Reply with quote

Hi Frank,
Thanks for the advice. I tried using the BCOUNT operator, but I am getting an error with the below message,

Code:

SYT000I  SYNCTOOL RELEASE 1.6.0 - COPYRIGHT 2007  SYNCSORT INC.               
SYT001I  INITIAL PROCESSING MODE IS "STOP"                                     
SYT002I  "TOOLIN" INTERFACE BEING USED                                         
                                                                               
         * THIS STEP GENERATES VALIDATION REPORT                               
         SORT FROM(EXCPFL) TO(TEMP) USING(CARD)                               
SYT020I  SYNCSORT CALLED WITH IDENTIFIER "0001"                               
SYT030I  OPERATION COMPLETED WITH RETURN CODE 0                               
                                                                               
         DISPLAY  FROM(TEMP) LIST(VALRPT) -                                 
         DATE TITLE('*****EXCEPTION REPORT*****') PAGE -     
         HEADER('KEY NUMBER')   ON(1,6,ZD,A0)  -                       
         * HEADER('ERROR DESCRIPTION')  ON(7,74,CH) -                       
         BTITLE('ERROR MESSG:') BREAK(7,74,CH)         -                             
         BCOUNT('NUMBER OF RECORDS:') EDBCOUNT(U08)                           
SYT050E  INVALID OPERAND ON "DISPLAY" STATEMENT                               
SYT030I  OPERATION COMPLETED WITH RETURN CODE 12                               
                                                                               
SYT015I  PROCESSING MODE CHANGED FROM "STOP" TO "SCAN" DUE TO OPERATION FAILURE
                                                                               
SYT004I  SYNCTOOL PROCESSING COMPLETED WITH RETURN CODE 12                     



It appears to me that the version of DFSORT that my shop has is not the latest one and hence is not supporting this, but I am not sure. Please advice on this.

The version is - SYNCSORT FOR Z/OS 1.3.0.2RI
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Wed Nov 18, 2009 10:46 am    Post subject:
Reply with quote

Hi,

SYT messages are not part of DFSORT, DFSORT generates ICE messages.

The 2 products are competitors.


Gerry
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Nov 18, 2009 10:56 am    Post subject: Reply to: Syncsort - Report with heading having the count of
Reply with quote

Hello,

Knowing your system uses Syncsort (this has been established prior to this topic) why would you post in the DFSORT part of the forum?

In the future, these will be deleted.

d
Back to top
View user's profile Send private message
TAPAS PATEL

New User


Joined: 03 Apr 2009
Posts: 47
Location: CHENNAI

PostPosted: Wed Nov 18, 2009 2:20 pm    Post subject: The 2 products are competitors.
Reply with quote

Hi All,
I was not aware that the two products are different. Will take care of posting the sort related queries in JCL section. Sorry for the confusion.
Back to top
View user's profile Send private message
TAPAS PATEL

New User


Joined: 03 Apr 2009
Posts: 47
Location: CHENNAI

PostPosted: Thu Nov 19, 2009 1:17 pm    Post subject:
Reply with quote

Hi All,
Any luck on this?? Please let me know if there is a way to achieve this.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Tue Dec 01, 2009 4:04 am    Post subject:
Reply with quote

Tapas,

BCOUNT is supported in SyncSort for z/OS 1.3.2. You will need to upgrade your SyncSort release in order to utilize this function.
Please note, SyncSort for z/OS 1.3.2 is a free upgrade from your current release.
Back to top
View user's profile Send private message
TAPAS PATEL

New User


Joined: 03 Apr 2009
Posts: 47
Location: CHENNAI

PostPosted: Tue Dec 01, 2009 2:20 pm    Post subject: SyncSort for z/OS 1.3.2 is a free upgrade from your current
Reply with quote

Hi Alissa,
Thanks a lot for the reply. I am working in client network, and probably will have to contact Mainframe Admin for this. Do we need to have any special access for this?
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Tue Dec 01, 2009 9:23 pm    Post subject:
Reply with quote

I'm not sure what you mean by "special access"...
Back to top
View user's profile Send private message
TAPAS PATEL

New User


Joined: 03 Apr 2009
Posts: 47
Location: CHENNAI

PostPosted: Thu Dec 03, 2009 1:02 pm    Post subject: I'm not sure what you mean by "special access"...
Reply with quote

I mean to say that can every user do this upgradation or does it look for any Racf group which can upgrade? Please let me know if I am not clear.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Thu Dec 03, 2009 9:11 pm    Post subject:
Reply with quote

That is a question for your system programmers. I would recommend contacting the person or group who installs and maintains SyncSort for your site and request that they perform the upgrade.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Dec 04, 2009 2:49 pm    Post subject:
Reply with quote

Quote:
I am working in client network
I believe you work for an "outsourcing unit"...if so, channel to reach out the System Programmers would be bit difficult however, you can inform your Project Manger and can done with it at this moment as far as upgrade is conderned and yes as an "end user" (having a RACF ID) you can't perform any upgrade.

To get your sort-JCL working you might need to devise a new logic to accomplish what you want.
Back to top
View user's profile Send private message
TAPAS PATEL

New User


Joined: 03 Apr 2009
Posts: 47
Location: CHENNAI

PostPosted: Fri Dec 04, 2009 3:15 pm    Post subject: To get your sort-JCL working you might need to devise a new
Reply with quote

Thanks Anuj...I have started my work on this..will update you once I am through...
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Dec 04, 2009 3:32 pm    Post subject:
Reply with quote

Good Luck..icon_smile.gif
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 3 Fri Dec 02, 2016 9:47 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


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