RPGLE service

350 pts.
Tags:
Application servers
AS/400
AS400 RPGLE
RPGLE
hi This is my application use service program in this 4 modules are there all modules proto type declaration in one program, (1)addmodule (2)submodule (3)mulmodule (4)divmodule (5)calproto (6)calcp (7)calfm (8)calmain my problem is how to handled this all programs in order how to execute this all programs (1)addmodule it contain one procedure SEU==>                                                               ADDMODULE FMT H  HKeywords++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++        *************** Beginning of data ************************************* 001.00 h*nomain alwnull(*usrctl)                                                002.00 hfixnbr(*zoned:*inputpacked)                                             003.00 hdebug(*yes)                                                             004.00 hOption(*nodebugio)                                                      005.00 d/define addprocess                                                      006.00 d/copy madhu,calproto                                                    007.00 d/undefine addprocess                                                    008.00 paddprocess       b                   export                             009.00 daddprocess       pi             4  0                                    010.00 dxxfno                           3  0                                    011.00 dxxsno                           3  0                                    012.00 dxxtot                           4  0                                    013.00  /free                                                                   014.00   xxtot=xxfno+xxsno;                                                     015.00   Return xxtot;                                                          016.00  /End-free                                                              0017.00 paddprocess       e (2)submodule it contain one procedure  Columns . . . :    6  76            Edit                            IBM1/MADHU  SEU==>                                                               SUBMODULE  FMT H  HKeywords++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++         *************** Beginning of data ************************************* 0001.00 h*nomain alwnull(*usrctl)                                               0002.00 hfixnbr(*zoned:*inputpacked)                                            0003.00 hdebug(*yes)                                                            0004.00 hOption(*nodebugio)                                                     0005.00 d/define subprocess                                                     0006.00 d/copy madhu,calproto                                                   0007.00 d/undefine subprocess                                                   0008.00 psubprocess       b                   export                            0009.00 dsubprocess       pi             4  0                                   0010.00 dxxfno                           3  0                                   0011.00 dxxsno                           3  0                                   0012.00 dxxtot                           4  0                                   0013.00  /free                                                                  0014.00   xxtot=xxfno-xxsno;                                                    0015.00   Return xxtot;                                                         0016.00  /End-free                                                              0017.00 psubprocess       e   (3)mulmodule it contain one procedure  SEU==>                                                               MULMODULE  FMT H  HKeywords++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++         *************** Beginning of data ************************************* 0001.00 h*nomain alwnull(*usrctl)                                               0002.00 hfixnbr(*zoned:*inputpacked)                                            0003.00 hdebug(*yes)                                                            0004.00 hOption(*nodebugio)                                                     0005.00 d/define mulprocess                                                     0006.00 d/copy madhu,calproto                                                   0007.00 d/undefine mulprocess                                                   0008.00 pmulprocess       b                   export                            0009.00 dmulprocess       pi             4  0                                   0010.00 dxxfno                           3  0                                   0011.00 dxxsno                           3  0                                   0012.00 dxxtot                           4  0                                   0013.00  /free                                                                  0014.00   xxtot=xxfno*xxsno;                                                    0015.00   Return xxtot;                                                         0016.00  /End-free                                                              0017.00 pmulprocess       e  (4)divmodule it contain one procedure SEU==>                                                               DIVMODULE FMT H  HKeywords++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++        *************** Beginning of data ************************************* 001.00 h*nomain alwnull(*usrctl)                                               002.00 hfixnbr(*zoned:*inputpacked)                                            003.00 hdebug(*yes)                                                            004.00 hOption(*nodebugio)                                                     005.00 d/define divprocess                                                     006.00 d/copy madhu,calproto                                                   007.00 d/undefine divprocess                                                   008.00 pdivprocess       b                   export                            009.00 ddivprocess       pi             4  0                                   010.00 dxxfno                           3  0                                   011.00 dxxsno                           3  0                                   012.00 dxxtot                           4  0                                   013.00  /free                                                                  014.00   xxtot=xxfno/xxsno;                                                    015.00   Return xxtot;                                                         016.00  /End-free                                                              017.00 pdivprocess       e     (5)this proto type declaration of procedure SEU==>                                                                CALPROTO FMT H  HKeywords++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++        *************** Beginning of data ************************************* 001.00 H*DFTACTGRP(*yes)                                                       002.00 d/if defined(addprocess)                                                003.00 Daddprocess       pr             4  0 extproc('addprocess')             004.00 Dxxfno                           3  0                                   005.00 Dxxsno                           3  0                                   006.00 Dxxtot                           4  0                                   007.00 d/endif                                                                 008.00 d*                                                                      009.00 d/if defined(subprocess)                                                010.00 Dsubprocess       pr             4  0 extproc('subprocess')             011.00 Dxxfno                           3  0                                   012.00 Dxxsno                           3  0                                   013.00 Dxxtot                           4  0                                   014.00 d/endif                                                                 015.00 d*                                                                      016.00 d/if defined(mulprocess)                 010.00 Dmulprocess       pr             4  0 extproc('mulprocess')  004.00 Dxxfno                           3  0                                   005.00 Dxxsno                           3  0                                   006.00 Dxxtot                           4  0                                   007.00 d/endif                                                                 008.00 d*                                                                      009.00 d/if defined(divprocess)                                                010.00 Ddivprocess       pr             4  0 extproc('divprocess')             011.00 Dxxfno                           3  0                                   012.00 Dxxsno                           3  0                                   013.00 Dxxtot                           4  0                                   014.00 d/endif                                                                                                                                    (6)Error handling foe infds datastruct for all programs  FMT D  DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++         *************** Beginning of data ************************* 0001.00 dinfds_pgm       sds                  qualified            0002.00 dpgmname                  1     10                         0003.00 dpgmstat            *status                                0004.00 dpgmparms           *parms                                 0005.00 dpgmroutine         *routine                               0006.00 dpgmline#                21     28                         0007.00 dpgmmsgid                40     46                         0008.00 dpgmmsgtx                91    170                         0009.00 dpgmjobnam              244    253                         0010.00 dpgmjobuserid           254    263                         0011.00 dpgmjobnbr              264    269  0                      0012.00 dpgmparent              334    343                         0013.00 dpgmmodule              344    353                         0014.00 dpgmuserid              358    367                         0015.00 dexcepttype              40     42                         0016.00 dexceptnbr               43     46            0017.00 dexceptid               171    174        0018.00 C                   EVAL      *INLR=*ON   (7)this is the display file for calmain program         *************** Beginning of data ************************************* 0000.10      A*%%TS  SD  20110326  141814  IBM         REL-V5R3M0  5722-WDS     0000.20      A*%%EC                                                             0000.30      A                                      DSPSIZ(24 80 *DS3)          0000.40      A          R CALRCD                                                0000.50      A*%%TS  SD  20110326  141814  IBM         REL-V5R3M0  5722-WDS     0000.60      A                                      CA03(03 'EXIT')             0000.70      A                                      CF04(04 'REFRESH')          0000.80      A                                  4 29'ARTHIMETIC OPERATIONS'     0000.90      A                                  6  8'ENTER FIRST NO :'          0001.00      A                                  6 49'ENTER 2ND NO:'             0001.10      A                                  8 24'1.ADDITION'                0001.20      A                                 10 24'2.SUBTRACTION'             0001.30      A                                 12 24'3.MULTIPLICATION'          0001.40      A                                 14 24'4.DIVISION'                0001.50      A                                 16 14'ENTER OPTION :'            0001.60      A                                 19 23'RESULT  :'    0001.60      A                                 19 23'RESULT  :'         0001.70      A                                 23  8'F3=EXIT'           0001.80      A                                 23 18'F5=REFRESH'        0001.90      A                                  2 68DATE                0002.00      A                                      EDTCDE(Y)           0002.10      A                                  4 68TIME                0002.20      A                                  2  4'USER:'             0002.30      A                                  4  4'PGM :'             0002.40      A            XUSER         10A  B  2 10                    0002.50      A            XPGM          10A  B  4 10                    0002.60      A            XFNO           3Y 0B  6 25EDTCDE(4)               0002.70      A            XSNO           3Y 0B  6 63EDTCDE(4)               0002.80      A            XOPT           1Y 0B 16 29EDTCDE(4)               0002.90      A            XTOT           4Y 0B 19 33EDTCDE(4)               0003.00      A            XMSG          50   O 21  7                        (8)this is main program in this use service program  Columns . . . :    6  76            Edit                            IBM1/MADHU  SEU==>                                                                 CALMAIN  FMT H  HKeywords++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++         *************** Beginning of data ************************************* 0001.00 hoption(*nodebugio)                                                     0002.00 fcalFM     cf   e             workstn                                   0003.00 d/copy madhu,calcp                                                      0004.00 d/define addprocess                                                     0005.00 d/define subprocess                                                     0006.00 d/define mulprocess                                                     0007.00 d/define divprocess                                                     0008.00 d/copy madhu,calproto                                                   0009.00 d/undefine addprocess                                                   0010.00 d/undefine subprocess                                                   0011.00 d/undefine mulprocess                                                   0012.00 d/undefine divprocess                                                   0013.00 dmsg1             s             50a   inz('option must be 1/2/3/4')     0014.00  /free                                                                  0015.00    dow *in03<>*on;                                                      0016.00    xpgm=infds_pgm.pgmname;                                              0017.00    xuser=infds_pgm.pgmjobuserid;                       0018.00    xopt=0;                                             0019.00    exfmt calrcd;                                       0020.00    *in04=*off;                                         0021.00    xmsg=*blanks;                                       0022.00    select;                                             0023.00    when xopt=1;                                        0024.00    addprocess(xfno:xsno:xtot);                         0025.00    when xopt=2;                                        0026.00    subprocess(xfno:xsno:xtot);                         0027.00    when xopt=3;                                        0028.00    mulprocess(xfno:xsno:xtot);                         0029.00    when xopt=4;                                        0030.00    divprocess(xfno:xsno:xtot);                         0031.00    other;                                              0032.00    *in04=*on;                                          0033.00    xmsg=msg1;                                          0034.00    endsl;                                              0035.00    enddo;                       0036.00    *inlr=*on;                   0037.00   /end-free;                                                                                                                                                                                                                       

