Fileshare クライアント ユーザー ID およびパスワードの指定例

この例では、Fileshare サーバーにユーザー ID とパスワードを指定するプログラムをコーディングする方法を示します。

 working-storage section.
 01 function-code pic x comp-x.
 01 user-name  pic x(100).
 01 user-password pic x(100).
  ...
 procedure division.
      ...
     move 1 to function-code
     move "UserID" to user-name
     move "Password" to user-password
     call "fhrdrlngpwd" using function-code, user-name, user-password
     end-call
      ...
     open output testfile
注: この例では、長いユーザー名およびパスワードをサポートしています。