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
 
DFSORT : Overlay & SUM fields in same DFSORT step

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
kunal jain

New User


Joined: 19 May 2011
Posts: 59
Location: India

PostPosted: Tue May 07, 2013 6:52 pm    Post subject: DFSORT : Overlay & SUM fields in same DFSORT step
Reply with quote

HI,

Input file has below values

Code:

COUNTRY   Amounts
ASIA          25.00
EUROPE      -200.00
INDIA         -50.00
SRI LANKA   25.00


Two requirements here:
1. Need to overlay 'INDIA' & 'SRILANKA' with value as 'ASIA'.
So above file will look like as below:
Code:

     ASIA            25.00
     EUROPE       -200.00
     ASIA           -50.00
     ASIA            25.00

2. ADD amounts country wise. so final output should be:

Code:

     ASIA           0.00
    EUROPE       -200.00
Please advise on DFSORT control card which can satisfy my above 2 requirements.
Also, please let me know if we can combine both steps in same DFSORT control card.

Thank you in advance
Code:
Code:
Back to top
View user's profile Send private message

Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1567
Location: Andromeda Galaxy

PostPosted: Tue May 07, 2013 6:56 pm    Post subject:
Reply with quote

Can you please use code tags?

And this post should belong to DFSORT forum.
Back to top
View user's profile Send private message
kunal jain

New User


Joined: 19 May 2011
Posts: 59
Location: India

PostPosted: Tue May 07, 2013 7:02 pm    Post subject:
Reply with quote

Pandora-Box wrote:
Can you please use code tags?

And this post should belong to DFSORT forum.


Done as suggested. Apology for inappropriate forum, as am new to this..
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1567
Location: Andromeda Galaxy

PostPosted: Tue May 07, 2013 7:18 pm    Post subject:
Reply with quote

Try this

You might need to modify the code slightly for your needs

Code:
//SORTIN   DD *
ASIA          25.00
EUROPE      -200.00
INDIA         -50.00
SRI LANKA   25.00
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  INREC IFTHEN=(WHEN=(1,9,CH,EQ,C'INDIA'),OVERLAY=(1:C'ASIA     ')),
        IFTHEN=(WHEN=(1,9,CH,EQ,C'SRI LANKA'),OVERLAY=(1:C'ASIA     '))
  SORT FIELDS=(1,9,CH,A)
  OUTFIL REMOVECC,NODETAIL,
  SECTIONS=(1,9,
  TRAILER3=(1,9,3X,
            TOT=(13,8,SFF,EDIT=(SIIIIIIIT.TT),SIGNS=(,-))))
//*
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2110
Location: UK

PostPosted: Tue May 07, 2013 10:24 pm    Post subject:
Reply with quote

Quote:
Apology for inappropriate forum, as am new to this..

For a first post this would almost be an acceptable excuse but 30+ posts over 2 years? No - it is just pain laziness in not taking due care.
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 count the number of times key ... vnktrrd DFSORT/ICETOOL 3 Thu Nov 15, 2018 9:19 pm
This topic is locked: you cannot edit posts or make replies. DFSORT output in CSV for data spans i... hiravibk DFSORT/ICETOOL 3 Tue Nov 13, 2018 7:55 pm
No new posts Introducing new step in set of jobs ravikumar15 CLIST & REXX 6 Wed Oct 17, 2018 2:22 am
No new posts Calling and updating SAS Macro variab... Yogesh Jaiswal All Other Mainframe Topics 7 Thu Oct 11, 2018 12:37 pm
No new posts Extra data in overlay field speermb DFSORT/ICETOOL 2 Thu Sep 13, 2018 6:04 pm

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