ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

CL program

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

  • #16
    It's blank. so what does it indicate?

    Thanks..

    Comment


    • #17
      I tested the code you posted and it works fine. Is this a copy of the code you have?
      If &YYMD is blank, something else is wrong with your code as &YYMD should contain the system date in yyyymmdd format just before the call to CEEDAYS.

      Comment


      • #18
        Originally posted by John192 View Post
        It's blank. so what does it indicate?
        Hmmm... just to be sure we are communicating and understanding each other. This is the code I'm referring to:

        Code:
        .
        .
        RTVSYSVAL  SYSVAL(QDATE) RTNVAR(&QDATE)      
        CVTDAT     DATE(&QDATE) TOVAR(&YYMD) FROMFMT(*SYSVAL) +
                           TOFMT(*YYMD) TOSEP(*NONE)        
        
        /* ... breakpoint here ... */
        
        CALLPRC PRC(CEEDAYS) PARM(&YYMD 'YYYYMMDD' &LILIAN *OMIT)
        .
        .
        You say that you set a breakpoint at the position where I put the comment, above, and the &YYMD variable is blank?

        That shouldn't be possible. The CVTDAT command should be outputting a proper date. Either you've changed the code and it works differently than you are saying, or you have a modified copy of the CVTDAT command that doesn't work the way IBM's original version does.

        Comment


        • #19
          sorry, it's today's date and have value as '20210119'. but immedaiate after this gives error 'timestamp picture mismatch' the moment debugger proceeds to this satement
          'callprc prc(ceedays) parm (&yymd 'yyyymmdd' &lilian *omit)


          Thanks..

          Comment


          • #20
            I believe the parameter for the date format has to be passed as all uppercase: 'YYYYMMDD' instead of 'yyyymmdd'.

            Comment

            Working...
            X