SUBJECT: APAR NUMBER: PQ50275
REFERENCE: AREA: TPFDF CENTRAL DATABASE ROUTINES
SEGMENT: #POPAAC#13 - RELEASE: TPFDF (Macro)
SEGMENT: #PUSHAAC13 - RELEASE: TPFDF (Macro)
SEGMENT: #PUSHINS13 - RELEASE: TPFDF (Macro)
SEGMENT: C$CDFERR13 - RELEASE: TPFDF (C-Header)
SEGMENT: SW00SR13 - RELEASE: TPFDF (Macro)
SEGMENT: UWAG13 - RELEASE: TPFDF (Assembler)
SEGMENT: UWBA13 - RELEASE: TPFDF (Assembler)
Pre-requisite APARs are (TPF only) :
FOR SEGMENT #POPAAC#13 (Macro) - REL TPFDF
PN71030 PN86472
FOR SEGMENT #PUSHAAC13 (Macro) - REL TPFDF
PN86472
FOR SEGMENT #PUSHINS13 (Macro) - REL TPFDF
PN46225 PN61610 PN71030 PN86472
FOR SEGMENT C$CDFERR13 (C-Header) - REL TPFDF
PN73989 PQ08645 PQ16897
FOR SEGMENT SW00SR13 (Macro) - REL TPFDF
AN31299 PN05393 PN37569 PN38613 PN43714 PN46560 PN57526
PN61834 PN64313 PN71161 PN71348 PN73989 PN77016 PN76852
PN80488 PN83423 PN84757 PN87917 PN92097 PQ00790 PQ02145
PQ04911 PQ05189 PQ07995 PQ10797 PQ10084 PQ15475 PQ16897
PQ21506 PQ24625 PQ23091 PQ25824 PQ25825 PQ32209 PQ36911
PQ37963 PQ32210
FOR SEGMENT UWAG13 (Assembler) - REL TPFDF
PQ32210 PQ46459
FOR SEGMENT UWBA13 (Assembler) - REL TPFDF
PQ32210 PQ46459
To be applied in the order listed for each segment.
ABSTRACT OF PROBLEM
___________________
Currently, TPFDF does not set an indicator when a subfile is
empty after deleting LRECs.
COMMENTS ON PROBLEM
___________________
TPFDF does not set an indicator that marks the subfile as empty
after the last LREC in a subfile is deleted. After a delete,
applications would have to issue another TPFDF command to find
out if a subfile is empty.
SOLUTION
________
The SW00SR macro has been updated so SW00RT2 bit 5 will now
indicate whether the subfile is empty or not after delete proc-
essing.
Delete processing (UWAG) has been updated to check if both of
the following are true for the prime block:
1. If the next available byte (NAB) is set to initial NAB
(X'1A')
2. If the forward chain is set to zero.
If so, SW00RT2 bit 5 will be set to 1 indicating the subfile is
empty. Otherwise, bit 5 is set to 0 indicating the subfile is
not empty.
UWBA has been updated to prevent dumps from occurring during the
prime block check in UWAG by clearing the prime block core
address (SW00PCA) in SW00SR.
Structured programming macros (SPMs) #POPAAC#, #PUSHAAC and
#PUSHINS have been updated to add a new parameter for SPM condi-
tional expressions, DBEMPTY. Using SPMs it is possible to
easily check whether a subfile is empty after a delete has
occurred. See the Migration Considerations section for more
information about how to use DBEMPTY.
C$cdferr has been updated to add a new C function, DF_EMPTY,
that will test bit 5 in SW00RT2. See the Migration Consider-
ations section for more information about how to use DF_EMPTY.
NOTE: Applications must check if the subfile is empty imme-
diately after a delete. If the check is done after a subsequent
TPFDF command, the subfile empty indicator may not be accurate.
Also, checking whether or not a subfile is empty should not be
attempted after a delete with FULLFILE or DFDEL_FULLFILE.
DEPENDENCIES
____________
Related Segments Affected By This APAR.
_______________________________________
Segments to be assembled or compiled:
Segments to be link edited:
Load Modules to be loaded:
Migration Considerations
========================
A description and example on how to use DBEMPTY and DF_EMPTY
follow:
o Following is a description of the DBEMPTY conditional
expression parameter
- The DBEMPTY,YES parameter and parameter value checks if
the subfile is empty.
- The DBEMPTY,NO parameter and parameter value checks if
the subfile is not empty
o Following is an example on how to code the DBEMPTY condi-
tional expression parameter to check if the subfile is
empty.
DBOPN REF=IR75DF,ALG=ID60AL7,HOLD Open IR75DF with hold
DBDEL REF=IR75DF,BEGIN,NOKEY Delete first record in subfile
#IF (DBEMPTY,NO) If subfile is not empty, call
#PERF R7,NOT-EMPTY the NOT-EMPTY subroutine
#EIF
DBCLS REF=IR75DF Close the IR75DF subfile
o Following is a description of the DF_EMPTY function
- The DF_EMPTY(file_ptr) function check if the subfile,
pointed to by file_ptr is empty.
1
o Following is an example on how to code the DF_EMPTY function
to call the empty_subfile function if the subfile is empty.
file_ptr92 = dfopn("GR92SR ",_GR92SRI,DFOPN_HOLD);
dfdel(file_ptr92,0);
if (DF_EMPTY(file_ptr92))
empty_subfile();
dfcls(file_ptr92,0);
-- END APAR PQ50275
Download file(s) using new Server:
Login once to access server, leave window open, then
click on link(s) below.
|