Jan 18 2011
Open Any Windows Document from AS400
You can open any kind of document on Windows from an IBM i 5250 session or a CL program.
The type of file can either be an image or a picture (jpeg, tiff, bmp, png), a video (avi, mpeg), a PDF, an office document (word, excel, powerpoint), and even an Internet link (URL).
AS400 provides the strpccmd command in this purpose:
strpccmd pccmd('explorer C:\directory\file')
explorer command tell Windows to open a document with the default application that is configured in the control panel. It will act as if you double clicked the file in explorer; Eg: Acrobat reader for PDF files.
You don’t absolutely need the ‘explorer’ command to open the document but it fixes some issues:
– You do not to get a DOS window displayed
– URLs launch with the default browser, Internet explorer or Firefox (This wouldn’t work otherwise)
– This lets you open documents with spaces in the filename that tends to be buggy