start or resume session PERFORM HTM2COB-SESS-START DISPLAY "

    HTM2COB-HIDDEN-SESSION-ID: " HTM2COB-HIDDEN-SESSION-ID"

" *> regenerate session PERFORM HTM2COB-SESS-REGENERATE DISPLAY "
after regenerate session" DISPLAY "

    HTM2COB-HIDDEN-SESSION-ID: " HTM2COB-HIDDEN-SESSION-ID"

" *> check whether within the session MOVE "name" TO HTM2COB-SESS-VAR-NAME PERFORM HTM2COB-SESS-GET IF NOT V-OK OF LNK-RESULT OF LNK-HTM2COB-SESSION THEN DISPLAY "

No access

" *> you can use a sample link also *> DISPLAY "Login page
" DISPLAY '

' DISPLAY '' DISPLAY '' DISPLAY '' DISPLAY '' DISPLAY '

' *> slash with concatenate, because of the htm2cob preprocessor DISPLAY "" "" GOBACK END-IF ?>

### Any page 2

read name from session MOVE "name" TO HTM2COB-SESS-VAR-NAME PERFORM HTM2COB-SESS-GET MOVE HTM2COB-SESS-VAR-VALUE TO WS-NAME *> filter special chars, before display text CALL "HTM2COB-SPEC-CHARS" USING WS-NAME, HTM-NAME END-CALL *> welcome user DISPLAY "Hello " TRIM(HTM-NAME) "
" ?>

"/>

"/>

"/>

Session regenerate login start page

COBOL variables 01 ws-name pic x(20). 01 htm-name pic x(20). ?>