Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
youayshu
Currently Banned

New User

Joined: 07 Nov 2006
Posts: 13
Location: Thiruvanathapuram

 Posted: Wed Mar 28, 2007 4:56 pm    Post subject: How to use DIV arithmetic operation in DFSORT? Hi all......... I tried to divide using DFSORT............... using the following syntax.... OUTREC FIELDS=(1,4,2C' ',9,3,(9,3,ZD,DIV,+2)) but it dint work properly.... the expected result was 1.5(3div 2). But instead we got 0.01.... How to resolve this? Please suggest a solution at the eraliest....... Thanking you

Frank Yaeger

DFSORT Moderator

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

Posted: Wed Mar 28, 2007 8:41 pm    Post subject:

 Quote: the expected result was 1.5(3div 2). But instead we got 0.01

Huh? DFSORT's DIV returns an integer value. +3,DIV,+2 would give 1 as the result. I don't know why you say you got 0.01 unless you edited the result of 1 to get that. If you want a result with one decimal place, you need to multiply by +10 and then divide by +2, e.g. (+3,MUL,+10),DIV,+2 would give a result of 15 which you could then edit to 1.5.
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics Utility for search operation Gopalakrishna551 TSO/ISPF 11 Wed Jan 03, 2018 11:07 am Formatting using DFsort Guru Nandu DFSORT/ICETOOL 5 Thu Nov 30, 2017 7:33 am Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 am Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us