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

Synctool multiplication with zero


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Arun Raj

Moderator


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

PostPosted: Thu May 22, 2008 12:02 pm
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: 2146
Location: At my coffee table

PostPosted: Thu May 22, 2008 1:09 pm
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: 496
Location: USA

PostPosted: Thu May 22, 2008 9:01 pm
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: 2481
Location: @my desk

PostPosted: Thu May 22, 2008 10:23 pm
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: 2481
Location: @my desk

PostPosted: Thu May 22, 2008 10:29 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Synctool-dynamic split job for varyin... JCL & VSAM 7
No new posts SYNCTOOL better than SYNCSORT? SYNCSORT 3
No new posts Can any one give me any sample join s... SYNCSORT 9
No new posts SyncSort/SyncTooL to extract records ... SYNCSORT 25
No new posts Multiplication in DFSORT DFSORT/ICETOOL 11
Search our Forums:

Back to Top