View previous topic :: View next topic
|
Author |
Message |
homesh_career
New User
Joined: 25 Aug 2005 Posts: 5
|
|
|
|
Hi,
I have a VSAM file (KSDS)...with LRECL 250
for example
Rectype data amount
1 aaaa 10.00
2 aadsf 20.00
1 fdgdfkl 30.00
4 dfgfd 20.00
2 dfgfd 10.00
1 iuretret 10.00
----------------------------------
The amount is in packed decimal..
and the output should be in the following format and the amount will be is a display format ..
RecType no_of_rec total_amt
1 3 50.00
2 2 30.00
4 1 20.00
------------------------------------
Please help out if this possible using ICETOOL.
Thanks in advance |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
What is the starting position, length and format of each field in the input records?
What is the starting position of each column in the output records?
Does the VSAM input file have fixed-length records or variable-length records? |
|
Back to top |
|
|
homesh_career
New User
Joined: 25 Aug 2005 Posts: 5
|
|
|
|
Thanks for reply ...
Input Record
Field1 - position 98, Length -1, char
Field2 - data field , not required in the output
Field3 - position 73 Packed Decimal s9(10)V99
----------------------------------------
Output reocrd
Field1 Record_type char 1
Field2 No_of_records - record count in display format 99999
Field3 Total_amount - display format
---------------
VSAM file is of fixed length format with LRECL 350
Thanks |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
homesh_career,
Use the following DFSORT control cards
Code: |
//SYSIN DD *
SORT FIELDS=(1,1,CH,A)
INREC BUILD=(98,1,73,7,23:X)
OUTFIL REMOVECC,NODETAIL,
SECTIONS=(1,1,
TRAILER3=(1,1,X,COUNT=(M11,LENGTH=5),X,
TOT=(2,7,PD,EDIT=(IIIIIIIIIIIT.TT))))
/* |
The output is
Code: |
1 00003 50.00
2 00002 30.00
4 00001 20.00
|
|
|
Back to top |
|
|
|