View previous topic :: View next topic
|
Author |
Message |
akshathan
New User
Joined: 18 Aug 2006 Posts: 45
|
|
|
|
Hi All,
I have an input file with 50 numeric fields.I need to get the maximum values of these fields and write it on to a report.I tried using OUTREC statement but i am getting Numeric field error.Can anyone help me out how to achieve this using OUTREC statment.I want particularly using DFSORT.
regards
Akshatha |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
akshathan wrote: |
I tried using OUTREC statement but i am getting Numeric field error.Can anyone help me out how to achieve this using OUTREC statment. |
And you want us to guess how an outrec should look like without any idea of what the input looks like?
Post you JCL.
Post your sysouts.
Post an example of what your input looks like.
Post what you want your output to look like.
And a sort on the field descending with a stop after one will get you what you want....unless you have a non-numeric field..... |
|
Back to top |
|
|
akshathan
New User
Joined: 18 Aug 2006 Posts: 45
|
|
|
|
Hi CICSGUY,
Sorry for not providing the details.The JCL which i am using is
Code: |
//TSORTJOB JOB (T,DH,POP),AKSHATHA,CLASS=S,MSGCLASS=0
//*+JBS BIND C301.UP
//PS010 EXEC PGM=SORT
//*********************
//SYSOUT DD SYSOUT=*
//SYSDUMP DD SYSOUT=*
//SORTLIST DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTIN DD DSN=B052A2N.NA.XBPR378.REPORT.G252,
// DISP=SHR
//SORTOUT DD DSN=B052A2N.XBPR378.MAX.INFO,
// DISP=(NEW,CATLG,DELETE),
// UNIT=STOR,SPACE=(CYL,(200,300),RLSE),
// VOL=(,,,99)
//SYSIN DD *
OUTREC FIELDS=(4:C'MAX RPT-PRIN:',20:3,5,ZD,MAX)
/*
|
The error details
Code: |
SYNCSORT FOR Z/OS 1.2.2.3R U.S. PATENTS: 4210961, 5117495 (C)2005
FEDERATED SYSTEMS GROUP z/OS
PRODUCT LICENSED FOR CPU SERIAL NUMBER 2ED8F, MODEL 2084 304
SYSIN :
OUTREC FIELDS=(4:C'MAX RPT-PRIN:',20:3,5,ZD,MAX)
*
WER271A OUTREC STATEMENT : NUMERIC FIELD ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
|
My requirement is, I have around 100 fields in an input file and i have to find the maximum of all the fields and iwrite it on to an output file using SORT utility(Outrec statement) in a single step.Please help me out. |
|
Back to top |
|
|
akshathan
New User
Joined: 18 Aug 2006 Posts: 45
|
|
|
|
Hi CICGUY,
I just missed to mention the input i am using.The Input file looks like below
Code: |
01000000000000000000000000000000000TOTAL COMPANY
01000010000000000000000000000000000PRIN: 1 RTW
01000010000100000000000000000000000GFOB: 1 MS & WMN SPO |
The initial numeric values i will be using to get the Maximum value.
I want the Output file in the following format
Code: |
MAX RPT-PRIN:9999
MAX RPT-FOB:9789 |
.
.
.
.
.
.
and so on. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
The WER messages indicate you're using Syncsort, not DFSORT. I've changed your Subject line and moved this thread to the JCL Forum. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
I can't test it out, but the manual seems to imply that the outrec should look more like this:
OUTREC FIELDS=(4:C'MAX RPT-PRIN:',20:MAX=(3,5,ZD))
But I don't see how your JCL will produce multiple MAXes..... |
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
STATS Operator of ICETOOL is useful if you want such type of statistics. Just find out its syntax. It is quite simple
-Ajay |
|
Back to top |
|
|
|