Set IFS object attribute & Get IFS object attribute
**
** Program . . : CBX127
** Description : Change IFS attributes - CPP
** Author . . : Carsten Flensburg
** Published . : Club Tech iSeries Programming Tips Newsletter
** Date . . . : November 18, 2004
**
**
**
** Program summary
** ---------------
**
** Unix type APIs:
** Qp0lSetAttr Set IFS object Changes the specified attribute
** attribute for the specified IFS object.
** Not all attributes are supported
** by all file systems.
**
** MI builtins:
** _MEMMOVE Copy memory Copies a string from one pointer
** specified location to another.
**
** Message handling API:
** QMHSNDPM Send program message Sends a message to a program stack
** entry (current, previous, etc.) or
** an external message queue.
**
** Both messages defined in a message
** file and immediate messages can be
** used. For specific message types
** only one or the other is allowed.
**
**
** Programmer's notes:
** The following Qp0lSetAttr attribute-ID is supported as of V5R1 only:
**
** 27 QP0L_ATTR_CCSID Coded characer set identifier
**
** The following Qp0lSetAttr attribute-IDs are supported as of V5R2 only:
**
** 31 QP0L_ATTR_DISK_STG_OPT How to allocate auxiliary storage
** 32 QP0L_ATTR_MAIN_STG_OPT How to allocate main storage
** 301 QP0L_ATTR_SUID Set effective user ID
** 302 QP0L_ATTR_SGID Set effective group ID
**
**
** Compile options:
** CrtRpgMod Module( CBX127 )
** DbgView( *LIST )
**
** CrtPgm Pgm( CBX127 )
** Module( CBX127 )
** ActGrp( *NEW )
**
**
**-- Control specifications: -------------------------------------------**
H Option( *SrcStmt ) BndDir( 'QC2LE' )
**-- API error information:
D ERRC0100 Ds Qualified
D BytPro 10i 0 Inz( %Size( ERRC0100 ))
D BytAvl 10i 0
D MsgId 7a
D 1a
D MsgDta 256a
**-- Global variables:
D MsgKey s 4a
**-- Object attributes:
D QP0L_ATTR_CREATE_TIME...
D c 4
D QP0L_ATTR_ACCESS_TIME...
D c 5
D QP0L_ATTR_MODIFY_TIME...
D c 7
D QP0L_ATTR_PC_READ_ONLY...
D c 17
D QP0L_ATTR_PC_HIDDEN...
D c 18
D QP0L_ATTR_PC_SYSTEM...
D c 19
D QP0L_ATTR_PC_ARCHIVE...
D c 20
D QP0L_ATTR_SYSTEM_ARCHIVE...
D c 21
D QP0L_ATTR_CODEPAGE...
D c 22
D QP0L_ATTR_ALWCKPWRT...
D c 26
D QP0L_ATTR_CCSID...
D c 27
D QP0L_ATTR_DISK_STG_OPT...
D c 31
D QP0L_ATTR_MAIN_STG_OPT...
D c 32
D QP0L_ATTR_RESET_DATE...
D c 200
D QP0L_ATTR_SUID c 300
D QP0L_ATTR_SGID c 301
**-- File attribute constants:
D QP0L_PC_NOT_READONLY...
D c x'00'
D QP0L_PC_READONLY...
D c x'01'
D QP0L_PC_NOT_HIDDEN...
D c x'00'
D QP0L_PC_HIDDEN...
D c x'01'
D QP0L_PC_NOT_SYSTEM...
D c x'00'
D QP0L_PC_SYSTEM...
D c x'01'
D QP0L_PC_NOT_CHANGED...
D c x'00'
D QP0L_PC_CHANGED...
D c x'01'
D QP0L_SYSTEM_NOT_CHANGED...
D c x'00'
D QP0L_SYSTEM_CHANGED...
D c x'01'
D QP0L_NOT_ALWCKPWRT...
D c x'00'
D QP0L_ALWCKPWRT...
D c x'01'
D QP0L_STG_NORMAL...
D c x'00'
D QP0L_STG_MINIMIZE...
D c x'01'
D QP0L_STG_DYNAMIC...
D c x'02'
D QP0L_SUID_OFF c x'00'
D QP0L_SUID_ON c x'01'
D QP0L_SGID_OFF c x'00'
D QP0L_SGID_ON c x'01'
**- Set attribute:
D SetAtr Pr 10i 0 ExtProc( 'Qp0lSetAttr' )
D SaPthNam * Value
D SaAtrLst * Value
D SaBufSizPrv 10u 0 Value
D SaFlwSymLnk 10u 0 Value
D SaDots 10i 0 Options( *NoPass )
**-- Error number:
D sys_errno Pr * ExtProc( '__errno' )
**-- Error string:
D sys_strerror Pr * ExtProc( 'strerror' )
D errno 10i 0 Value
**-- Copy memory:
D memcpy Pr * ExtProc( '_MEMMOVE' )
D pOutMem * Value
D pInpMem * Value
D iMemSiz 10u 0 Value
**-- Send program message:
D SndPgmMsg Pr ExtPgm( 'QMHSNDPM' )
D SpMsgId 7a Const
D SpMsgFq 20a Const
D SpMsgDta 128a Const
D SpMsgDtaLen 10i 0 Const
D SpMsgTyp 10a Const
D SpCalStkE 10a Const Options( *VarSize )
D SpCalStkCtr 10i 0 Const
D SpMsgKey 4a
D SpError 32767a Options( *VarSize )
**-- Change IFS attribute: ---------------------------------------------**
D ChgIfsAtr Pr 10i 0
D PxIfsObj 5002a Const Varying
D PxAtrId 10i 0 Const
D PxAtrVal_p * Value
D PxAtrSiz 10i 0 Const
**-- Send diagnostic message:
D SndDiagMsg Pr 10i 0
D PxMsgDta 512a Const Varying
**-- Send escape message:
D SndEscMsg Pr 10i 0
D PxMsgDta 512a Const Varying
**-- Send completion message:
D SndCmpMsg Pr 10i 0
D PxMsgDta 512a Const Varying
**-- Error identification:
D errno Pr 10i 0
D strerror Pr 128a Varying
**-- Entry parameters:
D CBX127 Pr
D PxIfsObj 5002a Varying
D PxFlwSymLnk 10i 0
D PxRdOnly 1a
D PxHidden 1a
D PxPcSys 1a
D PxPcArc 1a
D PxSysArc 1a
D PxAlwCkpWrt 1a
D PxCcsId 10i 0
D PxDiskStgOpt 1a
D PxMainStgOpt 1a
D PxSetEuid 1a
D PxSetEgid 1a
**
D CBX127 Pi
D PxIfsObj 5002a Varying
D PxFlwSymLnk 10i 0
D PxRdOnly 1a
D PxHidden 1a
D PxPcSys 1a
D PxPcArc 1a
D PxSysArc 1a
D PxAlwCkpWrt 1a
D PxCcsId 10i 0
D PxDiskStgOpt 1a
D PxMainStgOpt 1a
D PxSetEuid 1a
D PxSetEgid 1a
/Free
If PxCcsId > *Zero;
ChgIfsAtr( PxIfsObj
: QP0L_ATTR_CCSID
: %Addr( PxCcsId )
: %Size( PxCcsId )
);
EndIf;
If PxRdOnly < x'FF';
ChgIfsAtr( PxIfsObj
: QP0L_ATTR_PC_READ_ONLY
: %Addr( PxRdOnly )
: %Size( PxRdOnly )
);
EndIf;
If PxHidden < x'FF';
ChgIfsAtr( PxIfsObj
: QP0L_ATTR_PC_HIDDEN
: %Addr( PxHidden )
: %Size( PxHidden )
);
EndIf;
If PxPcSys < x'FF';
ChgIfsAtr( PxIfsObj
: QP0L_ATTR_PC_SYSTEM
: %Addr( PxPcSys )
: %Size( PxPcSys )
);
EndIf;
If PxPcArc < x'FF';
ChgIfsAtr( PxIfsObj
: QP0L_ATTR_PC_ARCHIVE
: %Addr( PxPcArc )
: %Size( PxPcArc )
);
EndIf;
If PxSysArc < x'FF';
ChgIfsAtr( PxIfsObj
: QP0L_ATTR_SYSTEM_ARCHIVE
: %Addr( PxSysArc )
: %Size( PxSysArc )
);
EndIf;
If PxAlwCkpWrt < x'FF';
ChgIfsAtr( PxIfsObj
: QP0L_ATTR_ALWCKPWRT
: %Addr( PxAlwCkpWrt )
: %Size( PxAlwCkpWrt )
);
EndIf;
If PxDiskStgOpt < x'FF';
ChgIfsAtr( PxIfsObj
: QP0L_ATTR_DISK_STG_OPT
: %Addr( PxDiskStgOpt )
: %Size( PxDiskStgOpt )
);
EndIf;
If PxMainStgOpt < x'FF';
ChgIfsAtr( PxIfsObj
: QP0L_ATTR_MAIN_STG_OPT
: %Addr( PxMainStgOpt )
: %Size( PxMainStgOpt )
);
EndIf;
If PxSetEuid < x'FF';
ChgIfsAtr( PxIfsObj
: QP0L_ATTR_SUID
: %Addr( PxSetEuid )
: %Size( PxSetEuid )
);
EndIf;
If PxSetEgid < x'FF';
ChgIfsAtr( PxIfsObj
: QP0L_ATTR_SGID
: %Addr( PxSetEgid )
: %Size( PxSetEgid )
);
EndIf;
*InLr = *On;
Return;
/End-Free
**-- Change IFS attribute: ---------------------------------------------**
P ChgIfsAtr B
D Pi 10i 0
D PxIfsObj 5002a Const Varying
D PxAtrId 10i 0 Const
D PxAtrVal_p * Value
D PxAtrSiz 10i 0 Const
**-- API Path constants:
D CUR_CCSID c 0
D CUR_CTRID c x'0000'
D CUR_LNGID c x'000000'
D CHR_DLM_1 c 0
**-- API path:
D Path Ds Qualified Align
D CcsId 10i 0 Inz( CUR_CCSID )
D CtrId 2a Inz( CUR_CTRID )
D LngId 3a Inz( CUR_LNGID )
D 3a Inz( *Allx'00' )
D PthTypI 10i 0 Inz( CHR_DLM_1 )
D PthNamLen 10i 0
D PthNamDlm 2a Inz( '/ ' )
D 10a Inz( *Allx'00' )
D PthNam 5000a
**- Set attribute buffer:
D Buffer Ds Qualified Align
D OfsNxtAtr 10u 0
D AtrId 10u 0
D SizAtr 10u 0
D 4a Inz( *Allx'00' )
D AtrDta 128a
/Free
Path.PthNam = PxIfsObj;
Path.PthNamLen = %Len( PxIfsObj );
Buffer.OfsNxtAtr = 0;
Buffer.AtrId = PxAtrId;
Buffer.SizAtr = PxAtrSiz;
memcpy( %Addr( Buffer.AtrDta ): PxAtrVal_p: PxAtrSiz );
If SetAtr( %Addr( Path )
: %Addr( Buffer )
: %Size( Buffer )
: PxFlwSymLnk
) < *Zero;
SndDiagMsg( %Char( errno ) + ': ' + strerror );
SndEscMsg( 'CHGIFSATR command ended in error' );
Else;
SndCmpMsg( 'IFS object attribute changed.' );
EndIf;
Return *Zero;
/End-Free
**
P ChgIfsAtr E
**-- Get runtime error number: -----------------------------------------**
P errno B
D Pi 10i 0
**
D Error s 10i 0 Based( pError ) NoOpt
/Free
pError = sys_errno;
Return Error;
/End-Free
P Errno E
**-- Get runtime error text: -------------------------------------------**
P strerror B
D Pi 128a Varying
/Free
Return %Str( sys_strerror( Errno ));
/End-Free
P strerror E
**-- Send diagnostic message: ------------------------------------------**
P SndDiagMsg B
D Pi 10i 0
D PxMsgDta 512a Const Varying
**
D MsgKey s 4a
/Free
SndPgmMsg( 'CPF9897'
: 'QCPFMSG *LIBL'
: PxMsgDta
: %Len( PxMsgDta )
: '*DIAG'
: '*PGMBDY'
: 1
: MsgKey
: ERRC0100
);
If ERRC0100.BytAvl > *Zero;
Return -1;
Else;
Return 0;
EndIf;
/End-Free
P SndDiagMsg E
**-- Send escape message: ----------------------------------------------**
P SndEscMsg B
D Pi 10i 0
D PxMsgDta 512a Const Varying
/Free
SndPgmMsg( 'CPF9898'
: 'QCPFMSG *LIBL'
: PxMsgDta
: %Len( PxMsgDta )
: '*ESCAPE'
: '*PGMBDY'
: 1
: MsgKey
: ERRC0100
);
If ERRC0100.BytAvl > *Zero;
Return -1;
Else;
Return 0;
EndIf;
/End-Free
P SndEscMsg E
**-- Send completion message: ------------------------------------------**
P SndCmpMsg B
D Pi 10i 0
D PxMsgDta 512a Const Varying
/Free
SndPgmMsg( 'CPF9897'
: 'QCPFMSG *LIBL'
: PxMsgDta
: %Len( PxMsgDta )
: '*COMP'
: '*PGMBDY'
: 1
: MsgKey
: ERRC0100
);
If ERRC0100.BytAvl > *Zero;
Return -1;
Else;
Return 0;
EndIf;
/End-Free
**
P SndCmpMsg E
Qp0lGetAttr: Because this program example contains some special code, my HTML-editor
is messing up the code. You'll have to download the zipped code
**
** Program . . : CBX127V
** Description : Change IFS attributes - validity checking program
** Author . . : Carsten Flensburg
** Published . : Club Tech iSeries Programming Tips Newsletter
** Date . . . : November 18, 2004
**
**
** Program description:
** This program checks the existence of the specified IFS object.
**
**
** Compile options:
** CrtRpgMod Module( CBX127V )
** DbgView( *LIST )
**
** CrtPgm Pgm( CBX127V )
** Module( CBX127V )
** ActGrp( *NEW )
**
**
**-- Control specification: --------------------------------------------**
H Option( *SrcStmt ) BndDir( 'QC2LE' )
**-- API error data structure:
D ERRC0100 Ds Qualified
D BytPrv 10i 0 Inz( %Size( ERRC0100 ))
D BytAvl 10i 0
D ExcpId 7a
D 1a
D ExcpDta 512a
**-- Global variables:
D addr s 10u 0
**-- access API constants:
D F_OK c 0
D X_OK c 1
D W_OK c 2
D R_OK c 4
**-- IFS file functions:
D access Pr 10i 0 ExtProc( 'access' )
D Path * Value Options( *String )
D Amode 10i 0 Value
**-- Error number:
D sys_errno Pr * ExtProc( '__errno' )
**-- Error string:
D sys_strerror Pr * ExtProc( 'strerror' )
D errno 10i 0 Value
**-- Send program message:
D SndPgmMsg Pr ExtPgm( 'QMHSNDPM' )
D SpMsgId 7a Const
D SpMsgFq 20a Const
D SpMsgDta 128a Const
D SpMsgDtaLen 10i 0 Const
D SpMsgTyp 10a Const
D SpCalStkE 10a Const Options( *VarSize )
D SpCalStkCtr 10i 0 Const
D SpMsgKey 4a
D SpError 1024a Options( *VarSize )
**-- Send diagnostic message:
D SndDiagMsg Pr 10i 0
D PxMsgId 7a Const
D PxMsgDta 512a Const Varying
**-- Send escape message:
D SndEscMsg Pr 10i 0
D PxMsgId 7a Const
D PxMsgDta 512a Const Varying
**-- Error identification:
D errno Pr 10i 0
D strerror Pr 128a Varying
**-- Entry parameters:
D CBX127V Pr
D PxIfsObj 5002a Varying
D PxFlwSymLnk 10i 0
D PxRdOnly 1a
D PxHidden 1a
D PxPcSys 1a
D PxPcArc 1a
D PxSysArc 1a
D PxAlwCkpWrt 1a
D PxCcsId 10i 0
D PxDskStgOpt 1a
D PxMainStgOpt 1a
D PxSetEuid 1a
D PxSetEgid 1a
**
D CBX127V Pi
D PxIfsObj 5002a Varying
D PxFlwSymLnk 10i 0
D PxRdOnly 1a
D PxHidden 1a
D PxPcSys 1a
D PxPcArc 1a
D PxSysArc 1a
D PxAlwCkpWrt 1a
D PxCcsId 10i 0
D PxDskStgOpt 1a
D PxMainStgOpt 1a
D PxSetEuid 1a
D PxSetEgid 1a
/Free
If access( PxIfsObj: F_OK ) = -1;
SndDiagMsg( 'CPD0006': '0000' + %Char( errno ) + ': ' + strerror );
SndEscMsg( 'CPF0002': '' );
EndIf;
*InLr = *On;
Return;
/End-Free
**-- Get runtime error number: -----------------------------------------**
P errno B
D Pi 10i 0
**
D Error s 10i 0 Based( pError ) NoOpt
/Free
pError = sys_errno;
Return Error;
/End-Free
P errno E
**-- Get runtime error text: -------------------------------------------**
P strerror B
D Pi 128a Varying
/Free
Return %Str( sys_strerror( errno ));
/End-Free
P strerror E
**-- Send diagnostic message: ------------------------------------------**
P SndDiagMsg B
D Pi 10i 0
D PxMsgId 7a Const
D PxMsgDta 512a Const Varying
**
D MsgKey s 4a
/Free
SndPgmMsg( PxMsgId
: 'QCPFMSG *LIBL'
: PxMsgDta
: %Len( PxMsgDta )
: '*DIAG'
: '*PGMBDY'
: 1
: MsgKey
: ERRC0100
);
If ERRC0100.BytAvl > *Zero;
Return -1;
Else;
Return 0;
EndIf;
/End-Free
P SndDiagMsg E
**-- Send escape message: ----------------------------------------------**
P SndEscMsg B
D Pi 10i 0
D PxMsgId 7a Const
D PxMsgDta 512a Const Varying
**
D MsgKey s 4a
/Free
SndPgmMsg( PxMsgId
: 'QCPFMSG *LIBL'
: PxMsgDta
: %Len( PxMsgDta )
: '*ESCAPE'
: '*PGMBDY'
: 1
: MsgKey
: ERRC0100
);
If ERRC0100.BytAvl > *Zero;
Return -1;
Else;
Return 0;
EndIf;
/End-Free
P SndEscMsg E
Command: CBX127X
/*-------------------------------------------------------------------*/
/* */
/* Compile options: */
/* */
/* CrtCmd Cmd( CHGIFSATR ) */
/* Pgm( CBX127 ) */
/* SrcMbr( CBX127X ) */
/* VldCkr( CBX127V ) */
/* HlpPnlGrp( CBX127H ) */
/* HlpId( *CMD ) */
/* PmtOvrPgm( CBX127O ) */
/* */
/* */
/*-------------------------------------------------------------------*/
Cmd Prompt( 'Change IFS Attributes' )
Parm IFSOBJ *Pname 5000 +
Min( 1 ) +
Vary( *YES *INT2 ) +
Case( *MIXED ) +
Keyparm( *YES ) +
Prompt( 'IFS object' )
Parm SYMLNK *Int4 +
Rstd( *YES ) +
Dft( *NO ) +
SpcVal(( *NO 0 ) +
( *YES 1 )) +
Expr( *YES ) +
Keyparm( *YES ) +
Prompt( 'Symbolic link' )
Parm READONLY *Char 1 +
Rstd( *YES ) +
Dft( *SAME ) +
SpcVal(( *NO x'00' ) +
( *YES x'01' ) +
( *SAME x'FF' )) +
Expr( *YES ) +
Prompt( 'Read only' )
Parm HIDDEN *Char 1 +
Rstd( *YES ) +
Dft( *SAME ) +
SpcVal(( *NO x'00' ) +
( *YES x'01' ) +
( *SAME x'FF' )) +
Expr( *YES ) +
Prompt( 'Hidden' )
Parm PCSYSTEM *Char 1 +
Rstd( *YES ) +
Dft( *SAME ) +
SpcVal(( *NO x'00' ) +
( *YES x'01' ) +
( *SAME x'FF' )) +
Expr( *YES ) +
Prompt( 'System file' )
Parm PCARCHIVE *Char 1 +
Rstd( *YES ) +
Dft( *SAME ) +
SpcVal(( *NO x'00' ) +
( *YES x'01' ) +
( *SAME x'FF' )) +
Expr( *YES ) +
Prompt( 'Object changed - PC' )
Parm SYSARCHIVE *Char 1 +
Rstd( *YES ) +
Dft( *SAME ) +
SpcVal(( *NO x'00' ) +
( *YES x'01' ) +
( *SAME x'FF' )) +
Expr( *YES ) +
Prompt( 'Object changed - System' )
Parm ALWCKPWRT *Char 1 +
Rstd( *YES ) +
Dft( *SAME ) +
SpcVal(( *NO x'00' ) +
( *YES x'01' ) +
( *SAME x'FF' )) +
Expr( *YES ) +
Prompt( 'Allow write during save' )
Parm CCSID *Int4 +
Range( 1 65533 ) +
Dft( *SAME ) +
SpcVal(( *SAME 0 )) +
Expr( *YES ) +
Prompt( 'Coded character set ID' )
Parm DISKSTGOPT *Char 1 +
Rstd( *YES ) +
Dft( *SAME ) +
SpcVal(( *NORMAL x'00' ) +
( *MINIMIZE x'01' ) +
( *DYNAMIC x'02' ) +
( *SAME x'FF' )) +
Expr( *YES ) +
Prompt( 'Disk storage option' )
Parm MAINSTGOPT *Char 1 +
Rstd( *YES ) +
Dft( *SAME ) +
SpcVal(( *NORMAL x'00' ) +
( *MINIMIZE x'01' ) +
( *DYNAMIC x'02' ) +
( *SAME x'FF' )) +
Expr( *YES ) +
Prompt( 'Main storage option' )
Parm SETEUID *Char 1 +
Rstd( *YES ) +
Dft( *SAME ) +
SpcVal(( *NO x'00' ) +
( *YES x'01' ) +
( *SAME x'FF' )) +
Expr( *YES ) +
Prompt( 'Set effective user ID' )
Parm SETEGID *Char 1 +
Rstd( *YES ) +
Dft( *SAME ) +
SpcVal(( *NO x'00' ) +
( *YES x'01' ) +
( *SAME x'FF' )) +
Expr( *YES ) +
Prompt( 'Set effective group ID' )
Panel Group
.*-----------------------------------------------------------------------**
.*
.* Compile options:
.*
.* CrtPnlGrp PnlGrp( CBX127H )
.* SrcFile( QPNLSRC )
.* SrcMbr( *PNLGRP )
.*
.*-----------------------------------------------------------------------**
:PNLGRP.
:HELP NAME='CHGIFSATR'.Change IFS Attributes - Help
:P.
The Change IFS Attributes (CHGIFSATR) command changes one or more of
the specified IFS object's attributes. The current attribute value is
displayed when the command is prompted.
:P.
:EHELP.
:HELP NAME='CHGIFSATR/IFSOBJ'.IFS object (IFSOBJ) - Help
:XH3.IFS object (IFSOBJ)
:P.
Specify the path name to the IFS object whose attributes should be
displayed and optionally changed.
:P.
This is a required parameter.
:P.
:EHELP.
:HELP NAME='CHGIFSATR/SYMLNK'.Symbolic link (SYMLNK) - Help
:XH3.Symbolic link (SYMLNK)
:P.
If the last component in the path name is a symbolic link, this
parameter specifies whether or not to change the attribute of the
symbolic link or of the object pointed to by the symbolic link.
:P.
The possible values are:
:P.
:PARML.
:PT.:PK DEF.*NO:EPK.
:PD.
The attribute of the symbolic link object is not changed. The
attribute of the object pointed to by the symbolic link is changed.
:PT.:PK.*YES:EPK.
:PD.
If the object is a symbolic link, the attribute of the symbolic link
is changed. The attribute of the object pointed to by the symbolic
link is not changed.
:EPARML.
:EHELP.
:HELP NAME='CHGIFSATR/READONLY'.Read only (READONLY) - Help
:XH3.Read only (READONLY)
:P.
Whether the object can be written to or deleted, have its extended
attributes changed or deleted, or have its size changed.
:P.
The possible values are:
:P.
:PARML.
:PT.:PK DEF.*SAME:EPK.
:PD.
The current attribute value is not changed.
:PT.:PK.*NO:EPK.
:PD.
The object can be changed or deleted.
:PT.:PK.*YES:EPK.
:PD.
The object cannot be changed or deleted.
:EPARML.
:EHELP.
:HELP NAME='CHGIFSATR/HIDDEN'.Hidden (HIDDEN) - Help
:XH3.Hidden (HIDDEN)
:P.
Whether the object can be displayed using an ordinary directory list.
:P.
The possible values are:
:P.
:PARML.
:PT.:PK DEF.*SAME:EPK.
:PD.
The current attribute value is not changed.
:PT.:PK.*NO:EPK.
:PD.
The object is not hidden and can be displayed using an ordinary
directory listing.
:PT.:PK.*YES:EPK.
:PD.
The object is hidden and cannot be displayed using an ordinary
directory listing.
:EPARML.
:EHELP.
:HELP NAME='CHGIFSATR/PCSYSTEM'.System file (PCSYSTEM) - Help
:XH3.System file (PCSYSTEM)
:P.
Whether the object is a PC system file and is excluded from normal
directory searches.
:P.
The possible values are:
:P.
:PARML.
:PT.:PK DEF.*SAME:EPK.
:PD.
The current attribute value is not changed.
:PT.:PK.*NO:EPK.
:PD.
The object is not a PC system file.
:PT.:PK.*YES:EPK.
:PD.
The object is a PC system file.
:EPARML.
:EHELP.
:HELP NAME='CHGIFSATR/PCARCHIVE'.Object changed - PC (PCARCHIVE) - Help
:XH3.Object changed - PC (PCARCHIVE)
:P.
Whether the object has changed since the last time the file was saved
or reset by a PC client.
:P.
The possible values are:
:P.
:PARML.
:PT.:PK DEF.*SAME:EPK.
:PD.
The current attribute value is not changed.
:PT.:PK.*NO:EPK.
:PD.
The object has not changed.
:PT.:PK.*YES:EPK.
:PD.
The object has changed.
:EPARML.
:EHELP.
:HELP NAME='CHGIFSATR/SYSARCHIVE'.Object changed - System (SYSARCHIVE) - Help
:XH3.Object changed - System (SYSARCHIVE)
:P.
Whether the object has changed and needs to be saved. It is set on
when an object's change time is updated, and set off when the object
has been saved.
:P.
The possible values are:
:P.
:PARML.
:PT.:PK DEF.*SAME:EPK.
:PD.
The current attribute value is not changed.
:PT.:PK.*NO:EPK.
:PD.
The object has not changed and does not need to be saved.
:PT.:PK.*YES:EPK.
:PD.
The object has changed and does need to be saved.
:EPARML.
:EHELP.
:HELP NAME='CHGIFSATR/ALWCKPWRT'.Allow write during save (ALWCKPWRT) - Help
:XH3.Allow write during save (ALWCKPWRT)
:P.
Whether the stream file (*STMF) can be shared with readers and writers
during the save-while-active checkpoint processing. Changing this
attribute's current value may cause unexpected results. Please refer
to the Backup and Recovery book, SC41-5304 for details on this
attribute.
:P.
The possible values are:
:P.
:PARML.
:PT.:PK DEF.*SAME:EPK.
:PD.
The current attribute value is not changed.
:PT.:PK.*NO:EPK.
:PD.
The object can be shared with readers only.
:PT.:PK.*YES:EPK.
:PD.
The object can be shared with readers and writers.
:EPARML.
:EHELP.
:HELP NAME='CHGIFSATR/CCSID'.Coded character set ID (CCSID) - Help
:XH3.Coded character set ID (CCSID)
:P.
The code character set identifier (CCSID) of the data and extended
attributes of the object.
:P.
:NT.
Changing the CCSID does not convert the data or the extended
attributes.
:ENT.
:P.
The possible values are:
:P.
:PARML.
:PT.:PK DEF.*SAME:EPK.
:PD.
The current attribute value is not changed.
:PT.:PV.coded-character-set-identifier:EPV.
:PD.
Specify the CCSID of the data and extended attributes of the object.
:EPARML.
:EHELP.
:HELP NAME='CHGIFSATR/DISKSTGOPT'.Disk storage option (DISKSTGOPT) - Help
:XH3.Disk storage option (DISKSTGOPT)
:P.
This determines how auxiliary storage is allocated by the system for
the specified object. The option will take effect immediately and
be part of the next auxiliary storage allocation for the object.
This option can only be specified for stream files in the root (/),
QOpenSys and user-defined file systems. This option will be ignored
for *TYPE1 byte stream files.
:P.
The possible values are:
:P.
:PARML.
:PT.:PK DEF.*SAME:EPK.
:PD.
The current attribute value is not changed.
:PT.:PK.*NORMAL:EPK.
:PD.
The auxiliary storage will be allocated normally. That is, as
additional auxiliary storage is required, it will be allocated in
logically sized extents to accomodate the current space requirement,
and anticipated future requirements, while minimizing the number of
disk I/O operations. If the *DISKSTGOPT attribute has not been
specified for an object, this value is the default.
:PT.:PK.*MINIMIZE:EPK.
:PD.
The auxiliary storage will be allocated to minimize the space used by
the object. That is, as additional auxiliary storage is required, it
will be allocated in small sized extents to accomodate the current
space requirement. Accessing an object composed of many small extents
may increase the number of disk I/O operations for that object.
:PT.:PK.*DYNAMIC:EPK.
:PD.
The system will dynamically determine the optimum auxiliary storage
allocation for the object, balancing space used versus disk I/O
operations. For example, if a file has many small extents, yet is
frequently being read and written, then future auxiliary storage
allocations will be larger extents to minimize the number of disk I/O
operations. Or, if a file is frequently truncated, then future
auxiliary storage allocations will be small extents to minimize the
space used. Additionally, information will be maintained on the stream
file sizes for this system and its activity. This file size
information will also be used to help determine the optimum auxiliary
storage allocations for this object as it relates to the other objects
sizes.
:EPARML.
:EHELP.
:HELP NAME='CHGIFSATR/MAINSTGOPT'.Main storage option (MAINSTGOPT) - Help
:XH3.Main storage option (MAINSTGOPT)
:P.
This determines how main storage is allocated and used by the system
for the specified object. The option will take effect the next time
the specified object is opened. This option can only be specified
for stream files in the root (/), QOpenSys and user-defined file
systems.
:P.
The possible values are:
:P.
:PARML.
:PT.:PK DEF.*SAME:EPK.
:PD.
The current attribute value is not changed.
:PT.:PK.*NORMAL:EPK.
:PD.
The main storage will be allocated normally. That is, as much storage
as possible will be allocated and used. This minimizes the number of
disk I/O operations since the information is cached in main storage.
If the *MAINSTGOPT attribute has not been specified for an object, this
value is the default.
:PT.:PK.*MINIMIZE:EPK.
:PD.
The main storage will be allocated to minimize the space used by the
object. That is, as little main storage as possible will be allocated
and used. This minimizes main storage usage while increasing the
number of disk I/O operations since less information is cached in main
storage.
:PT.:PK.*DYNAMIC:EPK.
:PD.
The system will dynamically determine the optimum main storage
allocation for the object depending on other system activity and main
storage contention. That is, when there is little main storage
contention, as much storage as possible will be allocated and used to
minimize the number of disk I/O operations. And when there is
significant main storage contention, less main storage will be
allocated and used to minimize the main storage contention. This
option only has an effect when the storage pool's paging option is
*CALC. When the storage pool's paging option is *FIXED, the behavior
is the same as *NORMAL. When the object is accessed through a file
server, this option has no effect. Instead, its behavior is the same
as *NORMAL.
:EPARML.
:EHELP.
:HELP NAME='CHGIFSATR/SETEUID'.Set effective user ID (SETEUID) - Help
:XH3.Set effective user ID (SETEUID)
:P.
Set effective user ID (UID) at execution time. This value is ignored if
the specified object is a directory.
:P.
The possible values are:
:P.
:PARML.
:PT.:PK DEF.*SAME:EPK.
:PD.
The current attribute value is not changed.
:PT.:PK.*NO:EPK.
:PD.
The user ID (UID) is not set at execution time.
:PT.:PK.*YES:EPK.
:PD.
The object owner is the effective user ID (UID) at execution time.
:EPARML.
:EHELP.
:HELP NAME='CHGIFSATR/SETEGID'.Set effective group ID (SETEGID) - Help
:XH3.Set effective group ID (SETEGID)
:P.
Set effective group ID (GID) at execution time.
:P.
The possible values are:
:P.
:PARML.
:PT.:PK DEF.*SAME:EPK.
:PD.
The current attribute value is not changed.
:PT.:PK.*NO:EPK.
:PD.
If the object is a file, the group ID (GID) is not set at execution
time. If the object is a directory in the root ('/'), QOpenSys, and
user-defined file systems, the group ID (GID) of objects created in the
directory is set to the effective GID of the thread creating the
object. This value cannot be set for other file systems.
:PT.:PK.*YES:EPK.
:PD.
If the object is a file, the group ID (GID) is set at execution time.
If the object is a directory, the group ID (GID) of objects created in
the directory is set to the GID of the parent directory.
:EPARML.
:EHELP.
:EPNLGRP.
Thanks to Carsten Flensburg writing for
Club Tech iSeries Programming Tips Newsletter
阅读(1150) | 评论(0) | 转发(0) |