Skip to main content

Problem:

Scenario 1

When a program is built/compiled with SQL in it,  a pop-up window to enter my password is displayed (nothing strange about that).   

Once a correct password has been entered and later an SQL Wizard window is opened,  a pop-up window to enter my password is also displayed (nothing strange about that)  

Scenario 2

If choose tools -> sql for db2 -> logon and entering a valid password and then compile/build a program, NO pop-up window to enter my password is displayed (nothing strange about that either)

However, if  an SQL Wizard window is then opened, the SQL Wizard is opened and access to DB2 on the mainframe is automatically given (assumed), and no pop-up window is displayed to enter a password.

Why should this behaviour be different to scenario 1..?

Thinking is that once the connection has been made, that the SQL Wizard would open the same as in scenario 2.

Resolution:

The difference in behaviour has to do with a design decision that was made before MFE 1.1 was released.  

The COBOL SQL run time uses the MFDAEMON process within MFE to access stored user ID's and passwords.   So, by answering the pop up window from a compile or a run you are putting the user information into MFDAEMON and the COBOL SQL run time will always be able to access it there.

Since tools like SQLWizard can run outside of a project, they do not use MFDAEMON.  Instead, they use XDB specific tools name START40N and STOP40N.   These create a shared memory segment that also contains the user information.  

When you use the Login from the MFE menu, the function that gets called puts the user information into both MFDAEMON and START40N/STOP40N.  

Therefore, anything will work without prompting.

Old KB# 6666

#MFDS
#EnterpriseDeveloper