| T.R | Title | User | Personal Name
 | Date | Lines | 
|---|
| 2503.1 | Works (NOT!) for me | IOSG::PYE | Graham - ALL-IN-1 Sorcerer's Apprentice | Wed Mar 31 1993 08:59 | 19 | 
|  |     On a PFR, I consistently get 10069808 for all your examples.
    
    In fact, trying a few others (!SL, !ZL, etc.) none of them seem to
    work. Since all ALL-IN-1 symbols are strings, perhaps it makes sense
    that only !AS should work, although I suppose the others might work if
    you could work out how to pass the address of an integer to them!
    
    What I assume we are seeing is the result of decoding the address of
    the symbol's string descriptor - Perhaps I'll try it in a debug image
    and verify that!
    
    The APR is not very clear, since it says that all the normal FAO
    qualifiers can be used.
    
    Was this reported by a customer? I ask because we take customer
    discovered problems more seriously. If not, I'll submit it internally,
    since that's cheaper, and gets to us much quicker.
    
    Graham
 | 
| 2503.2 |  | BUSHIE::SETHI | Man from Downunder | Wed Mar 31 1993 09:27 | 11 | 
|  |     Graham my friend ;-),
    
    This is a customer discovery and he would like this to be solved
    because he is writing an application that requires the numbers to have
    leading zero's.
    
    Let me know if I have to SPR it and I will do so.
    
    Regards,
    
    Sunil
 | 
| 2503.3 | Explanation and workaround | SCOTTC::MARSHALL | Spitfire Drivers Do It Topless | Wed Mar 31 1993 10:03 | 24 | 
|  | It is well known, although apparently not documented, that OA$FAO only works
for string data.  Graham's reasoning is correct: all ALL-IN-1 symbols are
stored as strings.  Trying to use an integer conversion (eg !XL) will pick
up the first longword of the string descriptor (that points to a string
containing the ASCII digits of the number) and display that.
As a workaround, the following script fragment will take a number in #num, add
leading zeroes to it to make its length #lz, and put it in #lznum:
get #lznum = ""
get #tnum = #num
get #tlz = #lz
.label loop
    compute #digit = #tnum mod 10
    compute #tnum = #tnum div 10
    get #lznum = #digit #lznum
    decrement #tlz
.if #tlz gt 0 then .goto loop
Or if you have V3.0, you can be even cleverer:
get #lznum = FN$FILL(#num, #lz, "0", 1)
Scott
 | 
| 2503.4 | And the bug is... | SCOTTC::MARSHALL | Spitfire Drivers Do It Topless | Wed Mar 31 1993 10:25 | 6 | 
|  | PS - if I didn't make it clear in .3, this is a documentation bug - the APR
shouldn't say that you can use all the directives.  If you put in a code bug
asking for OA$FAO to support all directives, you'll be waiting a long time for
it to be implemented... :-)
Scott
 | 
| 2503.5 | How to pass a longword!? | IOSG::MAURICE | Because of the architect the building fell down | Wed Mar 31 1993 11:37 | 11 | 
|  |     Hi,
    
    In the VMS documentation it states that !ZL converts a *longword* to
    decimal. Since the customer was not passing a longword but instead a
    string perhaps we can fault the customer's application! That the
    customer has no way of passing a longword parameter may not go down too
    well ;^)
    
    Cheers
    
    Stuart
 | 
| 2503.6 | I am but a simple soul | IOSG::SHOVE | Dave Shove -- REO2-G/M6 | Wed Mar 31 1993 16:35 | 15 | 
|  |     Am I being dense, or what?
    
    Doesn't this do it (to get #num padded with leading zeros to 6
    characters in this case)?
    
    get #a = '000000' #num
    get #lznum = #a::6
    
    (You can also do neat tricks to get stuff on the end, using :H to
    reverse the string).
    
    Of course, as Scott says, if you have v3.0 you can use the lexical
    function FN$FILL
    
    D.
 | 
| 2503.7 | RE .2, SPR (against APR as Scott suggests) please! | IOSG::PYE | Graham - ALL-IN-1 Sorcerer's Apprentice | Wed Mar 31 1993 17:35 | 0 | 
| 2503.8 | Another workaround by yours truely ;*) !!! | BUSHIE::SETHI | Man from Downunder | Thu Apr 01 1993 02:09 | 17 | 
|  |     Hi All,
    
    The customer does not want me to submit an SPR because they are
    ditching ALL-IN-1 in favour of MS-mail .... (sorry for the pause just
    washing my mouth out ;-}).
    
    However I gave the customer another workaround and it is:
    
    get oa$dcl="write oamailbox ""OA get #num = ''f$fao("""!8ZL""" , 1)'"""
    get oa$dcl="@DCLMAILBOX"
    
    I would be grateful if someone in IOGland can record this problem in
    the database of known problems and something in Stars.
    
    Regards,
    
    Sunil
 | 
| 2503.9 | IPR Submitted. | IOSG::PYE | Graham - ALL-IN-1 Sorcerer's Apprentice | Thu Apr 01 1993 08:55 | 8 | 
|  |     OK, I'll submit the bug internally, and I'll note that a customer
    discovered it, to help its classification.
    
    I don't know whether that means it gets to STARs automatically.
    
    Graham
    
    PS I'm jealous of your workround, I only wish I'd thought of using DCL!
 | 
| 2503.10 | Use the FAO function (undocumented until a PFR) | IOSG::HULIN | Ian Hulin, IOSG: REO, DTN 830-6141 | Thu Apr 01 1993 10:44 | 24 | 
|  |    G'dye Sunil,
   Sorry sport, but yer needed yer crystal ball here.  
   We have an undocumented function in V3.0 (which we plan to document for a
   PFR) which I initially wrote to test the Centalized Parser keyword
   functions, and because I thought it _couldn't_ do a worse job than OA$FAO,
   which effectively only supports formatting input FAO parameters which are
   ASCII only.
   (Also there's the nonsense of having to put the output symbol name as a
   quoted string!).
   Try this in A1 command mode {KEY 7}:
   GET #temp = 0
   INCREMENT(#temp)
   FAO(FORMAT="!8ZL",OUT=OA$DISPLAY,P1=#temp)
   On IOSG (admittedly running a PFR) I get the result:
   00000001
   Cheers,
   Ian
 | 
| 2503.11 | More workarounds | SCOTTC::MARSHALL | Spitfire Drivers Do It Topless | Thu Apr 01 1993 12:57 | 16 | 
|  | re .6
>> Doesn't this do it
>>    get #a = '000000' #num
>>    get #lznum = #a::6
Not when I tried it.  It just gives the end of the string, starting at the
seventh character.  But
      get #a = '000000' #num
      get #a = #a:H
      get #a = #a:6
      get #lznum = #a:H
does seem to work.
Scott
 | 
| 2503.12 | Mea culpa | IOSG::SHOVE | Dave Shove -- REO2-G/M6 | Thu Apr 01 1993 15:35 | 3 | 
|  |     Sorry - I forgot to put the :H's in.
    
    D.
 |