× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




A few people (and I think *very few people*) know how to write in MI code.
I don't think it's for the feint of heart:

sample from
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/apis/MIcompro.htm

<snip>
DCL SPCPTR MSG_KEY@  INIT(MSG_KEY);
DCL DD ERR_COD       BIN( 4)  INIT(0);
DCL SPCPTR ERR_COD@  INIT(ERR_COD);
DCL OL QMHSNDMOL (MSG_ID@, MSG_FILE@, MSG_TEXT@, MSG_SIZE@,
                  MSG_TYPE@, MSG_QS@, MSG_QSN@, REPLY_Q@,
                  MSG_KEY@, ERR_COD@) ARG;

/* Start the instruction stream                                    */

/* Materialize the amount of storage needed to store object info   */

            MATCTX     S_RECEIVER@, QTEMP@, MATCTXOPTS;

/* If no objects are in the library, then exit                     */

            CMPNV(B)   S_BYTAVL, 96 / EQ(DONE);

/* Allocate the necessary storage (we could also have used CRTS
   to allocate the storage and a SPCPTR to the space for the
   large receiver variable)                                         */

            MODASA     L_RECEIVER@, S_BYTAVL;

/* Set the bytes provided field to indicate the allocated storage  */

            CPYNV      L_BYTPRV, S_BYTAVL;

/* Materialize the objects within the library                      */

            MATCTX     L_RECEIVER@, QTEMP@, MATCTXOPTS;

/* Calculate how many objects were returned:                       */
/* 1. Find the lower of bytes provided and bytes available         */
/*    (L_BYTPRV and L_BYTAVL) as the number of objects could have  */
/*    changed since the first materialize                          */
/* 2. Subtract the size of the fixed MATCTX header (96)            */
/* 3. Divide the remainder by the size of each entry returned      */

            CMPNV(B)   L_BYTPRV, L_BYTAVL / HI(ITS_AVL);
            CPYNV      SIZE, L_BYTPRV;
            B          CONTINUE;
ITS_AVL:    CPYNV      SIZE, L_BYTAVL;
CONTINUE:   SUBN(SB)   SIZE, 96 / ZER(DONE);
            DIV        SIZE, SIZE, 32;

/* Address the first object returned                               */

            SETSPP     OBJ_ENTRY@, L_ENTRY;

/* Loop through all materialized entries                           */

MORE:

/* Convert the hex object type and subtype to character form       */

            CVTHC      OBJ_INFO_C, OBJ_INFO_X;

/* Copy the object name to the message variable                    */

            CPYBLA     OBJ_NAME_T, OBJ_NAME;

/* Unconstrain the array bounds (at compile time)                  */

            OVRPGATR   1,3;

/* Send a message to caller's msg queue containing the object info */

            CALLX      SEPT(4267), QMHSNDMOL, *;

/* resume normal array constraint                                  */

            OVRPGATR   1,4;

/* and move on to the next entry                                   */

            ADDN(S)    NUM_DONE, 1;
            ADDSPP     OBJ_ENTRY@, OBJ_ENTRY@, 32;
            CMPNV(B)   NUM_DONE, SIZE / LO(MORE);

/* When all entries are processed, end the program.                */
/*                                                                 */
/* Note that this program may not actually display all objects     */
/* in QTEMP.  If L_BYTAVL is greater than L_BYTPRV, additional     */
/* objects were inserted into QTEMP between the time of the        */
/* "small" MATCTX and the "large" MATCTX.  The processing of these */
/* additional objects is not addressed in this program and is      */
/* the responsibility of the user of this program.                 */
/*                                                                 */

DONE:       RTX        *;
            PEND;

Scott Lindstrom



                                                                           
             "Michael                                                      
             Rosinger"                                                     
             <mrosinger@cciws.                                          To 
             com>                      cobol400-l@xxxxxxxxxxxx             
             Sent by:                                                   cc 
             cobol400-l-bounce                                             
             s@xxxxxxxxxxxx                                        Subject 
                                       Re: [COBOL400-L] COBOL/ILE          
                                       questions                           
             08/23/2006 09:41                                              
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
             COBOL Programming                                             
                  on the                                                   
               iSeries/AS400                                               
             <cobol400-l@midra                                             
                 nge.com>                                                  
                                                                           
                                                                           




Thanks Terry. That is a good resource.

Here's another migration question for you (and anyone else that wants to
chime in).

What is the equivalent of Assembler on iSeries? Correct me if I am wrong,
but it is my understanding that there is no Assembler on iSeries. We have
several callable utility sub-routines that are written in Assembler. The
reason Assembler is the best choice for these things on the mainframe is
its
efficiency and speed for things that are called many times by many
programs.
So if these routines have to be rewritten, what language would be best
suited?

--
Regards,

Michael Rosinger
Systems Programmer / DBA
Computer Credit, Inc.
640 West Fourth Street
Winston-Salem, NC  27101
336-761-1524
m rosinger at cciws dot com
"Winchester Terry" <terry.winchester@xxxxxxxxxxxxxxx> wrote in message
news:mailman.667.1156336347.5750.cobol400-l@xxxxxxxxxxxxxxx
Here's a direct link:

http://www.systeminetwork.com/resources/code/misccode/cobolcode/

Terry Winchester
Programmer/Analyst






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.