phweb question specific to vms - solved

Daniel.Miller@nightfreight.co.uk Daniel.Miller@nightfreight.co.uk
Mon, 5 Jul 2004 11:52:18 +0100


hi there,

I asked the original question and it has indeed turned out to be a problem with CLOSE which i think is now solved.  Ive been using the CLOSE verb rather than the file statement option, sorry didnt see that would probably have sorted it too.

What concerned me most was that setting process level logicals in phweb might be a dangerous or unreliable technique but it does appear to work.

The problem has turned out to be my second screen which had CLOSE's in the EXIT procedure, which is working since i moved them to the POSTFIND procedure instead.  The HTMLFILECLOSE didnt seem to make any difference.



Heres a cut down sample anyway of the two programs anyway:


Page DM html application DM_APP activities ENTRY, FIND

Htmlbuttons "Add" label "Search", "Reset" label "Clear"


Temp T_FILE_NO  num*8
Temp T_PARM_NO  num*8


File PHWEB-PARMS-CONTROL designer

File PHWEB-PARMS designer
Access via PARM-NO using T_PARM_NO

Temp T-COMMAND char*240



;*** Temporary item fields here where user can enter part of an address ***

Field T_FILE_NO         htmlhidden
Field T_PARM_NO         htmlhidden

Nextpage DM2 after update &
        application DM_APP action "Search" passing T_FILE_NO, T_PARM_NO


Procedure internal GET-PARM-NO
Begin
        Lock PHWEB-PARMS-CONTROL
        Get PHWEB-PARMS-CONTROL via NF-LINK using "NF"

        Let T_FILE_NO = FILE-NO of PHWEB-PARMS-CONTROL

        If FILE-NO of PHWEB-PARMS-CONTROL < 99999999
        Then let FILE-NO of PHWEB-PARMS-CONTROL = &
                                        FILE-NO of PHWEB-PARMS-CONTROL + 1
        Else let FILE-NO of PHWEB-PARMS-CONTROL = 1

        Put PHWEB-PARMS-CONTROL reset
        Unlock PHWEB-PARMS-CONTROL
        Close PHWEB-PARMS-CONTROL

        If not setsystemval("PHWEB-PARMS", "PHWEB-PARMS" &
                                + ascii(T_FILE_NO,8) + ".TMP", LOGICAL)
        Then info " "
        Let T-COMMAND = "CREATE/FDL=NFD:PHWEB-PARMS.FDL PHWEB-PARMS" &
                                                + ascii(T_FILE_NO,8) + ".TMP"
        Run command T-COMMAND
        Let T_PARM_NO = 1
End

Procedure preupdate
Begin
        Do internal GET-PARM-NO

        ; extra processing to "put" to PHWEB-PARMS here:
        ; Passes temporary fields to an external procedure which returns
        ; a list of matching addresses, those addresses are then added to
        ; PHWEB-PARMS

        Close PHWEB-PARMS
        If not deletesystemval("PHWEB-PARMS", LOGICAL, "LNM$PROCESS")
        Then info " "
End



can clear
Set Ver Err
Set html buttons off

Page DM2 html application DM_APP &
                htmltitle "Address Search Results" &
                htmlreceiving T_FILE_NO, T_PARM_NO &
                activities FIND

Temp T_FILE_NO  num*8
Temp T_PARM_NO  num*8

File PHWEB-PARMS primary occurs 50
Access via PARM-NO using T_PARM_NO


Field T_FILE_NO htmlhidden
Field T_PARM_NO htmlhidden

Cluster occurs with PHWEB-PARMS

; *** address data from PHWEB-PARMS is displayed here ***

Cluster

Procedure POSTPATH
Begin
        If not setsystemval("PHWEB-PARMS", "PHWEB-PARMS" &
                                + ascii(T_FILE_NO,8) + ".TMP", LOGICAL)
        Then info " "
End

;Procedure EXIT
Procedure POSTFIND
Begin
        Close PHWEB-PARMS
        If not deletesystemval("PHWEB-PARMS", LOGICAL, "LNM$PROCESS")
        Then info " "
End