|
>I want MESSAGE field to be populated with "Excluded >Time Exceeds Hours: 12". >Only "Excluded Time Exceeds Hours:" is populating >the MESSAGE field. Can anyone see why this line >of code will not work? > > D ARMSG01 S 78 DIM(6) CTDATA PERRCD(1) > > C EVAL MESSAGE = ARMSG01(6) + ' ' + > %CHAR(TOTALHOURS) > >** ARMSG01 >You Must Enter a Valid Service Center >You Have Entered an Invalid Service Center >You Must Enter a Valid Date >You Have Entered an Invalid Date >You Must Use .00, .25, .50, or .75 -> Example: 1.50 NOT >Excluded Time Exceeds Hours: In the spirit of helping to teach some debugging skills, especially for the archives, get out a bit of scrap paper. Presuming that MESSAGE is something like 78 characters long, put 78 underscores on the page to represent each available character in MESSAGE. Now perform the EVAL statement: Write one character from ARMSG01 into each space on the paper. Don't forget the blanks, there are 78 characters worth of ARMSG01 you are moving. Now move one column to the right and write a space in column 79 of MESSAGE Now convert TOTALHOURS to character; let's pretend it becomes "40.00". Now write those five characters in columns 80-84 of MESSAGE. Oops! Ran out of columns to write into? So did the compiler. You probably want to trim the blanks off the end of the array before you concatenate the hours. --buck
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.