01 - Programming (EN)01d - Rational RDi and other tools (EN)


Last Updated on 30 April 2020 by Roberto De Pedrini

In general, RPG and COBOL programmers are not used to working under the control of an ALM (Application Lifecycle Management) or version management software. In the past I was lucky enough to use one of these products (it was Softlanding’s Turnover) and I must say that now that I no longer use it I miss it. Whatever the reason for this non-choice – money, laziness or simple ignorance – all RPG and COBOL programmers working in a team have the problem of allocating an origin member to prevent multiple people working on the same origin member by stomping their feet. Many got by creating a simple check-out command at home and modifying the STRSEU command to prevent the second programmer from accessing the origin member. But how do you get the same result from RDi? Years ago, with an RFE, I asked IBM to add some ‘exit points’ to be used to create a simple ALM at home, but of course IBM declined. I continued to investigate and finally I came to find that the communication between RDi and IBM i is the classic distributed data management (DDM), then it passes through the program specified in the DDMACC (DDM / DRDA request access) parameter of the network attributes, which can be set with the following command:

CHGNETA DDMACC (library / program)

The changes to this parameter are effective immediately and refer to the DDM and DRDA applications. Jobs currently running on the system do not use the new value, because the DDMACC value is accessed only when a job is started for the first time, so RDi must be disconnected and reconnected from the IBM i server. It is clear that such a solution can only be considered if development takes place on a dedicated server and not on the production server.

The program receives a parameter with some information – including user profile, library, source file, source member and type of request – and returns a flag which can take two values: * ON = request accepted; * OFF = request rejected.

Here is an example of a DDMACC program:

     ************************************************** *************************
     ** Access request DDM / DRDA (DDMACC) command CHGNETA.
     ************************************************** *************************


     ************************************************** *************************
     ** Fields
     ************************************************** *************************

     DreturnCode S 1A
     Desito S 1A
     DmembroEditable S N

     ************************************************** *************************
     ** Data structures
     ************************************************** *************************

     DddmRequest DS QUALIFIED
     D input 1A
     D output 1A
     D update 1A
     D delete 1A
     Dvalues DS QUALIFIED
     D user 10A
     D application 10A
     D subApplication 10A
     D objectName 10A
     D objectLibrary 10A
     D member 10A
     D format 10A
     D length 5S 0
     D sourceRemoteLocation ...
     D 10A
     D sourceSystemName ...
     D 10A
     D other 2000A

     ************************************************** *************************
     ** Constants
     ************************************************** *************************

     D C * ON
     D C * OFF

     ************************************************** *************************
     ** Parameters
     ************************************************** *************************
     C PARM returnCode
     C PARM values

     ************************************************** *************************
     ** Main
     ************************************************** *************************

       * INLR = * ON;
       returnCode = REQUEST_ACCEPTED;

       IF values.application <> '* DDM' OR values.subApplication <> 'OPEN';
         RETURN; // I'm not interested in the request: request accepted.

       IF values.member> = 'RSE0000000' AND values.member <= 'RSE9999999';
         RETURN; // Working members created by RDi.

       ddmRequest = values.other;

       IF ddmRequest.input = * ON;
         RETURN; // It's a read-only request: request accepted.

       // Enter the source member checkout check here.
       // For example, check that the source member is in the development library.

       IF values.objectLibrary = 'DEVELOPMENT'; 
         RETURN; // Request accepted.

       // If I get here the request is to be rejected.

       returnCode = REQUEST_REJECTED;

In the event of a request rejected in RDi, this somewhat cryptic message appears, so I recommend that you also notify the user with an email:

Related Posts
Alternative to OVRDBF in F specifications (dcl-f free)

It is not new to RPG but every now and then it is useful to remember that if we want Read more

ILE Debugger (STRDBG) and Screen Size

When we use the 5250 ILE Debugger interface (waiting for a Debugger for VsCode or a faster version of the Read more

Check Larger Files (Tables) in a library list

Suppose we want to keep files under control (we should get used to calling them Tables, like the rest of Read more

Security pills: Check User with the default password

I welcome Steve Pitcher's suggestion from this Linkedin Post: a simple SQL statement to get the list of users with Read more

About author

IBM i software developer

1 Comment

Leave a Reply

Your email address will not be published.