Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Sumsort with header

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Sumsort with header
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 Moderator


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

PostPosted: Wed Jul 09, 2008 10:00 pm    Post subject:
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    Post subject: Reply to: Sumsort with header
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    Post subject:
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    Post subject: Sumsort with header
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am
No new posts Remove header only knobi SYNCSORT 5 Mon Feb 15, 2016 10:42 pm
No new posts GROUP - header data to be repeated in... Musab Ahmed DFSORT/ICETOOL 3 Mon Feb 01, 2016 11:36 am
No new posts Add Counts to Group Header Records Christopher Horowitz SYNCSORT 3 Sat Jul 11, 2015 1:21 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us