Go Back
2 Votes

standard subroutines should accept strings as well as alpha variables


Closed

When working in synergy.net it is quite common to use string variables instead of alpha fields.  

However some of the old standard subroutines and functions don't accept this, such as COPY and GETLOG.

If you use alpha variables you then have to atrim them.

Consider

data logical     ,a100
getlog ('accounts',logical,len)
open (chan=0,O,atrim(logical) + ':update.log')

I would prefer to be able to use 

data logical     ,string
getlog ('accounts',logical,len)
open (chan=0,O,logical + ':update.log')

I tried the same thing with COPY, wher ethe file name I wanted to copy was a string.  It didn;t give an error.  It just said it couldn't find the file to copy

I moved it into an A100 and it copied it fine



 

1 Comment | Posted by Gordon Ireland to Synergy DBL, Synergy .NET on 7/10/2020 4:30 PM
Jerry Fawcett
Strings variables work without issue when passed to XCALL COPY, as the two alpha arguments are IN alpha arguments. With XCALL GETLOG, the second alpha argument is an OUT argument.  It is by design that string arguments may be passed for IN alpha arguments but not OUT alpha arguments.
 

7/22/2020 5:56 PM   0  
Please log in to comment on this idea.