View previous topic :: View next topic
|
Author |
Message |
TAPAS PATEL
New User
Joined: 03 Apr 2009 Posts: 47 Location: CHENNAI
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
TAPAS PATEL
New User
Joined: 03 Apr 2009 Posts: 47 Location: CHENNAI
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
TAPAS PATEL
New User
Joined: 03 Apr 2009 Posts: 47 Location: CHENNAI
|
|
|
|
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 |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
SYT messages are not part of DFSORT, DFSORT generates ICE messages.
The 2 products are competitors.
Gerry |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
TAPAS PATEL
New User
Joined: 03 Apr 2009 Posts: 47 Location: CHENNAI
|
|
|
|
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 |
|
|
TAPAS PATEL
New User
Joined: 03 Apr 2009 Posts: 47 Location: CHENNAI
|
|
|
|
Hi All,
Any luck on this?? Please let me know if there is a way to achieve this. |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
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 |
|
|
TAPAS PATEL
New User
Joined: 03 Apr 2009 Posts: 47 Location: CHENNAI
|
|
|
|
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 |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
I'm not sure what you mean by "special access"... |
|
Back to top |
|
|
TAPAS PATEL
New User
Joined: 03 Apr 2009 Posts: 47 Location: CHENNAI
|
|
|
|
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 |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
TAPAS PATEL
New User
Joined: 03 Apr 2009 Posts: 47 Location: CHENNAI
|
|
|
|
Thanks Anuj...I have started my work on this..will update you once I am through... |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Good Luck.. |
|
Back to top |
|
|
|