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

Build a trailer with total an count


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
krunal7757

New User


Joined: 01 Sep 2021
Posts: 6
Location: INdia

PostPosted: Tue Sep 14, 2021 1:42 am
Reply with quote

Hi Team -
i have input file with multiple header and multiple trailer based on acount number in file.
i am adding additional records to above file before sending to client. When i add records i need to update the totals for matching account number.

trailer total will have count and total amount
i triled below
Code:
SORT FIELDS=(1,12,CH,A)
  OUTFIL FNAMES=SORTOUT,
   IFTHEN=(WHEN=(13,1,CH,EQ,C'T'),
    BUILD=(1:1,13,14:COUNT=(M11,LENGTH=10),
                24:TOT=(43,12,ZD,TO=ZD,LENGTH=12),115X),
  REMOVECC


but i am getting below error
Code:
WER813I  INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED
WER268A  OUTFIL STATEMENT  : SYNTAX ERROR
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE


trying since last 4 hr.. can you helpin this
Coded for you
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

PostPosted: Tue Sep 14, 2021 2:45 am
Reply with quote

Code tags!! - first of all
And code alignment! - second thing to do
Answer to the question - after that
358.gif
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

PostPosted: Tue Sep 14, 2021 2:54 am
Reply with quote

Learn counting parenthesis!
Code:
 IFTHEN=(WHEN=(…),
         BUILD=(…)),
 REMOVECC
Back to top
View user's profile Send private message
krunal7757

New User


Joined: 01 Sep 2021
Posts: 6
Location: INdia

PostPosted: Tue Sep 14, 2021 3:17 am
Reply with quote

Thank you for the reply sir,
I did check the paranthesis post the question. But that is also not working for me
currently what i have coded is
SORT FIELDS=(1,12,CH,A)
OUTFIL FNAMES=SORTOUT,REMOVECC,
IFTHEN=(WHEN=(13,1,CH,EQ,C'T'),
BUILD=(1:1,13,14:COUNT=(M11,LENGTH=10),
24:TOT=(43,12,ZD,TO=ZD,LENGTH=12),115X)))

i tried overlay too but no success.

I am sorry my post is giving me warning but mistake done by me is unintentional and not to hurt any one

really need the support to solve this query
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

PostPosted: Tue Sep 14, 2021 4:39 am
Reply with quote

Code tags!!!
And code alignment!!!

You are just not able to count things up to ten. It’s a pity… icon_redface.gif

It all has nothing to do with OVERLAY.
Your problem is - inability to count properly.

Try at least once in your life to place your code in a pretty manner.
You’ll like it, and your problems should be fixed by themselves, without appealing to the forum.

P.S.
After fixing the number of parenthesis you may find that parameters COUNT= and TOT= are not allowed where you put them…
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1255
Location: Bamberg, Germany

PostPosted: Tue Sep 14, 2021 9:13 am
Reply with quote

This is neither DFSORT nor ICETOOL. Please learn to post in SYNCSORT part of the forum when you are asking questions about it.

Topic should be moved to the to SYNCSORT forum. icon_arrow.gif
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Tue Sep 14, 2021 10:03 am
Reply with quote

Welcome !
Couple of things in addition, always provide sample input and expected output . Second use the SEARCH to find related post and try to resolve by yourself.
E.g. ibmmainframes.com/about49607.html
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 -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts To get the count of rows for every 1 ... DB2 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Build a record in output file and rep... DFSORT/ICETOOL 11
Search our Forums:

Back to Top