ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

sequel question

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

  • sequel question

    I have these sequel statements to download a physical file to excel, I need to attach system time to the end of the file name to make it unique. File name is FILEA and time is &TIME. Could some one show me how to attach &time to FILEA. Thanks.

    SEQUEL/EXECUTE SQL('SELECT * FROM QTEMP/FILEA') +
    PCFMT(*XLS) TOSTMF(FILEA.XLS) +
    REPLACE(*YES)

  • #2
    Re: sequel question

    Code:
    dcl &file *char(30)
    dcl &time *char(6)
    
    rtvsysval qtime &time
    chgvar &file value('filea' *cat &time *cat '.xls')
    
    sequel/execute sql('select * from qtemp/filea') + 
    pcfmt(*xls) tostmf(&file) + 
    replace(*yes)
    Patrick

    Comment


    • #3
      Re: sequel question

      This works fine. Thank you again.

      Comment

      Working...
      X