Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

About creating/writing to IFS files during a save operation

420 views
Skip to first unread message

Mr. K.V.B.L.

unread,
Nov 15, 2013, 10:51:08 AM11/15/13
to
While doing a WRKLNK on an IFS file, I did an '8' (display attributes) on it and stumbled across a field that said "Allow write during save". On my IFS files that are logs I would like for them to be written to even during a save operation. How can I tell the system that I would like for unrestricted writing/reading to a file for save operations when it is created?

CRPence

unread,
Nov 15, 2013, 11:55:28 AM11/15/13
to
On 15-Nov-2013 07:51 -0800, Mr. K.V.B.L. wrote:
> While doing a WRKLNK on an IFS file, I did an '8' (display
> attributes) on it and stumbled across a field that said "Allow write
> during save".

More accurately, that attribute would allow write activity during a
*Save While Active* (SWA) request. The help text for that detail from
the 8=Display Attributes taken from the "Work with Object Links":

" Allow write during save - Help

Whether the object can be shared with readers and writers during
save-while-active checkpoint processing for a SAV command with
*ALWCKPWRT specified for the SAVACTOPT parameter.

Yes
The object can be shared with readers and writers.

No
The object can only be shared with readers.

Please refer to the Backup and Recovery book, SC41-5304 for more
details on this attribute. "

> On my IFS files that are logs I would like for them to be written to
> even during a save operation.

More often log files are omitted from the save [via an *OMIT spec on
the Save Object (SAV) command or the QsrSave() API]. Typically that is
either due to the inability of the save to obtain the necessary locks
per the conflicting lock held by the job which has them open for write,
or the log files were previously modified to have the *ALWSAV attribute
set to "no" such that they are explicitly prohibited from saves. That
is because the save is not going to be able to backup the log files
*unless* the job performing the logging activity is first ended or
otherwise told to remove its locks [i.e. close the log files], and then
that job is either restarted or told it can obtain those locks\opens
again, *after* the checkpoint processing has completed.

> How can I tell the system that I would like for unrestricted
> writing/reading to a file for save operations when it is created?

That would seem to be what preferably would be a directory attribute
that could be established, for which files created into that directory
would /inherit/ that attribute. Sadly, I am not aware that is possible;
and if not, seems a good suggesting for a Design Change Request.

I am not aware of the ability to set the attribute during any
particular /create/ interface; e.g. the Qshell touch utility does not
have an option. And while after-the-fact, i.e. not as-specified during
the create of the file, a request can be made later, that
attribute\setting can be changed using:

CHGATR 'path-to-object' ATR(*ALWCKPWRT) VALUE(*YES)

<http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/cl/chgatr.htm>
_i Change Attribute (CHGATR) i_

The following help text is from the Change Attribute (CHGATR) command
that enables "a single attribute to be changed for a single object or a
group of objects" or "to change an attribute of a directory tree where
the directory, its contents, and the contents of all of its
subdirectories have the attribute changed" per the specification of the
Directory subtree (SUBTREE) parameter [however be aware that Changing
attribute *ALWCKPWRT for a directory object fails and returns error
messages CPFA0AD and CPFB414."]:

" Attribute (ATR) - Help

*ALWCKPWRT
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.

Allowed values for the VALUE parameter are:

*YES The object can be shared with readers and writers.

*NO The object can be shared with readers only. "


The same function as ChgAtr CL command is available from the
following API and shell (QSH) utility:

<http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/apis/qsetattr.htm>
_i Qp0lSetAttr()--Set Attributes i_
"...
Service Program Name: QP0LLIB3
...
_Attribute identification_ The constant identifying the attribute being
set. Valid values are:
...
QP0L_ATTR_ALWCKPWRT: (CHAR(1)) Whether a stream file (*STMF) can be
shared with readers and writers during the save-while-active checkpoint
processing. Setting this attribute may cause unexpected results. See the
_Backing up your system_
<http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/rzaiu/rzaiuintro.htm>
topic collection for details on this attribute.
x'00' QP0L_NOT_ALWCKPWRT: The object can be shared with readers only.
x'01' QP0L_ALWCKPWRT: The object can be shared with readers and writers.
..."


<http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/rzahz/rzahzattr.htm>
IBM i 7.1 Information Center -> Programming -> Shells and utilities ->
Qshell -> Utilities -> Working with files and directories
_i attr - Get or set attributes for files i_
"Synopsis

attr [ -hp ] file [ attribute [ =value ] ... ]

Description

The attr utility gets or sets attributes for the object specified by
file. When no attributes are specified, attr displays all of the
attributes for the object in a re-entrable format to standard output.
...

ALWCKPWRT
An indicator if a stream file can be shared with readers and
writers during the save-while-active checkpoint processing. This
attribute can be displayed or set.
..."

--
Regards, Chuck
0 new messages