Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Synctool multiplication with zero

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2238
Location: @my desk

PostPosted: Thu May 22, 2008 12:02 pm    Post subject: Synctool multiplication with zero
Reply with quote

Hi all,

I have synctool job which i am using for reporting purposes.

In this, I am multiplying field1 with field2 and writing the result into output.


Code:
41,4,PD,MUL,45,4,PD,EDIT=(STTTTTTTTT.TT),SIGNS=(,-,,)


when field1 = some -ve value and field2 = 0, I am getting the output as
Code:
-000000000.00


Can I remove the -ve sign for zeroes?

Thanks,
Arun
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu May 22, 2008 1:09 pm    Post subject:
Reply with quote

Syncsort generates Assembler and the PoOps states that Under some circumstances, a zero with a minus sign (negative zero) is produced. For example, the multiplicand:
00 12 3D (-123)
times the multiplier:
0C (+0)
generates the product:
00 00 0D (-0)
because the product sign follows the algebraic rule of signs even when the value is zero. A negative zero, however, is equivalent to a positive zero in that they compare equal in a decimal comparison.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Thu May 22, 2008 9:01 pm    Post subject: Re: Synctool multiplication with zero
Reply with quote

arcvns wrote:
Can I remove the -ve sign for zeroes?

You can use IFTHEN to test for the zero value and then OVERLAY the position of the sign byte with X'40'.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2238
Location: @my desk

PostPosted: Thu May 22, 2008 10:23 pm    Post subject:
Reply with quote

Hi,

Forgot to post the result . I got it using IFTHEN..

Thanks,
Arun
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2238
Location: @my desk

PostPosted: Thu May 22, 2008 10:29 pm    Post subject:
Reply with quote

Hi,

Please find the card below
41,4,PD - field1
45,4,PD - field2


Code:
OPTION COPY                                                         
INREC IFTHEN=(WHEN=(45,4,PD,EQ,0),                                   
     BUILD=(1,5,10,2,C'/',12,2,C'/',8,2,C',',                       
              19,2,C'/',21,2,C'/',17,2,23,18,C',',                   
              41,4,PD,EDIT=(STTTTTTT),SIGNS=(,-,,),C',',             
              45,4,PD,EDIT=(TTTTTTT.TT),C', 000000000.00')),         
      IFTHEN=(WHEN=NONE,                                             
     BUILD=(1,5,10,2,C'/',12,2,C'/',8,2,C',',                       
              19,2,C'/',21,2,C'/',17,2,23,18,C',',                   
              41,4,PD,EDIT=(STTTTTTT),SIGNS=(,-,,),C',',             
              45,4,PD,EDIT=(TTTTTTT.TT),C',',                       
              41,4,PD,MUL,45,4,PD,EDIT=(STTTTTTTTT.TT),SIGNS=(,-,,)))


Thanks,
Arun
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYNCTOOL better than SYNCSORT? Amit_Singh SYNCSORT 3 Wed Jul 23, 2014 11:06 am
No new posts Can any one give me any sample join s... Sanath sekhar Reddy N SYNCSORT 9 Thu Aug 08, 2013 12:03 pm
No new posts SyncSort/SyncTooL to extract records ... Hariharan BK SYNCSORT 25 Tue Jun 04, 2013 2:42 pm
No new posts Multiplication in DFSORT Pandora-Box DFSORT/ICETOOL 11 Wed May 29, 2013 8:01 pm
No new posts Work files with SYNCTOOL mlp JCL & VSAM 3 Wed Oct 05, 2011 11:10 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us