Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

UDATE Problems in FTP

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

  • UDATE Problems in FTP

    It's probably selecting different FTP server jobs which have different start dates. The RPG manual says this about UDATE: For an interactive or batch program, the user date special words are set to the value of the Job Date when the program starts running in the system. The value of the user date special words are not updated during program execution even if the program runs over midnight or if the job is changed. Use the TIME operation code to obtain the time and date while the program is running.

  • #2
    UDATE Problems in FTP

    It is a common misconception to associate UDATE with the system date. In fact, UDATE uses the date of the job, not of the system. Whenever the job was submitted, that's what UDATE will pick up. If you are using the TIME opcode, expand the result to 12 bytes numeric. You will then receive the system date, and the system time. Dave

    Comment


    • #3
      UDATE Problems in FTP

      Another trip to the forums to get a question answered. . . . We are running programs through an FTP session using the "quo rcmd" statement. Our RPG programs use UDATE to write reports and to fill date fields. Unfortunately, the programs are getting a UDATE that is earlier than the system date and is randomly between 3-6 prior. For the time being, I'm getting the right date by submitting the program calls rather than calling them. I believe the problem stems from having to call these programs out of an FTP subsystem rather than a conventional interactive subsystem. Am I correct or is there a different issue in play? Assuming I'm right about this, I'm concerned about executing a TFRJOB command because I don't want to deleteriously affect our other FTP processes. If there is any possible problem that I could cause, I'll ask these questions here rather than experiment on our system. This problem only affects UDATE; the system time is accurate. Any answers, as always, are greatly appreciated.

      Comment


      • #4
        UDATE Problems in FTP

        Another option to get the date in an RPG program is the %Date built-in-function. When used with no parms, it returns the current date. It makes the code more obvious that you are getting the date rather than the time. It does return a true date field rather than a character or number field. eval wrkDate = %date()

        Comment

        Working...
        X