PreviousNext
Help > 32-bit version of the RAD Studio IDE > Advanced Security Features > Easycom For Delphi program protection
Easycom For Delphi program protection

 In some situations, protection is not made on AS/400 files, but on AS/400 programs (some users will be only able to use some programs).

 

This will allow to restrict the access of the AS/400 to a specific selection of PC programs. This restriction is configured on the AS/400 side.

In other words: by giving the right password(s) to the right developers, you can avoid unauthorized developers to write unauthorized programs.

 

So, you can set-up a controlling program that will receive the EAC_UNLOCK value in a parameter. So, application that do not know the appropriate value, will not be able to use ACE/400.

 

Here are details on how to use this feature.

 

You can do the following steps:

 

Step1 : Configure EASYCOM server in a LOCKED mode

 

It is done with the CFGEAC command on AS/400.

 

Do :

CHGCURLIB EASYCOM

CFGEAC

 

It will show you the following screen:

 

Easycom server library name  EASYCOM  

Easycom server job priority  0   
TCP/IP Keep Alive frequency  120   
Delay before asking again pwd  0   

Delay before automatic SIGNOFF  0   

Easycom Log File level   0   
Print the clock in Log File  *NO   

Automatic Keep Alive start  *YES  

Detailed Job Log   *NO   

Lock Easycom host   *YES   

 

If the option ‘Lock Easycom host’ is set to *YES, by default no files can be accessed and no AS/400 programs or commands can be executed. The Easycom server can be unlocked remotely by a password sent by the PC application.

 

 

Step 2 : Make a validation program

 

When the password is sent from the PC, the Easycom server will call a program named EACP003 in *LIBL.

Here is a sample on how to make the validation program.

 

PGM PARM(&PASSW &RESULT)

DCL VAR(&PASSW) TYPE(*CHAR) LEN(100)

DCL VAR(&RESULT) TYPE(*CHAR) LEN(10)

/* IF PASSW HAS THE RIGHT VALUE */

CHGVAR VAR(&RESULT) VALUES('*YES')

/* IF PASSW DOES NOT HAVE THE RIGHT VALUE */

CHGVAR VAR(&RESULT) VALUES('*NO')

 

 

Step 3 : Put the password in your Delphi Application

 

Use the EAC_UNLOCK option to put the right unlock password. You can set-up this option using the TDatabase component in your application.

 

Because EACP003 is called by EASYCOM, you also can control the current user (by a RTVJOBA in EACP003). You also can decide to assign an unlock password for a set of users.

You also can decide to use a different password for each PC application. Doing this you can decide in the EACP003 program if a particular user can use a particular program (because the password will identify the PC program).

 

Important note:

 

Be aware of TBatchMove component limitations.

 

TBatchMove does not create indexes for the destination table, and field types are automatically matched with source field types, which can lead to problems trying to create non-supported field types in the AS/400 or transferring empty date fields.

 

You will probably use native AS/400 tools to create and manage AS/400 tables, but we wanted to provide you with maximum compatibility with existing Delphi components.