IFS & PDFs

980 pts.
Tags:
IFS
PDF
Hi Guys,

I have a whole lot of pdf files stored on the IFS. These are historical data. I wish to display tags for these documents as a subfile on green screen (emulation).

 And when the user selects one of these, I need to display the pdf document on the PC (obviously using Adobe). Can someone assist in how I can acheive this function please?

Thanks.



Software/Hardware used:
iseries/ V5R4/WindowsXP
ASKED: November 9, 2011  5:40 AM
UPDATED: November 11, 2011  10:47 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

You can do this by using STRPCCMD command.
It holds two Parameters(Command & Pause).

Command should hold the link(IFS) for opening PDF.

<pre>DCL VAR(&PDFADR) TYPE(*CHAR) LEN(100) +
VALUE(‘//3.100.10.10/reports/PDF/ABC001′)

CHGVAR VAR(&CMD) VALUE(‘START ‘ || &RPTLNK )

/* RUN THE PC COMMAND */
STRPCO PCTA(*NO)
MONMSG MSGID(IWS4010)

STRPCCMD PCCMD(&CMD) PAUSE(*NO)
</pre>

Make sure that Command will have the IFS link which points to the corresponding PDF followed by START.

Pradeep.

Discuss This Question: 8  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • deepu9321
    You can use the STRPCCMD by using any of the following APIs. QCMDEXEC, QCAEXEC, or QCAPCMD.
    3,605 pointsBadges:
    report
  • NullFields
    This is just a brainstorm idea, I have not done this exactly: You can get a list of the PDFs from the IFS and list the full path on the display. System i Access 5250 has a Hot-Spot option under preferences where you can get it to recognize URLs. It makes it so a click of the URL will open your browser to the link. You need to define the PC browswer under Preferences | Browser. So, if you can turn your IFS folder into a URL (HTTP server included on the IBMi for free?), this might work. Sorry, I don't have time right now to test this out on my own.
    880 pointsBadges:
    report
  • TomLiotta
    These are historical data. How many documents are there? And how often does the list change? For example, if you had a static list in a file, would refreshing it daily be sufficient to keep it up to date? Tom
    125,585 pointsBadges:
    report
  • tjgm88
    Hi Tom, Thanks for your and all other responses. We have a folder for each month and the number of documents will be static within each folder - no daily changes. For the next month a new folder is created. Its a monthly job. I need to be able to display the keys for the docs on a subfile, enable the user to select and then display the seectedpdf on PC. Regards.
    980 pointsBadges:
    report
  • TomLiotta
    Because these will be displayed by a PC, maybe they would be listed better on a PC. I was wondering if a .HTML document might be created on a regular (daily?) basis. The document could be as simple as a list of links to each PDF. Instead of listing the PDFs in a subfile and then sending a command to the PC to display a selected PDF, you might just send a command to the PC to open the .HTML document. There are elements of STRPCCMD that can be tricky. I was wondering if an alternative to creating and working via a subfile might be acceptable. Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    Note that it's not necessary to start nor use a HTTP server. URLs can be coded as file:// links to have the browser load them directly without using the http: protocol. There are a couple potential quirks in how the URLs must be structured; but if the PCs are going to be expected to load PDFs out of the IFS anyway, those quirks ought to be easy to handle. Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    I need to be able to display the keys for the docs on a subfile... What is "keys for the docs"? Does that just mean that each doc has an identifier that the user will recognize? Tom
    125,585 pointsBadges:
    report
  • Yorkshireman
    Hmmm We do this all the time, every day, thousands of times a day - both PDf and .rtf type documents. the document objects are stored in many folders, analogous to your 'monthly' structure. In our case the document path is stored in a file - there are 'random' new documents scattered across the structure each day, so we maintain the list.. Some descriptive data - like your 'keys? - is stored as well. Aa subfile over this data, with the usual selection/positioning/filtering, drill down blah blah gives a user visibility. selecting to view the content of an object cause the function to identify its type, check authority, and then run STRPCCMD with whatever is appropriate. Access to the list of objects in a folder is programtically very straightforward, using tools for reading folders and document names - a quick web search will throw up lots of bits of code. We used Scott Klements toolkit, which is well documented, and merely needed to take examples of code in his 'manual' and stitch it into our own stuff. There are alternative techniques available of course - we have other troutes in use for particular systems, generally also based on holding a table of 'authorised and valid' document objects, then running the approriate function against the entry - browser access could be useful, but the consistent speed of 5250 emulation and integration into core legacy systems decided that the 'main' way in is still good old DB2 and character screens.
    5,520 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following