Software/Hardware used:
software

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    In your CALMAIN source, I see this line:
    d/copy madhu,calcp
    But I don't see a CALCP member in your list. Is that the "infds" member? In the "infds" member, I see this line:
    C                   EVAL      *INLR=*ON 
    But that's a member for D-specs, data definitions. You can't have a C-spec line in the D-spec section of any module. Tom
    125,585 pointsBadges:
    report
  • madhuchowdary
    but, in calcp rpogram how to end i am not use the c eval *inlr=*on it showing error ,how to terminate the program please give me any suggestions
    350 pointsBadges:
    report
  • TomLiotta
    ...in calcp rpogram... What is "calcp"? I don't see it anywhere. We need to see what calcp is. The only thing that seems to be calcp is the code that you described as "infds", but that's not enough to be a program. Tom
    125,585 pointsBadges:
    report
  • madhuchowdary
    calcp is the error handling program name.it is a common for all programs.but my problem is not there. my problem is (1)calmian program does not access the 4 modules. i am creating a binding directory use the coomand is crtbnddir after add these 4modules add to binding directory binding directory name is bnd1 Display Binding Directory Binding Directory: BND1 Library: IBM1 --------Creation--------- Object Type Library Date Time ADDMODULE *MODULE IBM1 03/30/11 06:20:55 SUBMODULE *MODULE IBM1 03/28/11 16:21:04 MULMODULE *MODULE IBM1 03/28/11 16:20:50 DIVMODULE *MODULE IBM1 03/28/11 16:20:43 CALSRV1 *SRVPGM *LIBL 03/29/11 15:18:30
    350 pointsBadges:
    report
  • TomLiotta
    my problem is (1)calmian program does not access the 4 modules. Okay, then what does it do instead? What errors do you see? When do you see the errors? What commands are you running that result in errors? If there are no errors, what leads you to believing that the service program does not consist of those modules? A service program doesn't do anything until it is activated by a program. What program activates calmain? Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    CALSRV1 *SRVPGM *LIBL 03/29/11 15:18:30 I am re-reading this question to see if anything new has been added that I missed. I just now noticed the line above from the binding directory. That is the first time that CALSRV1 was even mentioned in the question. Is CALSRV1 the *SRVPGM that you want to reference? If so, what are the CRTPGM command parameters that are used when you bind everything? The *MODULEs are in the same binding directory as the *SRVPGM. The resulting *PGM can reference the *SRVPGM or it can reference the *MODULES, depending on how you code CRTPGM. Tom Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following