[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference vaxaxp::vmsnotes

Title:VAX and Alpha VMS
Notice:This is a new VMSnotes, please read note 2.1
Moderator:VAXAXP::BERNARDO
Created:Wed Jan 22 1997
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:703
Total number of notes:3722

489.0. "F$CVTIME with dd- not working on AlphaVMS" by CSC32::CAWOOD () Thu Apr 17 1997 20:46

    A customer's dcl cmd proc that uses a (valid) F$CVTIME call worked fine
    on a VAX system.  He brought it to an OpenVMS Alpha V7.1 system and the 
    F$CVTIME command fails here with IVATIME.

    We got the proc down to 3 lines which reproduces the problem on V7.1.

    $z = f$extract(2,2,"1997")
    $rep_day = "28"
    $dayofweek = f$cvtime("''rep_day'-","absolute","weekday")

    Actually if you hardcode 24 or above into the f$cvtime call, you only
    need 2 lines to reproduce.
    
    And on Alpha 6.2, a single call to f$cvtime with 24 or above fails -
    see below.

    On V7.1, if we comment out the f$extract line, or insert any command
    after the f$extract command, the f$cvtime cmd works! 

    This fails on Alpha V6.2 and above (different failing behavior on V6.2
    than V7.1 - see below).  It works fine on VAXs of various versions. 
    Not sure on Alpha prior to V6.2.

    Further testing shows you do not need to use a symbol as the input_time
    argument to reproduce.  You can just hardcode "28-" or...

    Any number up to 23 works, but 24 and above fails: (on Alpha V6.2)

       $dayofweek = f$cvtim("23-","absolute","weekday")

    returns "Thursday" in dayofweek as documented, however;

       $dayofweek = f$cvtim("24-","absolute","weekday")

    returns %DCL-W-IVATIME.

    It fails differently on V7.1 Alpha, than on V6.2 Alpha.  (again, works
    fine on all versions of VAX)

    Summary:
    
    Alpha 7.1: Works if the f$extract line is commented out, or if $SHOW
               TIME or any command? is inserted after the f$extract
               command, or if 23 or below is used.

    Alpha V6.2: A single call to f$cvtime with "24-" or above fails as noted 
                above.  Using 23 or below works.
    
    According to the 7.1 OpenVMS User's Manual, section 3.8.4, dd- is a
    valid use of absolute time.
T.RTitleUserPersonal
Name
DateLines
489.1????not reproducible hereAUSS::GARSONDECcharity Program OfficeFri Apr 18 1997 03:3923
re .0
    
>    Any number up to 23 works, but 24 and above fails: (on Alpha V6.2)
>
>       $dayofweek = f$cvtim("23-","absolute","weekday")
>
>    returns "Thursday" in dayofweek as documented, however;
    
    Sanity check: The intention of "23-" is the 23rd day of the current
    month, right?
    
    When I do this, I get "Wednesday", not "Thursday". Is this an old
    customer report pertaining to a prior month?

>       $dayofweek = f$cvtim("24-","absolute","weekday")
>
>    returns %DCL-W-IVATIME.
    
    I don't get this at all. I just get the right answer ("Thursday").
    
    Can you actually reproduce this on your system?
    
    I am using Alpha VMS V6.2 (as required by .0).
489.2COMEUP::SIMMONDSloose canonFri Apr 18 1997 05:054
    Re: .0
    Yep, I can reproduce this on Alpha V7.1 .. investigating..
    
    John.
489.3Fails for me too ...MARVIN::CARLINIFri Apr 18 1997 06:0021
    Re: .0, .1
    
    I CAN reproduce this on OpenVMS Alpha V6.2. Note that the seemingly
    irrelevant line
    
        $z = f$extract(2,2,"1997")
    
    is REQUIRED to reproduce this ... otherwise it works fine (i.e. no
    problem seen).
    
    "23-" is a perfectly valid absolute time, so is "24-". But perhaps DCL
    ends up thinking it is looking at the hours field somehow?
    
    Adding a second dash (i.e. explicit blank month) seems to work around
    the problem ("24--" is OK) but shouldn't be necessary.
    
    Has your V6.2 Alpha had the 10K day patch? (I don't manage mine, so I
    don't know).
    
    Antonio
    
489.4CSC32::CAWOODFri Apr 18 1997 20:2540
    Reply to .1:
    
    >    Sanity check: The intention of "23-" is the 23rd day of the current
    >    month, right?
    >    
    >    When I do this, I get "Wednesday", not "Thursday". Is this an old
    >    customer report pertaining to a prior month?
    
    My mistake.  My f$cvtime had "24-" and returned Thursday.
    
    Reply to .3:
    
    >    I CAN reproduce this on OpenVMS Alpha V6.2. Note that the seemingly
    >    irrelevant line
    >
    >    $z = f$extract(2,2,"1997")
    >
    >    is REQUIRED to reproduce this ... otherwise it works fine (i.e. no
    >    problem seen).
    
    I found f$extract is required on V7.1, but on a V6.2 system the single
    call to f$cvtime, without the preceding f$extract produces the error.
    
    >    Adding a second dash (i.e. explicit blank month) seems to work
    >    around the problem ("24--" is OK) but shouldn't be necessary.
    
    That's good to know, thanks.
    
    >    Has your V6.2 Alpha had the 10K day patch? (I don't manage mine,
    >    so I don't know).
    
    Neither the 6.2 nor the 7.1 system I tested this on has the delta time
    patch.  These are test systems.  I'll install the patch and let you
    know if nobody beats me to it.
    
    Should I IPMT this?  I'm guessing yes.
    
    Thanks,
    Greg
    
489.5COMEUP::SIMMONDSloose canonSat Apr 19 1997 06:554
    
.4>    Should I IPMT this?  I'm guessing yes.
    
    You should.
489.6me too nowAUSS::GARSONDECcharity Program OfficeSun Apr 20 1997 20:057
re .0
    
>    And on Alpha 6.2, a single call to f$cvtime with 24 or above fails -
>    see below.
    
    On V6.2 I still can't reproduce this but with the f$extract line
    (allegedly needed with V7.1) I can reproduce it (on V6.2).
489.7Also fails on OpenVMS/Alpha V6.1GIDDAY::GILLINGSa crucible of informative mistakesSun Apr 20 1997 23:4010
  Same result on OpenVMS/Alpha V6.1 (with 10K patch). The F$EXTRACT is
  required. Also reproduced on V6.2 and V7.1.

$z = f$extract(2,2,"1997")
$rep_day = "28"
$dayofweek = f$cvtime("''rep_day'-","absolute","weekday")
%DCL-W-IVATIME, invalid absolute time - use DD-MMM-YYYY:HH:MM:SS.CC format
 \28-\

						John Gillings, Sydney CSC
489.8a little <CTRL-T> will fix it!COMEUP::SIMMONDSloose canonMon Apr 21 1997 05:5222
    For grins (or groans..:) here's another quirky angle on this one..
    
$ write sys$output f$gets("version")
V6.2-1H3
$
$
$ y=f$extr(2,2,"1997")
$ z=f$cvti("24-",,)
%DCL-W-IVATIME, invalid absolute time - use DD-MMM-YYYY:HH:MM:SS.CC format
 \24-\
$
$ y=f$extr(2,2,"1997")
$ z=f$cvti("24-",,)		! <--- <CTRL-T> before pressing <RETURN>
TALKY1::_FTA91: 18:45:17   (DCL)   CPU=00:00:00.09 PF=182 IO=116 MEM=57
$ z=f$cvti("24-",,)		! <--- <RETURN>
$ sho symb z
  Z = "1997-04-24 00:00:00.00"
$ 
    
    Sure looks like inadvertent storage sharing somewhere..
    
    John.
489.9Keeps on working . . .TAY2P1::HOWARDWhoever it takesMon Apr 21 1997 11:5538
    Re: .8
    
    Works for me too (I have the Delta patch installed).  But it also keeps
    working:
    
    $ write sys$output f$gets("version")
    V6.2
    $ y=f$extr(2,2,"1997")
    $ z=f$cvti("24-",,)
    %DCL-W-IVATIME, invalid absolute time - use DD-MMM-YYYY:HH:MM:SS.CC
    format
     \24-\
    $ z=f$cvti("24-",,)
    %DCL-W-IVATIME, invalid absolute time - use DD-MMM-YYYY:HH:MM:SS.CC
    format
     \24-\
    $ z=f$cvti("24-",,)
    %DCL-W-IVATIME, invalid absolute time - use DD-MMM-YYYY:HH:MM:SS.CC
    format
     \24-\
    $ z=f$cvti("24-",,)
    TAY2P1::HOWARD_FTA22 10:52:08   (DCL)   CPU=00:01:05.47 PF=7063
    IO=232478 MEM=64
    
    $ z=f$cvti("24-",,)
    $ show sym z
      Z = "1997-04-24 00:00:00.00"
    $ z=f$cvti("24-",,)
    $ z=f$cvti("24-",,)
    $ z=f$cvti("24-",,)
    $ z=f$cvti("24-",,)
    $ z=f$cvti("24-",,)
    $ show sym z
      Z = "1997-04-24 00:00:00.00"
    $ z=f$cvti("21-",,)
    $ show sym z
      Z = "1997-04-21 00:00:00.00"
    
489.10IPMT request id HPAQ413YLCSC32::CAWOODTue Apr 29 1997 13:362
    IPMT Request ID = HPAQ413YL, QAR # 06174 in SPR_VMS_V5 database on node
    TRIFID.
489.1120 year old bug uncovered..COMEUP::SIMMONDSloose canonWed May 28 1997 22:290