The CHGAUTALL utility is available from IBM on an as-is basis to do what you want. It is part of the IFSTOOL library.

Here's a link:

http://www-912.ibm.com/s_dir/slkbase.nsf/0/3976fed8ab10134b862568b60071ccd3?OpenDocument


Martin Rowe wrote:
On 13/10/05, Jerry Draper <midrangel@xxxxxxxxxxxxx> wrote:


I need to assign an *autl to all files in IFS folder including the folder itself
recursively.

This would be like a chmod -R * .

This relates to moving OnDemand Content Manager *stmf from one AS400 to
another.


Hi Jerry

This is a quick hack I put together when I needed to do the same a few
years back. It has worked fine until yesterday, when trying it on a
directory with a very large (1000s) of subdirectories that were being
added to by an FTP job at the time - that confused it. If the contents
are semi-static you should be fine.

Regards, Martin

------------------------------------------8<--------------------------------------------------
PGM        PARM(&TOPDIR &AUTL)
  DCL        VAR(&TOPDIR) TYPE(*CHAR) LEN(512)
  DCL        VAR(&DIR) TYPE(*CHAR) LEN(512)
  DCL        VAR(&CMD) TYPE(*CHAR) LEN(512)
  DCL        VAR(&AUTL) TYPE(*CHAR) LEN(10)
  DCLF       FILE(IFSLIST) RCDFMT(IFSLIST)
  CHGAUT     OBJ(&TOPDIR) AUTL(&AUTL)
  CHGAUT     OBJ(&TOPDIR) USER(*PUBLIC) DTAAUT(*AUTL) +
               OBJAUT(*NONE)
  CRTPF      FILE(QTEMP/IFSLIST) RCDLEN(512)
  MONMSG     MSGID(CPF7302) EXEC(CLRPFM FILE(QTEMP/IFSLIST))
  OVRDBF     FILE(STDOUT) TOFILE(QTEMP/IFSLIST)
  OVRDBF     FILE(IFSLIST) TOFILE(QTEMP/IFSLIST)
  CHGVAR     VAR(&CMD) VALUE('find ' *TCAT +
               &TOPDIR *TCAT ' -type d -exec ls -d {} \;')
  QSH        CMD(&CMD)
READLOOP:
  MONMSG     MSGID(CPF0000) EXEC(GOTO CMDLBL(ENDPGM))
  CHGVAR     VAR(&DIR) VALUE(&IFSLIST *TCAT '/*')
  CHGAUT     OBJ(&DIR) AUTL(&AUTL)
  MONMSG     MSGID(CPF0000) EXEC(GOTO CMDLBL(READLOOP))
  CHGAUT     OBJ(&DIR) USER(*PUBLIC) DTAAUT(*AUTL) +
               OBJAUT(*NONE)
  GOTO       CMDLBL(READLOOP)
ENDPGM:
  RETURN
ENDPGM
-----------------------------------------8<---------------------------------------

--
martin@xxxxxxxxxx  AIM/Gaim: DBG400dotNet  http://www.dbg400.net   /"\
DBG/400 - AS/400 & iSeries Open Source/Free Software utilities     \ /
Debian GNU/Linux | ASCII Ribbon Campaign against HTML mail & news   X



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.