× 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.



I've since learned that to "touch a file" in Unix and PHP means to set the 
modification time of the file.  And if it doesn't exist, it will create the 
file (with size 0).  I'll assume that it means the same in Java.  If not, let 
me know.
 
But if it is so, is the touch command implemented in QSH?  Is so, seems like 
you could ls your files to touch to a temp file, then use the temp file as 
standard input to the touch command.
 
William

date: Fri, 14 May 2004 11:21:34 -0700 (PDT)
from: William Washington III 
subject: Re: Recursive touching... Whoo hoo!

Joe, 

I'm not a java-guy (yet), but the RPG or CL way I have used is to use some QSH 
commands and pipe the information to a temporary file, then process the 
temporary file in RPG.

Example:
in CL:
CRTPF FILE(tmplib/tmpfile)
CHGVAR &cmd ('cd /filepath/ && ls *.ext > 
/qsys.lib/tmplib.lib/tmpfile.file/tmpmbr.mbr')
STRQSH CMD(&CMD)

This will place the contents of everything in the IFS directory specified by 
the filepath with extension .ext into the temporary file.

Next, just open an RPG program with the temporary file overridden and process. 
You will probably want to make a command that calls the CL program to do the 
work.

I've simplified this process, but not by much. Look in a QSHELL reference for 
switches on the ls command. I think this will get you going...

William

date: Thu, 13 May 2004 15:41:05 -0500
from: "Joe Pluta" 
subject: Recursive touching... Whoo hoo!

Alright, I give.

What's the easiest programmatic way to touch a file in the IFS? I
wanted to do "touch *.jsp" in a folder, and I get the dreaded "too many
arguments" error, because there are too many files in the folder (don't
get me started on how stupid this is).

So, now I'd like some suggestions on the simplest way to:

1. Touch a single file
2. Specify a folder and touch every JSP in that folder and all its
subfolders.

A straightforward multi-step process using temporary files and standard
shell commands is an acceptable possibility. Simple code for doing it
from RPG is also fine.

Last place option is a Java program.

Joe



=============================
William Washington III
Njia Systems Incorporated
w.washington3@xxxxxxxxxxxxxxx
312-719-0519
=============================





As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.