Page History
[ |../../index.htm#lansa/persist_e.htm]
現在地:
...
7.97.2 PERSIST の使用例
以下の例では、セッションが正常に開始されると、ユーザー ID が保持されます。これにより、後続の SRVROUTINES は追加の FIELD_MAP を作成せずにユーザーにアクセスできるようになります。
Persist Fields(#gUserID)
...
* Signin routine. If the user id is valid, the session will be activated
Srvroutine Name(Signin)
Field_Map For(*Input) Field(#User)
Field_Map For(*Input) Field(#Password)
Field_Map For(*Output) Field(#io$sts) Parameter_Name(Status)
...
#User := #User.Uppercase
...
If (#Com_owner.VerifyUser( #User #Password ))
...
#Com_owner.StartSession
#io$sts := OK
#gUserID := #User
...
Else
#io$sts := ER
...
Endif
Endroutine