Any interest in spool file browser?
I was thinking about casually exploring adding an additional browser for browsing spool files similar to the member, IFS, and object browsers this week after work when I found the time.
I would gather the tree items using QSYS2.OUTPUT_QUEUE_ENTRIES.
Starting functionality would just be viewing and deleting spool files.
Possible functionality:
- view spool file as PDF (open OS default PDF viewer) using
CPYSPLF FILE(TEST1) TOFILE(*TOSTMF) SPLNBR(*LAST) TOSTMF('/MyFolder/test_1.pdf') WSCST(*PDF) STMFOPT(*REPLACE)(or similar) in the background- https://www.rpgpgm.com/2014/03/creating-pdf-files-from-spool-files.html
Let me know if there are any suggestions or obvious pitfalls with this idea
I am all for it. Think it's an awesome idea.
Maybe in the future, it could be a context menu to 'export as PDF', which in turn would run that command and then download it to the local machine. Also just a thought!
I should have mentioned, in the database browser I am building, there will be a runSQL method we can utilise.
Sounds like a nice add, but I think PDF could probably be optional. Isn't it easier to copy it to a text file and open in a new tab in code for quick viewing? And if you want to export it to PDF it could be a context menu option.
@barrettotte FYI. IBMiContent.runSQL is now availabe.
https://github.com/halcyon-tech/code-for-ibmi/blob/master/src/api/IBMiContent.js#L126
@worksofliam Nice, that makes it way easier, thanks!
Hey @barrettotte
I'd like to have a go at this if you haven't started already. Do you have a branch I can work from or shall I start fresh?
@worksofliam Ah yeah I haven't gotten around to starting on it, so definitely go ahead. I was a lot more optimistic on free time a week ago lol
I'd still like to do this. I am going to put it into the 0.6.0 release milestone.
ACS provides this already. This extension doesn't have to do everything.
Agree with @BrianGarland. Though, if someone wants to PR it.. they are more than welcome.
(notes from #506) Is your feature request related to a problem? Please describe.
Allow user to manage output reports from a tree view for things like copying to PDF or TXT, deleting (for now).
Describe the solution you'd like
using this SQL to list SPLFs for CODE_USER.
select SPOOLED_FILE_NAME ,JOB_NAME ,CREATE_TIMESTAMP ,FILE_NUMBER ,SYSTEM ,USER_NAME ,USER_DATA ,STATUS ,TOTAL_PAGES ,OUTPUT_QUEUE_NAME ,OUTPUT_QUEUE_LIBRARY_NAME ,SIZE ,COPIES ,FORM_TYPE ,DEVICE_TYPE ,OUTPUT_PRIORITY from QSYS2.OUTPUT_QUEUE_ENTRIES_BASIC where USER_NAME = CODE_USER order by CREATE_TIMESTAMP desc -- limit 15 offset 22 -- Use if UI tools allow for paging or expanding results.
You might consider using the view that the SQL results appear in but that would mean you need to activate abilities to select the entry to do actions on an individual or multiple lines.
You might consider an all action like delete all.