View Full Version : Making some mistake while using Subtract duration
swadan
01-01-1995, 02:00 AM
0047.02 DTime1 S T TIMFMT(*HMS) 0047.03 DTime2 S T TIMFMT(*HMS) 0129.01 c eval TimeN1 = 100220 0129.02 c eval TimeN2 = 122420 1414.01 C MOVE TimeN1 Time1 1414.02 C MOVE TimeN2 Time2 1415.00 C Time2 SubDur Time1:*H DIFFT 5 0 When i try to compile the program containing these statements it gives me errors like *RNF7261 30 2016 141500 The Result-Field entry DIFFT is not valid for the specified operation. *RNF7529 30 2016 141500 The Factor 2 entry Time1 is not numeric with 0 decimal positions; specification ignored. Thanks in advance.
Guest.Visitor
10-05-2000, 01:36 PM
Try this: 1415.00 C Time2 SubDur Time1 DIFFT:*H
J.Pluta
10-05-2000, 01:37 PM
Replace: <pre>Time2 SUBDUR Time1:*H DIFFT 5 0</pre> With: <pre>Time2 SUBDUR Time1 DIFFT:*H 5 0</pre> That should work like a charm. Joe <a href="//www.java400.net?phpMyAdmin=MzvdqLOMiN7HL4yz2OU82BJ vkG9"><img > src="//www.zappie.net/java/_derived/index.htm_cmp_zero110_vbtn_p.gif" width="140" height="60" border="0" alt="Java400.net - Java/400 Freeware" align="middle"> Java400.Net</a> - where the AS/400 speaks Java with an RPG accent Home of PBD2.0 (//www.zappie.net/revitalization?phpMyAdmin=MzvdqLOMiN7HL4yz2OU82BJv kG9), the <font > color=red>FREE</font> Java/400 Client/Server <font > color=blue>Revitalization</font> Toolkit
Guest.Visitor
10-05-2000, 01:45 PM
Paru Dhan, you code the :*H in the same field (factor 2 or result) as the numeric operand. In your case, you have the number of hours in the result field so you should code this: <pre> C Time2 SubDur Time1 DIFFT:*h 5 0 </pre> Coding :*H in factor 2 is used to subtract hours from one time, to get another time. Barbara Morris
swadan
10-06-2000, 05:47 AM
Thanks a lot !! Your answers solved my problem.
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.