IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to do generate report using ICETOOL based on record type


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
homesh_career

New User


Joined: 25 Aug 2005
Posts: 5

PostPosted: Mon Oct 20, 2008 10:03 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Oct 20, 2008 10:24 pm
Reply with quote

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
View user's profile Send private message
homesh_career

New User


Joined: 25 Aug 2005
Posts: 5

PostPosted: Mon Oct 20, 2008 10:32 pm
Reply with quote

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
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Oct 20, 2008 10:51 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts ICETOOL returns no records JCL & VSAM 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top