WPC8Z 2BV[Z 3|d2cpi (M)LtTddd,dp@~rQ@HP LaserJet IIIDHPLASIII.PRSdp@~rQ,\,Bj@3|d2y M ZOZv(HP LaserJet IIIHPLASIII.PRSx  @,\,BjX@?xxx,wx6X@8;X@LtTddd,wldp@~rQ@uSddd,'dp,`QtTddd,EdphQQH?xxx,ex `B;XtTddd,zWmdp@>pQ@9=;w4QY ȃ w<t wr :4u w Q Y ^ZYXV^a8DocumentgDocument Style StyleXX` `  ` 2pkka4DocumentgDocument Style Style . a6DocumentgDocument Style Style GX  a5DocumentgDocument Style Style }X(# a2DocumentgDocument Style Style<o   ?  A.  2vt> La7DocumentgDocument Style StyleyXX` ` (#` BibliogrphyBibliography:X (# a1Right ParRight-Aligned Paragraph Numbers:`S@ I.  X(# a2Right ParRight-Aligned Paragraph Numbers C @` A. ` ` (#` 2 !  t ) a3DocumentgDocument Style Style B b  ?  1.  a3Right ParRight-Aligned Paragraph Numbers L! ` ` @P 1. ` `  (# a4Right ParRight-Aligned Paragraph Numbers Uj` `  @ a. ` (# a5Right ParRight-Aligned Paragraph Numbers _o` `  @h(1)  hh#(#h 2W   a6Right ParRight-Aligned Paragraph Numbersh` `  hh#@$(a) hh#((# a7Right ParRight-Aligned Paragraph NumberspfJ` `  hh#(@*i) (h-(# a8Right ParRight-Aligned Paragraph NumbersyW"3!` `  hh#(-@p/a) -pp2(#p a1DocumentgDocument Style StyleXqq   l ^) I. ׃  2+;Doc InitInitialize Document Style  0*0*  I. A. 1. a.(1)(a) i) a) I. 1. A. a.(1)(a) i) a)DocumentgTech InitInitialize Technical Style. k I. A. 1. a.(1)(a) i) a) 1 .1 .1 .1 .1 .1 .1 .1 Technicala5TechnicalTechnical Document Style)WD (1) . a6TechnicalTechnical Document Style)D (a) . 2Ia2TechnicalTechnical Document Style<6  ?  A.   a3TechnicalTechnical Document Style9Wg  2  1.   a4TechnicalTechnical Document Style8bv{ 2  a.   a1TechnicalTechnical Document StyleF!<  ?  I.   2ia7TechnicalTechnical Document Style(@D i) . a8TechnicalTechnical Document Style(D a) . PleadingHeader for numbered pleading paperP@n   $] X X` hp x (#%'0*,.8135@8: #X2PkCLlP# g123str TP d-g123str& faa& G G GG  GS)>#X2PkCLlP# g123int TP D+g123int& yly.(#4UUUUUUUUUUUUUJ&5[J'u(#}|2PkCLlP#test uP 'test#nn#&##nn# o$ YoY$ l o"okU1@]2#X2PkCLlP# beg123rec  TP  beg123rec& faa znz&_K_Y"Y"K_KY"KY"__K K !!KU+@ #X2PkCLlP# end123rec TP  /end123rec N   N N N   NW-BSq #X2PkCLlP# get123level TP  2get123level.(#4UUUUUUUUUUUUUJ&5at'{)#}|2PkCLlP#test uP (testLL&LLLU1@:#X2PkCLlP# bld123fmt  TP  1bld123fmt&U+@?H#X2PkCLlP# out123fmt TP  qout123fmt& xDx.(#4UUUUUUUUUUUUUJ&5[J'u(#}|2PkCLlP#test uP 'test& l(l wew (r( [ } Y cvv vov pw$w %ww n#nr&h7hb b 7h7b 7b hh7W-B#X2PkCLlP# get123level TP  get123level 7 7 77  7   8 [[8U+@##X2PkCLlP# bak123fld TP  bak123fld$oo$&$$oo$ o% ZoZ%U1@"#X2PkCLlP# chk123fld  TP  chk123fld& d d  d d   d U+@ ? #X2PkCLlP# bld123fmt TP  H bld123fmtHd HB"B"d Hd B"d B"HHd U+@ w  #X2PkCLlP# bld123lab TP  +H bld123labV5VP"P"5V5P"5P"VV5 6 !!6T*?.T #X2PkCLlP# rd123fld TP rd123fld$7$|+|+7$7|+7|+$$7S)>u&Q)#X2PkCLlP# i123toa TP &i123toa& rZr.(#4UUUUUUUUUUUUUJ&5[J'u(#}|2PkCLlP#test uP 'test#nn#&##nn# o$ YoY$ l(l k l jjV2APR#X2PkCLlP# chk123nfld  TP  chk123nfld&rHrk k HrHk Hk rrHW-B#X2PkCLlP# get123level TP  ,get123level H H HH  H   H ``HT*?#X2PkCLlP# rd123fld TP $,rd123fldTHTN"N"HTHN"HN"TTH H !!HU+@ #X2PkCLlP# chk123fld TP  7,chk123fld$H$z+z+H$Hz+Hz+$$H %%I **IU+@&)#X2PkCLlP# bak123fld TP  c&-bak123fld     W-B  {J #X2PkCLlP# ret123match TP  Zs ret123match& (l( xix.(#4UUUUUUUUUUUUUJ&5[J'u(#}|2PkCLlP#test uP 'test1{{1&11{{1 l|l1 =|=1 l(l k i o"okV2A =#X2PkCLlP# chk123nrec  TP  ]chk123nrec&rHrk k HrHk Hk rrHW-B#X2PkCLlP# get123level TP  ,get123level H H HH  H   I __IT*?#X2PkCLlP# rd123rec TP -rd123recTHTM"M"HTHM"HM"TTH H !!HU+@ #X2PkCLlP# chk123rec TP  ,chk123rec$I$++I$I+I+$$I !%!%J **JU+@%) #X2PkCLlP# bak123rec TP  %&4bak123rec& sis (i(.(#4UUUUUUUUUUUUUJ&5at'{)#}|2PkCLlP#test uP (test& vLv ww  { x[! H!H!&W W QQW QQW W W-B ?#X2PkCLlP# get123level TP  hget123levelLL&LLL M ``MV2A]V#X2PkCLlP# chk123sfld  TP  1chk123sfld&W-B5#X2PkCLlP# ret123match TP  c^ret123match$$$$Y/D"Z#X2PkCLlP# i123toa TP   i123toa&   .(#4UUUUUUUUUUUUUJ&5[J'u(#}|2PkCLlP#test uP 'test& l(l k i jj& H H HH  HW-B#X2PkCLlP# cmp123drdir TP  e,cmp123drdirWIWP"P"IWIP"IP"WWIX.C1-!#X2PkCLlP# cmp123drlead TP  .cmp123drlead        TT U+@ M #X2PkCLlP# chk123fld TP  v chk123fld$H$~+~+H$H~+H~+$$HW-B% *#X2PkCLlP# ret123match TP  %-ret123match& nkn&fHf_ _ HfH_ H_ ffHW-B#X2PkCLlP# get123level TP  get123level#nn#&##nn# o$ YoY$U1@])#X2PkCLlP# chk123rec  TP  chk123rec& (i(.(#4UUUUUUUUUUUUUJ&5at'{)#}|2PkCLlP#test uP (test& vLv ww  { x[! H!H!&W W QQW QQW W W-B ?#X2PkCLlP# get123level TP  hget123levelLL&LLL M ``MV2A]V#X2PkCLlP# chk123sfld  TP  1chk123sfld&W-B5#X2PkCLlP# ret123match TP  c^ret123match$$$$Y/D"Z#X2PkCLlP# i123toa TP   i123toa&    tT #dp@~rQwl@#ъp FIPS PUB 123 Function Library Software Documentation Section Four: Routine Descriptions p'5/93`!(#V4'#dp@~rQwl@#X` hp x (#%'0*,.8135@8:pQWm@#  uT ^ The bak123fld Structure Tree à 00*$$'#+"!0 $(#(#(#(#!'#$00*$$'#+"!0  uT ɿ uS ` `  $hh*06pp<B  H bak123rec ĆROUTINE: bak123rec PURPOSE: ` ` To back up to the beginning of the last record read or written.(#` ARGUMENT LIST:  tT  ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tTa  ` ` fp $hh*PTR06Ipp<FILE POINTER  tT) ` ` status $hh*INT06Opp<STATUS ` `  $hh*06pp<0 = FAILURE  tT  hh*0 6pp<1 = OKAY  tT  hh*06pp<2 = START OF RECORD  tTI  hh*06pp<3 = END OF RECORD  tT  $ 06pp<4 = END OF FILE  tT  hh* 06pp<5 = END OF FIELD  tT  hh*06pp<6 = START OF FIELD  tTi ` ` bak123rec()$hh*LOGICAL6Opp<SUCCESS FLAG EXTERNAL FUNCTION REFERENCES:  tT  ` ` NAME $hh*DESCRIPTION  tT  ` ` end123rec()` $Xhh*TO COMPLETE THE PROCESSING OF A DATA RECORD AND FREE ITS SPACE(#h  tT ` ` get123level()hh*RETRIEVES APPROPRIATE DATA STRUCTURE LAYER(#h  tTq ` ` stc123empty()hh*DETERMINES IF A DATA RECORD STRUCTURE IS EMPTY(#h GLOBAL REFERENCES: ` ` DATA RECORD STRUCTURE (DR) ` ` FILE MANAGEMENT STRUCTURE (FM) ` ` RECORD POINTER STRUCTURE (RP) GLOBAL VARIABLES:  tTA ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tT ` ` cur_fm$hh*PTR06I/Opp<CURRENT POINTER TO FILE(#p ` `  $hh*06pp<MANAGEMENT STRUCTURE ENTRY )#0*$$ԌGLOBAL CONSTANTS: ` ` NONE PROCESSING:  uT@ ` ` Routine bak123rec() backs up one DR in the file pointed to by fp. The internal file pointer is repositioned but the DR is not loaded  uT into the data structures. If bak123rec() is invoked for a file opened in write mode and the record residing in memory was not unloaded to the file, the data structures are discarded.(#`  tTJ ` ` Processing begins by obtaining the appropriate fm structure based  tTv upon fp. If the file was opened in write mode and the header of  tT the dr structure is not 'NULL':(#`  uT ` ` X oX$ stc123empty() is invoked to determine if a DR currently resides in memory(#  tT ` ` X oX$If a partial record exists, the open mode is  uT temporarily changed to read and end123rec() is invoked to remove the data structures from memory. (The open  uT mode is temporarily changed because end123rec() initiates the unloading of the data structures to a file opened in write mode.)(#  tT ` ` X oX$The open mode is then reset to 'write'(#  tT ` ` X oX$The partial flag is set to 'true' (1).(# #0*$$Ԍ` ` If the partial flag is not true:(#`  tTX ` ` X oX$The current rp structure pointer in the FM structure is compared to the list header pointer. If the y are  tT equal, indicating that the current rp structure is the  tT first in the list, status is set to 'failure' and  uT  bak123rec() returns 'failure' since the software cannot back up prior to the first record. Otherwise, the internal file pointer, is moved to the starting location of the previous DR according to the current  tT rp structure(#  tT ` ` X oX$If the current rp structure record indicates the corresponding record contains the first 'R' leader  tTi identifier, the no leader flag and the no leader rp  tT structure pointer contained in the fm structure are reinitialized to false (0) and 'NULL', respectively(#  tT ` ` X oX$The rp structure is updated and the structure corresponding to the current DR is removed from the list.(#  tT ` ` If the file was opened in read mode and the dr structure list  uT resides in memory, end123rec() is invoked to remove the data structures from memory.(#`  tTz ` ` X oX$If the 'no leader' flag nld indicates the leader 'R',  tT set the current dr pointer to 'NULL'(#  tT! ` ` X oX$The subfield state is set to 'out of bounds' (4) and  uT*#  bak123rec() returns success.(#*# 0*$$Ԍ uT ԙ` ` During processing, bak123rec() returns an error when:(#`  tTY ` `  o$An invoked routine or C library function fails(#  tT ` `  o$Trying to back up past the first DR.(# A!I|.(#ddBAK_REC.GEM <*j#dp@~rQwl@#  uT ^ The bak123rec Structure Tree ă$(#(# (#(#A'#$ 05! 0*$$'#l(A 0  uT '#Gl uS ` `  $hh*06pp<B  H bak123sfld ćROUTINE: bak123sfld PURPOSE: ` ` To retrieve the last subfield read from a DR or written to a DR.(#` ARGUMENT LIST:  tT  ` ` NAME $hh*TYPE06USEpp<DESCRIPTIONē  tT ` ` fp $hh*PTR06Ipp<FILE POINTER  tTa ` ` status$hh*INT06Opp<STATUS ` `  $hh*06pp<0 = FAILURE ` `  $hh*06pp<1 = OKAY ` `  $hh*06pp<2 = START OF RECORD ` `  $hh*06pp<3 = END OF RECORD ` `  $hh*06pp<4 = END OF FILE (DR) ` `  $hh*06pp<5 = END OF FIELD ` `  $hh*06pp<6 = START OF FIELD  tT ` ` bak123sfld()hh*LOGICALh6OXpp<SUCCESS FLAG(#p EXTERNAL FUNCTION REFERENCES:  tT ` ` NAME $hh*DESCRIPTION  tTQ ` ` bak123sfld() hh*BACKS UP TO BEGINNING OF LAST SUBFIELD READ OR WRITTEN MAXIMUM OF 1 LEVEL OF RECURSION(#h  tT ` ` get123level() hh*RETRIEVES APPROPRIATE DATA STRUCTURE LAYER xh  tTq ` ` rd123sfld()$Xhh*READS THE NEXT SUBFIELD xh  tT9 ` ` rt123pvfld() hh*RETRIEVES PREVIOUS FIELD xh  tT ` ` rt123pvsfld() hh*RETRIEVES PREVIOUS SUBFIELD xh GLOBAL REFERENCES: ` ` DATA RECORD DATA VALUE SUBFIELD STRUCTURE (DV) ` ` DATA RECORD STRUCTURE (DR) ` ` DIMENSION LENGTHS STRUCTURE (DM) ` ` FILE MANAGEMENT STRUCTURE (FM) )# 0*$$ԌGLOBAL VARIABLES:  tT ` ` NAME  $ hh*TYPE06USEpp<DESCRIPTION  tT  ` ` cur_fm$ hh*PTR06I/Opp<CURRENT POINTER TO FILE MANAGEMENT STRUCTURE ENTRY(#p  tT ` ` glb_str[MAXSIZ]hh*CHAR06I/Opp<GLOBAL CHARACTER STRING USED FOR PROCESSING(#p GLOBAL CONSTANTS: ` ` NONE PROCESSING:  uTH ` ` Routine bak123sfld() backs up one DR subfield by locating the appropriate data structures for the previous subfield read or written. When backing up one subfield for a file opened in write  uT mode, bak123sfld() locates the appropriate data structures corresponding to the subfield which precedes the current subfield. It then erases the latter subfield by removing its data structures from memory. For a file opened in read mode, the routine locates the appropriate structures preceding the current subfield, but  uT leaves the latter intact. Routine bak123sfld() invokes itself for a maximum of one level of recursion. (#`  tT/ ` ` Processing is initiated by obtaining the appropriate fm structure  uT[ based upon file pointer fp. Routine rt123pvsfld() retrieves the structure pointers for the previous subfield. If it returns a 'failure', the previous subfield is contained in the previous DR field and the following are performed:(#`  uT8! ` `  o$Routine rt123pvfld() is invoked to retrieve the structure pointers to the field(# # 0*$$Ԍ tT ` `  o$If the current dr structure is the DR header,  uT,  rt123pvfld() is invoked a second time to retrieve the previous field from the previous DR(#  tT ` ` X oX$The data values pointer and the dimension lengths  tT pointer are then initialized to the header of the dv  tT  structure and the dm structure lists, respectively:(#  tTa ` ` X X$Xhh*©X0The read status is initialized to  uT 'out of bounds' (4) and rd123sfld()   tT is invoked repeatedly until the 'end of field' (5) or the 'end of record' (3) status is returned. If  uT>  rd123sfld() returns a start of record status and the next value and  tT next value set in the dv structure  tT list are 'NULL', status is set to 'end of field'   tTG ` ` X X$Xhh*©X0If the file was opened in write mode,  uTs  rt123pvsfld() is invoked to retrieve the previous subfield (#  tT ` ` X X$Xhh*©X0If the file was opened in read mode,  uT$  bak123sfld() is invoked to back up to the beginning of the last subfield read.(#  uT ` ` Otherwise, if rt123pvsfld() does not fail in the beginning of the processing, the subfield state is examined as follows:(#` .# 0*$$Ԍ tT ` ` X oX$If the subfield state is 'number of dimensions' (1),  tT, the current dr structure pointer is examined to determine if it is either the header or the next  tT structure of the dr structure list. If the current dr structure is the header or the structure following the header, the read status is set to 'start of record' (2); otherwise, it is set to 'start of field' (6).(#  tT` ` ` X oX$If the subfield state is 'data value' (3), the status is determined by the values of several structures. If  tT the current dr structure indicates zero dimensions and  tT either the current dv structure pointer is 'NULL' or  tT it is the header dv structure, the current dr structure pointer is compared to the structure following the header. If these two pointers are not  tT the same, status is set to 'start of field'; otherwise, it is set to 'start of record'. (# ` ` For files opened in write mode the following processing is performed depending on the subfield state:(#`  tT ` ` X oX$If the state is 'data value' or 'out of bounds' (4):(#  tT ` ` X X$Xhh*©X0Selected data value structures are released and set to 'NULL'. If the  tTL current dv structure pointer is the header  tTx of the structure list, the dv structure  tT pointers of the current fm structure are set to 'NULL'. Additionally, the header  tT! dv structure is released and set to 'NULL'(# (#0*$$Ԍ tT ` ` X X$Xhh*©X0If the 'number of dimensions'is zero, the  tT, previous dr structure is located and assigned to the current pointer. If the  tT DR contains a leader: the current dm structure pointer is set to 'NULL'; the  tT next dr structure is removed from the  tT list; if the dr header is the only  tT4 remaining dr structure in the list, it is released and set to 'NULL'; and the subfield state is set to 'out of bounds'. However, if the 'number of dimensions' is not zero, the subfield state is set to 'data value'(#  tTh ` ` X X$Xhh*©X0If the current dv structure pointer is not 'NULL' nor is it the header of the structure list, the next value is removed from the list. If the next value does not exist, but the data value in the next value set exists, it is released and its pointers are set to 'NULL'. If the  tT current dv structure is 'NULL', the read status is set to 'failure' and  uT  bak123sfld() returns a 'failure'(#  tTM ` ` X oX$If the subfield state is 'dimension length' (2), the  tTy next dimension length pointer in the dm structure list is released and set to 'NULL'(#  tT! ` ` X oX$If the subfield state is 'number of dimensions':(# )#0*$$Ԍ tT ԙ` ` X X$Xhh*©X0The current dm structure pointer is set to 'NULL' and, if the dimension length  tTX pointer of the current dr structure exists, it is released and set to 'NULL'(#  tT ` ` X X$Xhh*©X0The subfield state is set to 'out of  tT bounds'. The current dr structure is  tT4 processed in the same manner as described for processing the state of 'data value' or 'out of bounds' and zero dimensions.(#  uT ` ` During processing, bak123sfld() returns an error when:(#`  tT= ` `  oX$An invoked routine fails(# ` ` (#`  tT ` `  o` $The subfield state is 'data value' or 'out of bounds'  tT and the current dv structure pointer is 'NULL'.(# 0*$$ a!I|.(#ddBAK_SFLD.GEM<*Gle#dp@~rQwl@#  uT , The bak123sfld Structure Tree$(#(#(#(#a'#$00*$$'#c!a0  uT '#y;Gl uS ` `  $hh*06pp<B  H beg123ddrec ĈROUTINE: beg123ddrec PURPOSE: ` ` X To insert a header structure for a DDR data structure and initialize head pointers and status flags.(# ARGUMENT LIST:  tTm ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tT ` ` fp $hh*PTR06Ipp<FILE POINTER  tT ` ` beg123ddrec() hh*LOGICAL6OXpp<SUCCESS FLAG(#p EXTERNAL FUNCTION REFERENCES:  tT ` ` NAME $hh*DESCRIPTION  tTu ` ` del123fmt()$hh*DELETES FORMAT TREE(#`  tT= ` ` del123labs()hh*DELETES LABELS TREE(#`  tT ` ` get123level()hh*RETRIEVES APPROPRIATE DATA STRUCTURE LAYER(#` GLOBAL REFERENCES: ` ` DATA DESCRIPTIVE FILE CONTROL RECORD STRUCTURE (CR) ` ` DATA DESCRIPTIVE LEADER STRUCTURE (DL) ` ` DATA DESCRIPTIVE RECORD STRUCTURE (DD) ` ` DATA DESCRIPTIVE TAG PAIR STRUCTURE (TL) ` ` FILE MANAGEMENT STRUCTURE (FM) GLOBAL VARIABLES:  tTe ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tT ` ` cur_fm$hh*PTR06I/Opp<CURRENT POINTER TO FILE(#p ` `  $hh*06pp<MANAGEMENT STRUCTURE ENTRY GLOBAL CONSTANTS:  tT ` ` NAME $hh*TYPE06DESCRIPTION  tTm ` ` NC $hh*CHAR06NULL CHARACTER(#  tT5! ` ` FDCSTYPE$hh*INT0h6RELATIVE POSITION OF THE DATA STRUCTURE TYPE WITHIN THE FIELD CONTROL(# #0*$$ԌPROCESSING:  uTX ` ` Routine beg123ddrec() removes from memory the necessary data  tT structures of the current DDR and allocates a header dd structure  tT for a new DDR. The appropriate fm structure is obtained based  tT upon file pointer fp and the file is rewound. If a cr structure exists, it is removed from memory including its list of tag pairs and the user augmented file description.(#`  tT ` ` If the file was opened in read mode, the dl structure containing the DDR leader is removed from memory.(#`  tT ` ` If the dd structure list exists, it is removed from memory  tT= including its lists of formats and labels. A new header dd structure is then allocated and the no leader flag is reset to zero.(#`  uT ` ` During processing, beg123ddrec() returns 'failure' when an invoked routine fails.(#` F0*$$ !I|.(#ddBEG_DDRE.GEM<*Glf#dp@~rQwl@#  uT The beg123ddrec Structure Tree$(#(#(#(#'#$ 0X0*$$'#c!0  uT y;hBGl uS ` `  $hh*06pp<B  H beg123file ćROUTINE: beg123file PURPOSE: ` ` To open a file for reading or writing.(#` ARGUMENT LIST:  tT  ` ` NAME $hh*TYPE06USEpp<DESCRIPTION(#`  tT ` ` f_name[]$hh*PTR06Ipp<FILE NAME  tTa ` ` mode $hh*CHAR06Ipp<MODE 'W' - write  tT) ` `  $hh*06 pp< 'R' - read  tT ` ` int_level` $hh*PTR06I/Opp<INTERCHANGE LEVEL(#  tT ` ` ice[] $hh*PTR06I/Opp<INLINE CODE EXTENSION INDICATOR(#p  tTI ` ` ccs[] $hh*PTR06I/Opp<CODE CHARACTER SET T(#(#ZINDICATOR(#p  tT ` ` fp $hh*PTR06Opp<FILE POINTER  tT ` ` beg123file() hh*LOGICAL6Opp<OPEN SUCCESSFUL FLAG EXTERNAL FUNCTION REFERENCES:  tT ` ` NAME $hh*DESCRIPTION  tTQ ` ` g123int()$hh*READS AN INTEGER  tT ` ` g123str()$hh*READS A CHARACTER STRING GLOBAL REFERENCES: ` ` DATA DESCRIPTIVE LEADER STRUCTURE (DL) ` ` FILE MANAGEMENT STRUCTURE (FM) ` ` RECORD POINTER STRUCTURE (RP) GLOBAL VARIABLES:  tT ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tTy ` ` cur_fm$hh*PTR06I/Opp<CURRENT POINTER TO FILE(#p ` `  $hh*06pp<MANAGEMENT STRUCTURE ENTRY )#0*$$ԌGLOBAL CONSTANTS:  tT ` ` NAME $hh*TYPE06DESCRIPTION  tT  ` ` NC $hh*CHAR06NULL CHARACTER(# ` `  PROCESSING:  uT ` ` Routine beg123file() opens the specified file, allocates and  tT initializes a new fm structure, and allocates and initializes the  uT) data descriptive leader. Routine fopen() is invoked to open the  tTV binary file based on the input parameter mode. If an fm structure  uT has not been allocated, beg123file() allocates one and initializes  tT it. The fm linked list then inserts a dummy header within the list. All header values are initialized to 'NULL'.(#`  uT3 ` ` For a file opened in read mode, beg123file() retrieves the interchange level, inline code extension indicator, and code character set indicator. If the file is opened in write mode, these parameters must be input and are stored in the data descriptive leader structure.(#`  uT< ` ` Routine beg123file() returns a 'failure' when:(#`  tT ` ` X oX$An invoked routine or function fails(#  tT ` `  o` $The open mode is not 'R' or 'W'(#  tT ` `  o` $The input interchange level is not 1, 2, or 3(#  tT ` `  o` $The input record length is 'NULL'(#  tTE ` `  o` $The remainder of the header is 'NULL'.(# !0*$$ !I|.(#ddBEG_FILE.GEM<*Gle#dp@~rQwl@#  uT , The beg123file Structure Tree$(#(#(#(#'#$ 0,0*$$'#c!0  uT hBIGl uS ` `  $hh*06pp<B  H beg123rec ĆROUTINE: beg123rec PURPOSE: ` ` To insert header structure for a DR data structure and initialize header pointers. All necessary overhead of deleting the previous record is also performed.(#` ARGUMENT LIST:  tT ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tT) ` ` fp $hh*PTR06Ipp<FILE POINTER  tT ` ` beg123rec()` $hh*LOGICAL6Opp<SUCCESS FLAG(# EXTERNAL FUNCTION REFERENCES:  tT ` ` NAME $hh*DESCRIPTION  tT ` ` end123rec()$hh*ENDS DATA RECORD  tTi ` ` get123level() hh*RETRIEVES THE APPROPRIATE DATA STRUCTURE LAYER(#h GLOBAL REFERENCES: ` ` DATA RECORD STRUCTURE (DR)(#` ` ` DATA RECORD LEADER STRUCTURE (RL) ` ` FILE MANAGEMENT STRUCTURE (FM)(#` GLOBAL VARIABLES:  tT9 ` ` NAME $hh*TYPE06USEpp<DESCRIPTION(#`  tT ` ` cur_fm$hh*PTR06Ipp<CURRENT POINTER TO FILE(#p ` `  $hh*06pp<MANAGEMENT STRUCTURE ENTRY GLOBAL CONSTANTS:  tT ` ` NAME $hh*TYPE06DESCRIPTION  tTA ` ` BLNK_SP$hh*CHAR06BLANK SPACE CHARACTER  tT ` ` NC $hh*CHAR06NULL CHARACTER )#0*$$ԌPROCESSING:  uTX ` ` Routine beg123rec() removes from memory the data structures for the current DR and allocates the necessary structures for a new  tT DR. The appropriate fm structure is obtained based upon file  uT pointer fp. If the file was opened in write mode, end123rec() is  tT  invoked to write the current DR to file pointer fp; then the data structures are removed from memory regardless of the open mode.  uTb Routine beg123rec() examines the no leader and no directory flag to determine whether the leader and directory structures need to be allocated.(#` ` ` If the flag is not set, indicating that the subsequent DR contains  tT? a leader, an rl and a dr structure are allocated and initialized.  tTk The rl structure is assigned to the header leader pointer and the  tT dr structure is assigned to the header and current dr structures. However, if the flag is set, indicating that no leader exists in  tT the DR, the current dr structure pointer is set to the header.(#`  uTG  ` ` During processing, beg123rec() returns 'failure' when:(#`  tT ` `  o$An invoked routine or C library function fails(#  tT ` `  oX$Dynamic allocation of an rl structure fails(#  tT ` `  oX$Dynamic allocation of a dr structure fails.(# $0*$$ !..(#ddBEG_REC.GEM<*Gld#dp@~rQwl@#  uT L The beg123rec Structure Tree$(#(#(#(#'#$00*$$'#H!0  uT IQGl uS ` `  $hh*06pp<B  H bld123fmt ĆROUTINE: bld123fmt PURPOSE: ` ` To build a format string from the format control structure.(#` ARGUMENT LIST:  tT  ` ` NAME $hh*0TYPE6pp<USEBDESCRIPTION  tT ` ` string[]$hh*0PTR6pp<O BFORMATTED STRING  tTa ` ` bld123fmt()$hh*0LOGICALpp<OBSUCCESS FLAG EXTERNAL REFERENCES:  tT ` ` NAME $hh*0DESCRIPTION  tT ` ` out123fmt()` $Xhh*0WRITES THE FORMAT CONTROL STRUCTURE(#h GLOBAL REFERENCES: ` ` DATA DESCRIPTIVE RECORD STRUCTURE (DD) ` ` FILE MANAGEMENT STRUCTURE (FM) GLOBAL VARIABLES:  tT ` ` NAME $hh*TYPE06USEpp<DESCRIPTION(#`  tT ` ` cur_fm$hh*PTR06Ipp<CURRENT POINTER TO FILE(#p ` `  $hh*06pp<MANAGEMENT STRUCTURE ENTRY GLOBAL CONSTANTS:  tT ` ` NAME $hh*TYPE06DESCRIPTION  tT! ` ` NC $hh*CHAR06NULL CHARACTER  PROCESSING:  uT5! ` ` Routine bld123fmt() is used to build a format string from the  uTb" format control structure. Routine out123fmt() is invoked to write the format control string to the temporary file. Then, the#0*$$ routine reads the string from the temporary file into the output parameter string and the temporary file is closed.(#`  uT ` ` Routine bld123fmt() fails if any C library functions fail when invoked.(#` !I|.(#ddBLD_FMT.GEM<*Gld#dp@~rQwl@#  uT ^ The bld123fmt Structure Tree$(#(# (#(#'#$ 0#0*$$'#l(0  uT Q VGl uS ` `  $hh*06pp<B  H bld123lab ĆROUTINE: bld123lab PURPOSE: ` ` To build a label string from the DDR label subfield structure.(#` ARGUMENT LIST:  tT ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tT5 ` ` string[]$hh*PTR06Opp<CONCATENATED LABEL STRING  tT ` ` bld123lab()$hh*LOGICAL6Opp<SUCCESS FLAG EXTERNAL FUNCTION REFERENCES: ` ` NONE GLOBAL REFERENCES: ` ` DATA DESCRIPTIVE LABEL SUBFIELD STRUCTURE (SL) ` ` DATA DESCRIPTIVE RECORD STRUCTURE (DD) ` ` FILE MANAGEMENT STRUCTURE (FM) GLOBAL VARIABLES:  tT ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tT} ` ` cur_fm$hh*PTR06Ipp<CURRENT POINTER TO FILE(#p ` `  $hh*06pp<MANAGEMENT STRUCTURE ENTRY GLOBAL CONSTANTS:  tTe ` ` NAME $hh*TYPE06DESCRIPTION   tT ` ` CDL_STR[]$hh*CHAR0 6CARTESIAN VECTOR LABEL DELIMITER * 2/10(#  tT ` ` NC $hh*CHAR06NULL CHARACTER  tTM ` ` VDL_STR[]$hh*CHAR0 6VECTOR DATA ELEMENT DELIMITER ! 2/1(# ` ` (#` PROCESSING:  uT! ` ` Routine bld123lab() is used to build a label string from the DDR label subfield structure. The output parameter is initialized to*#0*$$ a null string and the labels pointer field of the current data descriptive record structure is examined to determine if labels are present. The algorithm for the routine is a loop within a loop. The outer loop retrieves a pointer to a label set and the inner loop retrieves individual labels and concatenates them to the output parameter string. A Cartesian delimiter is placed between each label set and a vector delimiter is placed between each individual label within a given label set.(#`  uT ` ` Routine bld123lab() fails if any C library functions fail when invoked.(#` ` ` This routine does not invoke any lower level routines.(#` =0*$$  uT  V \Gl uS ` `  $hh*06pp<B  H chk123fld ĆROUTINE: chk123fld PURPOSE: ` ` To retrieve a description of the last field read or written.(#` ARGUMENT LIST:  tT ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tT5 ` ` fp $hh*PTR06Ipp<FILE POINTER  tT ` ` fdtag[]$hh*PTR06Opp<FIELD TAG FROM DD STRUCTURE(#p  tT ` ` fdlen[]$hh*PTR06Opp<FIELD LENGTH FROM DR STRUCTURE(#p  tT ` ` fdname[]$hh*PTR06Opp<FIELD NAME FROM DD STRUCTURE(#p  tTU ` ` fdcntrl[]$hh*PTR06Opp<FIELD CONTROLS FROM DD STRUCTURE(#p  tT ` ` fmts[]$hh*PTR06Opp<FIELD FORMAT STRING FROM(#p ` `  $hh*06pp<DD STRUCTURE  tTu ` ` labs[]$hh*PTR06Opp<FIELD LABELS FROM DD(#p ` `  $hh*06pp<STRUCTURE  tT ` ` chk123fld()$hh*LOGICAL6Opp<SUCCESS FLAG EXTERNAL FUNCTION REFERENCES:  tT% ` ` NAME $hh*0DESCRIPTION  tT ԓ` ` bak123fld()` $Xhh*X0RETRIEVES FIELD JUST READ OR ERASES FIELD JUST WRITTEN(#  tTE ` ` bld123fmt()` $Xhh*X0BUILDS THE FORMAT STRING FROM THE FORMAT CONTROL STRUCTURE (#  tT ` ` bld123lab()$ hh*X0BUILDS LABEL STRING FROM THE DDR LABEL SUBFIELD STRUCTURE (#  tTe ` ` get123level() hh*X0RETRIEVES APPROPRIATE DATA STRUCTURE LAYER(#  tT- ` ` i123toa()$hh*0CONVERTS AN INTEGER TO A CHARACTER STRING(#  tT ` ` rd123fld()` $Xhh*X0RETRIEVES A DATA RECORD FIELD(# GLOBAL REFERENCES: ` ` DATA DESCRIPTIVE RECORD STRUCTURE (DD) ` ` DATA RECORD STRUCTURE (DR) ` ` FILE MANAGEMENT STRUCTURE (FM) #0*$$ԌGLOBAL VARIABLES:  tT ` ` NAME $hh* TYPE06USEpp<DESCRIPTION  tT  ` ` cur_fm$hh* PTR06Ipp<CURRENT POINTER TO FILE(#p ` `  $hh*06pp<MANAGEMENT STRUCTURE ENTRY  tT ` ` glb_str2[MAXSIZ]hh* CHAR06Ipp<GLOBAL CHARACTER STRING USED FOR READING A DATA RECORD FIELD(#p GLOBAL CONSTANTS:  tT` ` ` NAME $hh*TYPE06DESCRIPTION  tT ` ` NC $hh*CHAR06NULL CHARACTER PROCESSING: ` ` (#`  uT ` ` Routine chk123fld() invokes get123level() to retrieve the  tT appropriate data structure layer. The output variable fdtag is assigned the value of the tag subfield of the current data descriptive field. When writing DDRs the field lengths are calculated upon completion; therefore, for a file opened in write  uT} mode, chk123fld() backs up, rereads the field, and calculates the its length. (#`  tT ` ` The field length is assigned to the output parameter fdlen and the  uT. field name is assigned to fdname. Routine bld123fmt() is then  tT[ invoked to build the format string which is stored in fmts.  uT Routine bld123lab() is invoked to build the labels string which is  tT then stored in labs. (#`  uT ` ` During processing, chk123fld() returns an error when external functions fail.(#` e" 0*$$ !I|.(#ddCHK_FLD.GEM!<*Glw#dp@~rQwl@#  uT %hh* hThe chk123fkd Structure Tree$(#(#(#(#'#$ 0,!0*$$'#c!!0  uT  \dGl uS ` `  $hh*06pp<B  H chk123nfld ćROUTINE: chk123nfld PURPOSE: ` ` To get the description of the next field to read or write.(#` ARGUMENT LIST:  tT  ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tT ` ` fp $hh*PTR06Ipp<FILE POINTER  tTa ` ` tag[] $hh*PTR06Opp<FIELD TAG(#p  tT) ` ` fdlen[]$hh*PTR06Opp<FIELD LENGTH FROM DR STRUCTURE(#p  tT ` ` fdname[]$hh*PTR06Opp<FIELD NAME FROM DD STRUCTURE(#p  tT ` ` fdcntrl[]$hh*PTR06Opp<FIELD CONTROLS FROM DD STRUCTURE(#p  tTI ` ` fmts[]$hh*PTR06Opp<FIELD FORMAT STRING FROM DD STRUCTURE(#p  tT ` ` labs[]$hh*PTR06Opp<FIELD LABELS FROM DD STRUCTURE(#p  tT ` ` chk123nfld()hh*LOGICAL6Opp<SUCCESS FLAG EXTERNAL FUNCTION REFERENCES:  tT ` ` NAME $ hh*DESCRIPTION (#h  tTQ ` ` bak123fld()` $Xhh*BACKS UP TO BEGINNING OF LAST FIELD READ OR WRITTEN (#h  tT ` ` chk123fld()` $Xhh*RETRIEVES DESCRIPTION OF LAST FIELD READ OR WRITTEN (#h  tTq ` ` get123level() hh*RETRIEVES APPROPRIATE DATA STRUCTURE LAYER (#h  tT9 ` ` rd123fld()` $Xhh*RETRIEVES DATA RECORD FIELD (#h  tT ` ` ret123match()hh*FINDS THE ASSOCIATED DATA DESCRIPTIVE RECORD MATCH TO THE DATA RECORD (#h GLOBAL REFERENCES: ` ` DATA RECORD STRUCTURE (DR) ` ` FILE MANAGEMENT STRUCTURE (FM) ` ` )#"0*$$ԌGLOBAL VARIABLES:  tT ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tT  ` ` cur_fm$hh*PTR06Ipp<CURRENT POINTER TO FILE MANAGEMENT STRUCTURE ENTRY(#p  tT ` ` glb_str[MAXSIZ]hh*CHAR06Ipp<GLOBAL CHARACTER STRING USED FOR READING A DATA RECORD FIELD(#p GLOBAL CONSTANTS:  tT` ` ` NAME $hh*TYPE06DESCRIPTION  tT ` ` NC $hh*CHAR06NULL CHARACTER PROCESSING:  uT ` ` Routine chk123nfld() retrieves the description of the next field to be read or the last field written. It first invokes  uT  get123level() to retrieve the appropriate data structure level. For a file opened in read mode, the next field is read and  uTR  chk123fld() is invoked to return the description of that field.  uT Function bak123fld() is called to reposition the pointer to its  uT original position. The status value returned in the bak123fld()  tT  function may indicate 'start of record' (2). In this case, an  uT additional invocation of bak123fld() is performed to deallocate the data structure from memory.(#`  uT ` ` For a file opened in write mode, routine chk123fld() invokes  uT  ret123match() to find the associated DDR field matching the DR  uT field. Routine chk123fld() is called to retrieve the description of the field.(#` ##0*$$Ԍ uT ` ` Routine chk123nfld() returns a 'failure' when:(#`  tTY ` ` X oX$An invoked routine fails(#  tT ` `  o` $The open mode is 'write', and the current pointer does not exist.(# !!I|K.(#ddCHK_NFLD.GEM$<*Glf#dp@~rQwl@#  uT , The chk123nfld Structure Tree $(#(#5(#(#!'#$0!$0*$$'#`*!$0  uT dmGl uS ` `  $hh*06pp<B  H chk123nrec ćROUTINE: chk123nrec PURPOSE: ` ` To retrieve a description of the next record to read or write.(#` ARGUMENT LIST:  tT  ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tT ` ` fp $hh*PTR06Ipp<FILE POINTER  tTa ` ` reclen$hh*INT06Opp<RECORD LENGTH(#`  tT) ` ` leadid$hh*CHAR06Opp<LEADER IDENTIFIER  tT ` ` descr[]$hh*PTR06Opp<DESCRIPTION  tT ` ` chk123nrec()hh*LOGICAL6Opp<SUCCESS FLAG ` ` (#` EXTERNAL FUNCTION REFERENCES:  tT ` ` NAME $hh*DESCRIPTION  tTi ԓ` ` bak123rec()$ hh*BACKS UP TO BEGINNING OF LAST RECORD READ OR WRITTEN (#h  tT ` ` chk123rec()` $Xhh*GETS DESCRIPTION FOR LAST RECORD READ (#h  tT ` ` get123level() hh*RETRIEVES APPROPRIATE DATA STRUCTURE LAYER (#h  tT ` ` rd123rec()` $Xhh*READS A DATA RECORD (#h GLOBAL REFERENCES: ` ` FILE MANAGEMENT STRUCTURE (FM) GLOBAL VARIABLES:  tT ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tTY ` ` cur_fm$hh*PTR06Ipp<CURRENT POINTER TO FILE(#p ` `  $hh*06pp<MANAGEMENT STRUCTURE ENTRY  tT ` ` glb_str[MAXSIZ]hh*CHAR06I/Opp<GLOBAL CHARACTER STRING USED FOR PROCESSING(#p GLOBAL CONSTANTS: ` ` NONE )#%0*$$ԌPROCESSING:  uTX   ` ` Routine chk123nrec() retrieves the description of the next record in a file opened in read mode, or of the current record being processed for a file opened in write mode. Processing begins by  uT invoking get123level() to retrieve the appropriate data structure  uT  layer. In the case of a file opened in read mode, chk123nrec()  uT7 invokes rd123rec() to read the next record. Routine chk123nrec() is then called to retrieve the description of that record. Once  uT the next record has been read, chk123nrec() returns the file pointer and data structures to their previous state by invoking  uT  bak123rec() to reread the previous record.(#`  uTB ` ` If the open mode is 'write', chk123rec() is invoked to return the description of the current data record.(#` &0*$$ A!I|.(#ddCHK_NREC.GEM'<* Glk#dp@~rQwl@#  uT , The chk123nrec Structure Tree ă$(#(#(#(#A'#$ 0,'0*$$'#c!A'0  uT mtGl uS ` `  $hh*06pp<B  H chk123nsfld ĈROUTINE: chk123nsfld  PURPOSE: ` ` To get a description of the next subfield to read or write.(#` ARGUMENT LIST:  tT  ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tT ` ` fp $hh*PTR06Ipp<FILE POINTER  tTa ` ` tag[] $hh*PTR06Opp<FIELD TAG(#p  tT) ` ` descr[]$hh*PTR06Opp<OUTPUT DESCRIPTION OF SUBFIELD(#p  tT ` ` frmt[]$ hh*PTR06Opp<FORMAT(#h  tT ` ` chk123nsfld()hh*LOGICAL6Opp<SUCCESS FLAG EXTERNAL FUNCTION REFERENCES:  tT ` ` NAME $hh*DESCRIPTION  tTi ` ` bak123sfld()hh*RETRIEVES LAST SUBFIELD READ OR WRITTEN  tT1 ` ` chk123sfld() hh*GETS DESCRIPTION OF LAST SUBFIELD READ OR WRITTEN (#h  tT ` ` get123level() hh*RETRIEVES APPROPRIATE DATA STRUCTURE LAYER FOR AN INPUT FILE POINTER (#h  tTQ ` ` rd123sfld()` $Xhh*RETRIEVES SUBFIELD OF A DATA RECORD (#h  tT ` ` wr123sfld()` $Xhh*WRITES A SUBFIELD OF A DATA RECORD (#h GLOBAL REFERENCES: ` ` DATA RECORD STRUCTURE (DR) ` ` FILE MANAGEMENT STRUCTURE (FM) ` `   GLOBAL VARIABLES:  tT! ` ` NAME $hh*TYPE06USEpp<DESCRIPTION ` `   tT ` ` cur_fm$hh*PTR06Ipp<CURRENT POINTER TO FILE MANAGEMENT STRUCTURE ENTRY(#p  tTA ` ` glb_str[MAXSIZ]hh*CHAR06I/Opp<GLOBAL CHARACTER STRING USED FOR PROCESSING(#p )#(0*$$ GLOBAL CONSTANTS:  tT ` ` NAME $hh*TYPE06DESCRIPTION  tT  ` ` NC $hh*CHAR06NULL CHARACTER PROCESSING:  uT ` ` Routine chk123nsfld() invokes get123level() to retrieve the appropriate data structure layer. If the input file has been  uT) opened for reading, rd123sfld() is invoked to retrieve the next subfield. A dummy subfield is written when the input file has  uT been opened for writing. Routine chk123sfld() is then invoked to retrieve the description of this new subfield. Routine  uT  chk123nsfld() backs up by invoking bak123sfld() . Backing up a write field erases the dummy subfield. A second call to  uT4  bak123sfld() is made for read files. This is necessary because of  uTa the definition of bak123sfld() . To get back to the previous subfield, backup must be performed twice. Tag, description, and format are returned as output parameters.(#`  uT ` ` Routine chk123nsfld() fails when any invocation of the external reference functions fail.(#` k)0*$$ a!I|.(#ddCHK_SFLD.GEM*<* Gle#dp@~rQwl@#  uT , The chk123sfld Structure Tree$(#(#(#(#a'#$ 0,*0*$$'#c!a*0  uT t{ɿ uS ` `  $hh*06pp<B  H chk123rec ĆROUTINE: chk123rec PURPOSE: ` ` To get a description for the last record read or written. Note: Description will be in the following format:(#` ` `  TAGFD_CNTRLNAMELABELSFORMAT... ` `  TAG... ARGUMENT LIST:  tT) ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tT ` ` fp $hh*PTR06Ipp<FILE POINTER  tT ` ` leadid[]$hh*PTR06O pp<LEADER IDENTIFIER  tTI ` ` reclen$hh*INT06Opp<RECORD LENGTH  tT ` ` descr[]$hh*PTR06Opp<DESCRIPTION  tT ` ` chk123rec()$hh*LOGICAL6Opp<SUCCESS FLAG EXTERNAL FUNCTION REFERENCES:  tT ` ` NAME $hh*DESCRIPTION  tT ` ` chk123fld()` $Xhh*GETS DESCRIPTION FOR LAST READ SUBFLD (#h  tTQ ` ` cmp123drdir() hh*COMPUTES DIRECTORY INFORMATION FOR DATA RECORD (#h  tT ` ` cmp123drlead() hh*COMPUTES INFORMATION NEEDED IN DATA RECORD LEADER (#h  tT ` ` get123level() hh*RETRIEVES APPROPRIATE DATA STRUCTURE LAYER(#h  tTq ` ` ret123match() hh*FINDS THE ASSOCIATED DATA DESCRIPTIVE RECORD MATCH TO THE DATA RECORD(#h GLOBAL REFERENCES: ` ` DATA DESCRIPTIVE RECORD STRUCTURE (DD) ` ` DATA RECORD LEADER STRUCTURE (RL) ` ` DATA RECORD STRUCTURE (DR) ` ` FILE MANAGEMENT STRUCTURE (FM) ` `  GLOBAL VARIABLES:  tT ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tTa" ` ` cur_fm$hh*PTR06Ipp<CURRENT POINTER TO FILE MANAGEMENT STRUCTURE ENTRY(#p)#+0*$$Ԍ tT ` ` glb_str[MAXSIZ]hh*CHAR06Ipp<GLOBAL CHARACTER STRING USED FOR READING A DATA RECORD FIELD(#p  tTX ` ` glb_str2[MAXSIZ]hh*CHAR06Ipp<SECOND GLOBAL CHARACTER STRING USED FOR PROCESSING(#p GLOBAL CONSTANTS:  tT@ ` ` NAME $hh*TYPE06DESCRIPTION  tT ` ` FT_STR[2]$hh*CHAR0X6CHARACTER STRING CONTAINING THE FIELD TERMINATOR(#  tT` ` ` NC $hh*CHAR06NULL CHARACTER  tT( ` ` UT_STR[2]$hh*CHAR0X6CHARACTER STRING CONTAINING THE UNIT TERMINATOR(# PROCESSING:  uT ` ` Routine chk123rec() invokes get123level() to retrieve the appropriate data structure layer. The open mode is examined to see if the file pointer input parameter is a file which was opened for writing. The leader and directory entries of a DR in the process of being written to a file normally have not been computed. If the no leader directory flag has not been set, the  uT directory and the DR leader are computed. Routine chk123rec() then begins to create a tag list structure containing the descriptions of all of the fields in the data record.(#` ` ` The tag list structure contains a pointer to the data description of a DR field and a pointer to the next tag list structure. The  uT tag is then retrieved. Routine ret123match() is then called with this tag value as an input parameter to locate the associated DDR. It is then inserted into the tag list structure.(#` ` ` The tag list structure list is then traversed to retrieve the field descriptions. The field descriptions are retrieved by#,0*$$  uT invoking chk123fld() . Each field description is then concatenated to an output string. The string is returned when all of the field descriptions have been retrieved. The tag list structure is then deallocated.(#`  uT ` ` Routine chk123rec() fails when any of its external functions fail upon invocation.(#` !I|.(#ddCHK_REC.GEM-<* Gld#dp@~rQwl@#  uT ^ The chk123rec Structure Tree$(#(#b (#(#'#$ 0#-0*$$'#*-0Ԍ uT {ɿ uS ` `  $hh*06pp<B  H chk123sfld ćROUTINE: chk123sfld PURPOSE: ` ` To get a description of the last subfield read or written.(#` ARGUMENT LIST:  tT  ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tT ` ` fp $hh*PTR06Ipp<FILE POINTER  tTa ` ` tag[] $hh*PTR06Opp<FIELD TAG(#p  tT) ` ` descr[]$hh*PTR06Opp<OUTPUT DESCRIPTION OF SUBFIELD(#p  tT ` ` frmt[]$ hh*PTR06Opp<FORMAT(#h  tT ` ` chk123sfld()hh*LOGICAL6Opp<SUCCESS FLAG EXTERNAL FUNCTION REFERENCES:  tT ` ` NAME $hh*DESCRIPTION  tTi ` ` get123level() hh*RETRIEVES APPROPRIATE DATA STRUCTURE LAYER FOR AN INPUT FILE POINTER(#h  tT ` ` i123toa()` $Xhh*CONVERTS AN INTEGER TO A CHARACTER STRING(#h  tT ` ` ret123match() hh*RETRIEVES APPROPRIATE DD ENTRY FOR A FIELD(#h GLOBAL REFERENCES: ` ` DATA DESCRIPTIVE LABEL SUBFIELD STRUCTURE (SL) ` ` DATA DESCRIPTIVE RECORD STRUCTURE (DD) ` ` DATA RECORD STRUCTURE (DR) ` ` FILE MANAGEMENT STRUCTURE (FM) ` ` FORMAT CONTROLS STRUCTURE (FC) ` ` LABELS POINTER STRUCTURE (LP) GLOBAL VARIABLES:  tT ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tTy ` ` cur_fm$hh*PTR06Ipp<POINTER TO CURRENT FILE MANAGEMENT STRUCTURE ENTRY(#p )#.0*$$ԌGLOBAL CONSTANTS:  tT ` ` NAME $hh*TYPE06DESCRIPTION  tT  ` ` NC $hh*CHAR06NULL CHARACTER  tT ` ` VDL_STR[]$hh*CHAR06VECTOR DATA ELEMENT DELIMITER (# PROCESSING: ` ` (#`  uT ` ` Routine chk123sfld() retrieves the description of the last  tT subfield read or written, returning the tag, labels (descr), and  tT format (frmt). The appropriate fm layer and dd entry are  uT retrieved by invoking get123level() and ret123match() , respectively. The routine then determines the previous subfield state. This is necessary since the subfield state is always set to the next state anticipated to be read or written. (#` ` ` The subfield state of the current DR may be 'dimension length' (2), 'data value'(3), or 'out of bounds'(4). If the current subfield state is 'dimension length', the previous subfield state may be either 'dimension length' or 'number of dimensions' (1).  tT If the current dimensions length pointer cur_dm equals the header pointer, then the previous subfield state is set to 'number of dimensions'. Otherwise, it is set to 'dimension length'.(#` ` ` If the current subfield state is 'data value', the previous subfield state may be either 'data value' or 'dimension length'. If the current dimension length pointer is 'NULL', the previous subfield state is set to 'data value'; if the current data value pointer equals the data values header or 'NULL', the previous subfield state is set to 'dimension length'.(#` #/0*$$Ԍ` ` The previous subfield state controls the assignment of the output description and format. The output descriptions for a previous subfield state of ''number of dimensions'' or 'dimension length' are "'number of dimensions'" and "DIMENSION LENGTH", respectively.  tT The format string frmt is assigned a value of 'I', representing an integer.(#`  uT4 ` ` If the previous subfield state is 'data value', chk123sfld() builds the format and label strings as follows:(#`  tT ` ` X oX$If the root pointer to the format control structure is  tT not 'NULL', build the format string frmt using the data type field of the current format structure and the width or user delimiter(#  tT ` ` X oX$Traverse the labels pointer structure, retrieving the applicable label values and building the label string  tT descr.(#  uTE ` ` During processing, chk123sfld() returns an error when an invoked function fails.(#` 00*$$ !I|.(#ddCHK_SFLD.GEM1<* Gle#dp@~rQwl@#  uT , The chk123sfld Structure Tree$(#(#(#(#'#$