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

Sumsort with header


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

New User


Joined: 27 Mar 2007
Posts: 10
Location: India

PostPosted: Wed Jul 09, 2008 9:05 pm
Reply with quote

Hi,

Can someone help me on the following?

I need the accumulated value of certain fields. But in the sysout I need it along with the field name (a label which I can give in the sysin).

For eg:

I need the accumulated value of a field, say, premium amount. I want the sysout to be as:

Premium-amt: _____ (the value)

Thanks,
Mukunth
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: Wed Jul 09, 2008 10:00 pm
Reply with quote

Please show an example of the records in your input file (relevant fields only) and what you expect for output. Give the RECFM and LRECL of the input file. Give the starting position, length and format of all relevant fields.
Back to top
View user's profile Send private message
mukunthg

New User


Joined: 27 Mar 2007
Posts: 10
Location: India

PostPosted: Thu Jul 10, 2008 10:11 am
Reply with quote

My file looks like this:

abcd 1000
bcda 2000
cdab 1500
dabc 2500

Say the field (6,4) is premium amount. I want the sysout as:

Prem-amt: 7000

(The value "Prem-amt:" to be given in the sysin itself.) Will Outrec Build achieve this?
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Thu Jul 10, 2008 9:32 pm
Reply with quote

mukunthg,

The following DFSORT JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=ICEMAN                         
//SYSOUT   DD SYSOUT=*                             
//SORTIN   DD *                                     
----+----1----+----2----+----3----+----4----+----5--
ABCD 1000                                           
BCDA 2000                                           
CDAB 1500                                           
DABC 2500                                           
//SORTOUT  DD SYSOUT=*                             
//SYSIN    DD *                                     
  SORT FIELDS=COPY                                 
  OUTFIL REMOVECC,NODETAIL,                         
  TRAILER1=('PREM-AMT: ',TOT=(6,4,ZD,M10,LENGTH=8))
/*
Back to top
View user's profile Send private message
mukunthg

New User


Joined: 27 Mar 2007
Posts: 10
Location: India

PostPosted: Mon Jul 14, 2008 6:05 pm
Reply with quote

Thanks a lot. It works.
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 Insert header record with record coun... DFSORT/ICETOOL 14
No new posts Comparing Header and Trailer. DFSORT/ICETOOL 7
No new posts Adding a header when change data DFSORT/ICETOOL 6
No new posts Insert System Runtime in HEADER In SY... SYNCSORT 9
No new posts Create Header Dtae as MMDDYYYY DFSORT/ICETOOL 16
Search our Forums:

Back to Top