× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Sweet!

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of John Yeung
Sent: Monday, June 15, 2015 12:10 PM
To: Midrange Systems Technical Discussion
Subject: Re: Anybody know a good way to monitor the size of an IFS STMF

There seem to be two pieces: (1) How do you retrieve the size of a stream file? (2) How do you monitor this?

The answer to (2) is pretty much the same as how you would monitor anything else on the i. Maybe set up a recurring job that performs (1) and then gives you a report or alerts you if a threshold is reached, etc.

So how to do (1)? Well, one fairly simple way is to get the output of a Unix-style directory listing using Qshell. You can direct that output to a physical file, if you find it easier to work with it there. For example,

qsh cmd('ls -l /my/ifs/file > /qsys.lib/mylib.lib/myfile.file/mymbr.mbr')

Then, in MYMBR you will have something of the form

-rwxrwxrwx 1 OWNER 0 4323 Dec 3 2014 /my/ifs/file

You can substring that to pull out the size (in this case, 4323 bytes).

It's not as robust as using APIs to work with IFS files "directly", but if you don't already have the wrappers and scaffolding set up to handle the APIs, this is a very straightforward and quick way to get what you need.

John Y.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.