------------------------------------------------------------------------------ TEST-SESSION-ID SECTION. *>------------------------------------------------------------------------------ INITIALIZE LNK-HTM2COB-SESSION-ID *> get remote address of the visitor MOVE "REMOTE_ADDR" TO LNK-ENV-NAME OF LNK-HTM2COB-ENV CALL "HTM2COB-ENV" USING LNK-HTM2COB-ENV END-CALL MOVE FUNCTION TRIM(LNK-ENV-VALUE OF LNK-HTM2COB-ENV) TO LNK-REMOTE-ADDR OF LNK-HTM2COB-SESSION-ID SET V-YES OF LNK-REMOTE-ADDR-FLAG OF LNK-HTM2COB-SESSION-ID TO TRUE DISPLAY " " END-DISPLAY DISPLAY "

    " "Input IP addr.: " LNK-REMOTE-ADDR OF LNK-HTM2COB-SESSION-ID "
    " "
    " "

" END-DISPLAY DISPLAY " " END-DISPLAY *> get http user agent of the visitor MOVE "HTTP_USER_AGENT" TO LNK-ENV-NAME OF LNK-HTM2COB-ENV CALL "HTM2COB-ENV" USING LNK-HTM2COB-ENV END-CALL MOVE FUNCTION TRIM(LNK-ENV-VALUE OF LNK-HTM2COB-ENV) TO LNK-HTTP-USER-AGENT OF LNK-HTM2COB-SESSION-ID SET V-YES OF LNK-HTTP-USER-AGENT-FLAG OF LNK-HTM2COB-SESSION-ID TO TRUE DISPLAY " " END-DISPLAY DISPLAY "

    " "Input user agent: " LNK-HTTP-USER-AGENT OF LNK-HTM2COB-SESSION-ID "
    " "
    " "

" END-DISPLAY DISPLAY " " END-DISPLAY PERFORM VARYING WS-IND-1 FROM 1 BY 1 UNTIL WS-IND-1 > 5 PERFORM TEST-CALL END-PERFORM . EXIT SECTION . *>------------------------------------------------------------------------------ TEST-CALL SECTION. *>------------------------------------------------------------------------------ CALL "HTM2COB-SESSION-ID" USING LNK-HTM2COB-SESSION-ID END-CALL DISPLAY "Call: " WS-IND-1 "
" END-DISPLAY DISPLAY "SESSION-ID-HEX : " TRIM(LNK-SESSION-ID-HEX OF LNK-HTM2COB-SESSION-ID) "
" END-DISPLAY DISPLAY "USER-AGENT-HASH-HEX: " TRIM(LNK-USER-AGENT-HASH-HEX OF LNK-HTM2COB-SESSION-ID) "
" "
" END-DISPLAY . EXIT SECTION . ?>