PASSPORT Knowledge Base
Macros

Date Published: March 20, 2009

Title

Resetting a password based on a user id located in a URL

Product

PASSPORT PC to Host, PASSPORT Web to Host

Emulation Types

TN3270, TN5250, VT, SCO ANSI, Wyse 60

Issue

I would like to specify a variable in a URL that takes the user’s ID and passes it through and resets his or her ID.  Can this be accomplished with a PASSPORT macro?

Solution

Below is a sample macro that will read the User ID in a URL and pass it into the mainframe session:

 

Sub ZMain()

 

  Dim strText, nRet, path, parts

  Dim nSessionCount

  Dim i

 

For i = 1 To nSessionCount

    strText = strText & "Session Full Profile Name = " & ItemFullName(i) & vbCRLF   

 Next

 path = ItemFullName(i)

 parts = split(path,"+username=")

 MsgBox parts(ubound(parts))

 

End Sub

More Information

Keywords

macro, read, userid, variable, URL, pass, mainframe, session, password, resets