ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Spool File Expiration

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

  • Spool File Expiration

    Hello,

    I was looking into making spool files expire, since the system I manage creates hundreds of spool files daily.
    My only concern is that doing so would mark open files as expired, which would cause them to be deleted when I run DLTEXPSPLF.
    I tried searching on Google and couldn't find much so I'm hoping someone here knows.

    Any help would be greatly appreciated!

  • #2
    How about dumping all non-OPEN spool files info to a temp table, then read those records in a loop and mark them expired based on some criteria ?

    INSERT INTO MyTempTable
    SELECT * FROM TABLE(QSYS2.SPOOLED_FILE_INFO(USER_NAME => '*ALL'))
    where STATUS <> 'OPEN'​
    Last edited by MFisher; 2 weeks ago.

    Comment

    Working...
    X