Re: Fwd: Identifying numeric string in a 4gl program
Posted in 2000
ERROR in my last posting. Check STATUS _before_ the new call to startlog(), else the status you check will be that of startlog() call. corrected sample: main define x integer define y char(10) CALL STARTLOG("error_log.out") let y = "4.3e2" CALL STARTLOG("/dev/null") whenever any error continue let x=y display y, " ", x, " ", sqlca.sqlcode, " ", status whenever any error stop CALL STARTLOG("error_log.out") let y = "hello" CALL STARTLOG("/dev/null") whenever any error continue let x=y display y, " ", x, " ", sqlca.sqlcode, " ", status whenever any error stop CALL STARTLOG("error_log.out") let y = "4.3i2" CALL STARTLOG("/dev/null") whenever any error continue let x=y display y, " ", x, " ", sqlca.sqlcode, " ", status whenever any error stop CALL STARTLOG("error_log.out") end main Andrew Hamm wrote: > > Colin McGrath wrote in message <91trsu$d9k$1@news.xmission.com>... > > > >Because "." and "e" and such can be part of legit numeric strings, I use > >the "whenver any error continue" statement, and check the status after > >putting the character string into a numeric field. > > > > Small warning though: I did that a few years ago (V 4.1? 4GL) and it left an > endless stream of messages in the errorlog file - ie the error file you > associate with the running program using the startlog() function. > > Hopefully this has been fixed in later versions of 4GL, but I suggest you > check for it in your version. Feedback on this would be appreciated. > -- Colin Any opinions I state are my own and not necessarily those of my employer