ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

CLP program is not working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CLP program is not working

    Hello,

    i am a beginner in AS400 and i am working on CL programming. I am writing a code which is taking two lines and not getting accepted by SEU editor. we are getting error missing parenthesis. i think this is due to call function which is written in 2 lines. Could you please suggest a solution.

    Code:
    0001 PGM
    0002 CALL PGM(SLMQTESTD/SLMQFTOQ) PARM('-f' HFADEV110/ISASN856 '-i' USX
    0003 856I '-e' TESTD '-debug' 1)
    0004 END PGM

  • #2
    Re: CLP program is not working

    You need a plus sign + at the end of line 2 to tell it to continue to the next line, leave a space before the +. Another method for entering is to type CALL then press F4 to prompt, fill in all the parameters and press ENTER and it will format the command for you.

    Scott Mildenberger

    Comment


    • #3
      Re: CLP program is not working

      Hi ravikiran032:

      You also have to remove the space between end and pgm

      @scott....Nice job...I never would have thought of the F4

      Best of Luck
      GLS
      The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

      Comment


      • #4
        Re: CLP program is not working

        ... and please do not longer use the CLP Attribute for the source but CLLE otherwise you cannot use the enhancements within the CL language introduced since release V5R3 (such as loops, subroutines, data structures, integer data types, pointer, copy members, new string built-in-functions).

        Birgitta

        Comment


        • #5
          Re: CLP program is not working

          God! I love the smell of CL in the morning....
          All my answers were extracted from the "Big Dummy's Guide to the As400"
          and I take no responsibility for any of them.

          www.code400.com

          Comment


          • #6
            Re: CLP program is not working

            Hi,
            additionally, you have to enclose HFADEV110/ISASN856 between apostrophes (because it contains a slash)


            Originally posted by B.Hauser View Post
            ... and please do not longer use the CLP Attribute for the source but CLLE otherwise you cannot use the enhancements within the CL language introduced since release V5R3 (such as loops, subroutines, data structures, integer data types, pointer, copy members, new string built-in-functions).

            Birgitta
            I agree with you, usage of CLLE should be the rule today (especially when calling RPG/CBL/C ILE programs, to avoid issues with activation groups) !
            But the CLP enhancements since V5R3 (and the last ones in 7.1) are available in both ILE and OPM.
            What you can't use in OPM CLP is CALLPRC and COPYRIGHT
            Jean-Michel

            Comment


            • #7
              Re: CLP program is not working

              Thanks a lot for your help.

              Comment


              • #8
                Re: CLP program is not working

                I didn't expected such a fast reply.. thanks all.

                Comment


                • #9
                  Re: CLP program is not working

                  While I am trying to run the CLP program it is showing the error 'Input file not exist', even I have placed the file in the Input location(HFADEV110/ISASN856). please advise

                  Comment


                  • #10
                    Re: CLP program is not working

                    I'm guessing this error is reported by the SLMQFTOQ program that you're calling. Not sure that we can help you with that -- we're not farmiliar with how that program works.

                    Comment


                    • #11
                      Re: CLP program is not working

                      I have changed the calling program and ran the code. I have received a display saying CPF0001 received by MQTEST2 at 200. what does this mean, where can i check the details
                      0001 PGM
                      0002 CALL PGM(SLMQTESTD/FTOQ) PARM('-f' 'HFADEV110/ISASN856' '-i' USX +
                      0003 856I '-e' TESTD '-debug' 1)
                      0004 END PGM

                      Comment


                      • #12
                        Re: CLP program is not working

                        CPF0001 probably means 'program not found'

                        if you get any CPFxxxx messages - put your cursor on the message and press F1(HELP) for more information...

                        DSPJOBLOG will tell you a lot of other information as well....
                        predictably positive, permanently punctilious, purposely proactive, potentially priceless, primarily professional : projex

                        Comment


                        • #13
                          Re: CLP program is not working

                          The program should end with ENDPGM not "END PGM". This is the likely cause of the CPF0001. (Which means that an error occurred running a command -- most commonly, the command syntax was wrong... but you can check the job log for details.)

                          I've never heard of CPF0001 being sent in response to a program not being found -- but I guess it's possible?

                          Comment


                          • #14
                            Re: CLP program is not working

                            I could see the below report in spooled files, after modifying the program a bit. Can anyone please help me on this.. i would be thankful


                            PHP Code:
                            5722SS1 V5R4M0  060210                  Control Language         SLMQTESTD/MQ
                            Program 
                            . . . . . . . . . . . . . . . . . . . :   MQTEST3
                              Library 
                            . . . . . . . . . . . . . . . . . . :     SLMQTESTD
                            Source file 
                            . . . . . . . . . . . . . . . . . :   QCLSRC
                              Library 
                            . . . . . . . . . . . . . . . . . . :     SLMQTESTD
                            Source member name  
                            . . . . . . . . . . . . . :   MQTEST3   02/22/13 16:03:16
                            Source printing options 
                            . . . . . . . . . . . :   *SOURCE  *XREF  *GEN  *NOSE
                            Program generation options  
                            . . . . . . . . . :   *NOLIST  *NOXREF  *NOPATCH
                            User profile  
                            . . . . . . . . . . . . . . . . :   *USER
                            Program logging 
                            . . . . . . . . . . . . . . . :   *JOB
                            Allow RTVCLSRC command  
                            . . . . . . . . . . . :   *YES
                            Replace program 
                            . . . . . . . . . . . . . . . :   *YES
                            Target release  
                            . . . . . . . . . . . . . . . :   V5R4M0
                            Authority 
                            . . . . . . . . . . . . . . . . . . :   *LIBCRTAUT
                            Sort sequence 
                            . . . . . . . . . . . . . . . . :   *HEX
                            Language identifier 
                            . . . . . . . . . . . . . :   *JOBRUN
                             Text  
                            . . . . . . . . . . . . . . . . . . . . :
                             
                            Compiler  . . . . . . . . . . . . . . . . . . :   IBM Control Language Compil
                                                                  Control Language Source
                             SEQNBR  
                            *...+... ...+... ...+... ...+... ...+... ...+... ...+...
                                
                            100PGM
                                200
                            -  DCL        VAR(&FILETYPE(*CHARLEN(40)
                                
                            300-  DCL        VAR(&IDTYPE(*CHARLEN(12)
                                
                            400-  DCL        VAR(&ENVTYPE(*CHARLEN(12)
                                
                            500-  DCL        VAR(&DEBUGTYPE(*CHARLEN(1)
                                
                            600-  DCL        VAR(&RCVTYPE(*CHARLEN(30)
                                
                            700-
                                
                            800-  CHGVAR     &FILE   'ISASN856'
                                
                            900-  CHGVAR     &ID     'USX856I'
                               
                            1000-  CHGVAR     &ENV    'TESTD'
                               
                            1100-  CHGVAR     VAR(&DEBUGVALUE(1)
                               
                            1200-
                             
                            1300-   CALL  PGM(SLMQTESTD/FTOQPARM('-F' 'HFADEV110/ISASN856' +
                             
                            1400            '-I' &ID '-RC' &RCV '-E' &ENV '-DEBUG' &DEBUG)
                             
                            1500-                             ENDPGM
                                                         
                            * * * * *   E N D   O F   S O U R C E   * * * *
                            722SS1 V5R4M0  060210                  Control Language         SLMQTESTD/MQ
                                                                    Cross Reference
                            eclared Variables
                            ame                        Defined     Type            Length      Reference
                            DEBUG                         500      
                            *CHAR               1          1100
                            ENV                           400      
                            *CHAR              12          1000
                            FILE                          200      
                            *CHAR              40           800
                            ID                            300      
                            *CHAR              12           900
                            RCV                           600      
                            *CHAR              30          1300
                            CPD0791 00  No labels used in program
                            .
                                               * * * * *   
                            E N D   O F   C R O S S   R E F E R E N C E
                            722SS1 V5R4M0  060210                  Control Language         SLMQTESTD
                            /MQ
                                                                     Message Summary
                                          Severity
                            Total         0
                            -9  10-19  20-29  30-39  40-49  50-59  60-69  70-79  80-89  90
                                 1          1      0      0      0      0      0      0      0      0
                            Program MQTEST3 created in library SLMQTESTD on 02
                            /22/13 at 16:04:15.
                            Program MQTEST3 created in library SLMQTESTD
                            Maximum error severity 00. 

                            Comment


                            • #15
                              Re: CLP program is not working

                              The program compiled without error, everything is fine ???!? -- How can we help you?
                              All my answers were extracted from the "Big Dummy's Guide to the As400"
                              and I take no responsibility for any of them.

                              www.code400.com

                              Comment

                              Working...
                              X