home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / ibmtsonih / tsnedrdoc.txt < prev    next >
Text File  |  2020-01-01  |  159KB  |  3,046 lines

  1. 1
  2. 0********************************************************************************
  3.  *                                                                              *
  4.  *                                                                              *
  5.  *                                                                              *
  6.  *                                                                              *
  7.  *                                                                              *
  8.  *                                                                              *
  9.  *                                                                              *
  10.  *                                                                              *
  11.  *                                                                              *
  12.  *                                                                              *
  13.  *                                                                              *
  14.  *                                                                              *
  15.  *                                                                              *
  16.  *                                                                              *
  17.  *                                                                              *
  18.  *                                                                              *
  19.  *                                                                              *
  20.  *                                                                              *
  21.  *                                                                              *
  22.  *                                    WYLBUR                                    *
  23.  *                                                                              *
  24.  *                         Edit Format Utility Package                          *
  25.  *                                                                              *
  26.  *                                                                              *
  27.  *                                                                              *
  28.  *                                                                              *
  29.  *                                                                              *
  30.  *                               Computer Center                                *
  31.  *                 Division of Computer Research and Technology                 *
  32.  *                        National Institutes of Health                         *
  33.  *                           Bethesda, Maryland 20205                           *
  34.  *                                                                              *
  35.  *                                                                              *
  36.  *                                                                              *
  37.  *                                                                              *
  38.  *                                                                              *
  39.  *                                                                              *
  40.  *                                                                              *
  41.  *                                                                              *
  42.  *                                                                              *
  43.  *                                January 1983                                  *
  44.  *                                                                              *
  45.  *                                                                              *
  46.  *                                                                              *
  47.  *                                                                              *
  48.  *                                                                              *
  49.  *                                                                              *
  50.  *                                                                              *
  51.  *                                                                              *
  52.  *                                                                              *
  53.  *                                                                              *
  54.  *                                                                              *
  55.  *                                                                              *
  56.  ********************************************************************************
  57. 1
  58. 1                                                                               1
  59. -
  60.                                 Introduction
  61. 0    WYLBUR is a computer program that functions as an  online  interactive  text  |
  62.  editor.  Terminals connected by telephone lines to NIH's IBM System/370 computer  |
  63.  system allow the user to communicate with WYLBUR.  The user uses a collection of  |
  64.  predefined  instructions  or commands to use the facilities available in WYLBUR.  |
  65.  The editing features of WYLBUR provide an easy-to-use  mechanism  for  creating,  |
  66.  changing, searching and displaying all kinds of text, such as computer programs,  |
  67.  letters, proposals, reports,  manuals  and  lists.   WYLBUR's  batch  processing  |
  68.  facilities  allow  the user to submit a computer program to the batch job stream  |
  69.  and examine the output at the terminal.  The document  formatting  facility  has  |
  70.  capabilities such as making the lengths of text lines even, automatically paging  |
  71.  the text, and generating headings, footings, tables  of  contents  and  indices.  |
  72.  WYLBUR's  command  procedure facility provides commands to evaluate expressions,  |
  73.  execute collections of stored commands, perform comparisons and  branching,  and  |
  74.  write programs using all of WYLBUR's facilities.                                  |
  75.                                                                                    |
  76.      The version of WYLBUR described in this  document,  known  as  NIH  Extended  |
  77.  WYLBUR,  was  completely  developed,  designed  and  implemented at the National  |
  78.  Institutes of Health in Bethesda, Maryland.  It is a successor to  the  original  |
  79.  WYLBUR,  which  was  developed at the Campus Facility of the Stanford University  |
  80.  Computation Center, and modified and extended by the NIH Computer Center to meet  |
  81.  the needs of the NIH user community.                                              |
  82.                                                                                    |
  83.      This document describes a main program, associated cataloged procedure,  and  |
  84.  a  collection of subroutines that can be used to read and write edit format data  |
  85.  sets from programs executing in batch and TSO.   Edit  format  is  the  standard  |
  86.  format used by WYLBUR to store data sets.  It is designed to conserve disk space  |
  87.  by compressing strings of blanks.  Each edit format line has an associated  line  |
  88.  number  that  is  stored  in the logical record, separately from the text of the  |
  89.  line.                                                                             |
  90. -
  91.                             Documents Available
  92. 0    The following documents describing the WYLBUR system are available:           |
  93.                                                                                    |
  94.      Fundamentals -- Gives an overview of the WYLBUR system by defining a  subset  |
  95. +    ____________
  96.      of  WYLBUR  commands  in  each  of  four  areas:  editing commands, document  |
  97.      formatting, batch job processing, and command procedures.   The  information  |
  98.      contained  in  this manual is sufficient for most users to use WYLBUR effec-  |
  99.      tively.                                                                       |
  100.                                                                                    |
  101.      Fundamentals Reference Handbook -- Gives the syntax (form) of  the  commands  |
  102. +    ____________ _________ ________
  103.      described  in  the Fundamentals manual, but does not contain descriptions of  |
  104. +                       ____________
  105.      the commands.                                                                 |
  106.                                                                                    |
  107.      General Editing -- Contains the  complete  definition  of  all  the  editing  |
  108. +    _______ _______
  109.      commands  available in WYLBUR.  Users who need more advanced editing facili-  |
  110.      ties than those described in the Fundamentals manual will find  this  manual  |
  111. +                                     ____________
  112.      useful.                                                                       |
  113. -
  114.                                                                      Introduction
  115. 12
  116. -
  117.      Document Formatting -- Gives the complete definition  of  the  commands  for  |
  118. +    ________ __________
  119.      making  the  lengths  of  lines  of  text  even  and also describes the more  |
  120.      advanced facilities that use marker commands to paginate documents.           |
  121.                                                                                    |
  122.      Batch Processing -- Describes the more advanced tools for  submitting  batch  |
  123. +    _____ __________
  124.      jobs and retrieving output.                                                   |
  125.                                                                                    |
  126.      Command Procedures -- Describes how to execute  a  collection  of  prestored  |
  127. +    _______ __________
  128.      commands  and  statements,  and  the provisions for calculating, testing and  |
  129.      controlling the flow of execution.  This manual assumes the user has a basic  |
  130.      knowledge of some programming language and is familiar with other aspects of  |
  131.      WYLBUR.                                                                       |
  132.                                                                                    |
  133.      Reference Handbook -- Contains the syntax (form) of all WYLBUR commands, but  |
  134. +    _________ ________
  135.      does not contain descriptions of the commands.                                |
  136.                                                                                    |
  137.      Master Index -- Provides an index for the following manuals  which  describe  |
  138. +    ______ _____
  139.      the  WYLBUR  system:   Fundamentals   General  Editing  Document Formatting   |
  140. +                           ____________,  _______  _______, ________ __________,
  141.      Batch Processing and Command Procedures                                       |
  142. +    _____ __________     _______ __________.
  143.                                                                                    |
  144.      There are three other documents  published  by  the  Computer  Center  which  |
  145.  WYLBUR users may find useful:                                                     |
  146.                                                                                    |
  147.      Terminal Operator's Guide -- Describes how to use WYLBUR with the  terminals  |
  148. +    ________ __________ _____
  149.      supplied  by  the  Computer  Center.   Information on how to obtain terminal  |
  150.      equipment from the Computer Center is also included.                          |
  151.                                                                                    |
  152.      Users Guide -- Contains information on the facilities available at  the  NIH  |
  153. +    _____ _____
  154.      Computer  Center  and  has  hints on how they can be used.  Programmers must  |
  155.      have this document in order to properly use the batch  processing  facility.  |
  156.      Other WYLBUR users will find certain sections to be of interest.              |
  157.                                                                                    |
  158.      Edit Format Utility Package -- Contains information on a utility program and  |
  159. +    ____ ______ _______ _______
  160.      a set of subroutines for reading and writing WYLBUR edit format data sets in  |
  161.      batch jobs and TSO programs.                                                  |
  162.                                                                                    |
  163.      The Computer Center also publishes Interface  a series of informational news  |
  164. +                                       _________,
  165.  letters  that describe new facilities at the Computer Center.  A special depart-  |
  166.  ment, entitled "WYLBUR Wisdom", includes articles that enable  WYLBUR  users  to  |
  167.  perform their tasks more efficiently.  Discussions of current problems and hints  |
  168.  on how to use computers more effectively are included in the  "Technical  Notes"  |
  169.  section.   It is essential that each WYLBUR user subscribe to Interface and read  |
  170. +                                                              _________
  171.  the appropriate sections in order to keep up to  date  on  the  developments  in  |
  172.  WYLBUR.                                                                           |
  173.                                                                                    |
  174.      All documentation described in this section can be  obtained  by  contacting  |
  175.  the  Computer  Center  Technical  Information  Office,  Building 12A, Room 1017,  |
  176.  telephone number (301)-496-5431.                                                  |
  177. -
  178. -
  179. 0Documents Available
  180. 1                                                                               3
  181. -
  182.                              Using This Manual
  183. 0    This manual,  the  Edit  Format  Utility  Package   completely  defines  the  |
  184. +                       ____  ______  _______  _______,
  185.  facilities  available  to read and write edit format data sets in batch jobs and  |
  186.  TSO.  This manual assumes that the user is familiar with  the  standards  estab-  |
  187.  lished  by the Computer Center for running jobs.  These standards are documented  |
  188.  in the Users Guide   The manual is organized to serve both as  a  learning  text  |
  189. +       _____ _____.
  190.  and a reference manual.                                                           |
  191.                                                                                    |
  192. -
  193. -
  194. -
  195. -
  196. -
  197. -
  198. -
  199. -
  200. -
  201. -
  202. -
  203. -
  204. -
  205. -
  206. -
  207. 0                                                               Using This Manual
  208. 14
  209. -
  210. -
  211. -
  212. -
  213. -
  214. -
  215. -
  216. -
  217. -
  218. -
  219. -
  220. -
  221. -
  222. -
  223. -
  224. -
  225. -
  226. -
  227. -
  228. 0Using This Manual
  229. 1                                                                               5
  230. -
  231.                             EDSUTIL Main Program
  232. -                           Program Description
  233. 0    The EDSUTIL program is used to copy or  list  sequential  data  sets.   Edit
  234.  format  data  sets  may be converted to non-edit format and non-edit format data
  235.  sets may be converted to edit format.  DD statements are used to define the data  |
  236.  sets to be copied or listed.  Members of a partitioned data set may be processed  |
  237.  by specifying the member name on the DD statement.  Multiple copying  operations
  238.  may  be  used  to  combine multiple data sets and copy to one or more data sets.
  239.  The data sets being copied or the data sets created by the copying mechanism may
  240.  be listed.  There are options provided to permit the user to describe the method
  241.  used for handling line numbers.  Also, the user may  call  programs  to  be  ex-
  242.  ecuted,  and upon completion of execution of each program, return control to the
  243.  EDSUTIL program.  This program uses the subroutines provided for users to handle
  244.  edit  format  data  sets  (EDINIT,  EDOPEN, EDGET, EDPUT, EDCLOS, EDTERM, etc.).  |
  245.  Commands, which are described below, are used to specify the  processing  to  be  |
  246.  performed on the data set.
  247. 0    The main purpose of the EDSUTIL program is to convert data sets between edit
  248.  and  non-edit  format.   The  program also allows copying data sets from edit to
  249.  edit format, or from non-edit to non-edit format.  The EDSUTIL  program  may  be
  250.  used  to  change  the  record format when copying non-edit format data sets.  In
  251.  general, however, it may be more efficient to use programs  other  than  EDSUTIL
  252.  when  not  converting between edit and non-edit format.  This is because EDSUTIL
  253.  handles records on a logical record basis,  which  is  not  as  efficient  as  a
  254.  program which handles records on a physical block basis.
  255. -
  256.                          Job Control Language (JCL)
  257. 0    Each data set referenced by a command must have a DD statement  supplied  by
  258.  the  user  (or,  in  the  case  of  TSO, an appropriate ALLOCATE command must be
  259.  issued).  The ddname specified for a data set on the DD statement is used in the
  260.  commands to indicate the data set to be processed.  If a data set to be accessed  |
  261.  by EDSUTIL has the DCB attributes of RECFM=U and BLKSIZE greater than  or  equal  |
  262.  to  1022, it is assumed to be an edit format data set.  In the case of writing a
  263.  data set, if no DCB parameters are specified on the associated DD statement  and
  264.  the  data set is not directed to a SYSOUT class, the data set is written in edit
  265.  format.
  266. 0    A DD statement should be included in the JCL to  obtain  a  listing  of  the
  267.  commands  specified for the EDSUTIL program and to obtain messages issued by the
  268.  EDSUTIL program.  The default ddname of this DD statement is SYSPRINT.  The PARM
  269.  field  (described  below) may be used to specify another ddname.  If there is no
  270.  DD statement provided for the  listing,  and  an  error  occurs  during  EDSUTIL  |
  271.  processing,  an NIH2001 message describing the error will be issued, followed by  |
  272.  an ABEND with a user completion code of 2001.
  273. -
  274. -                                                   EDSUTIL:  Program Description
  275. 16
  276. -
  277.      The default ddname of the input data set containing the commands  is  SYSIN.
  278.  This  may  be  overridden  by  specifying another input ddname in the PARM field
  279.  (described below).  EDSUTIL assumes that line numbers are stored in the data set
  280.  containing  the commands.  For non-edit format data sets, the columns where line
  281.  numbers are stored depends on the format of the data set:
  282. 0F format  --  last 8 positions of each record
  283.  U format  --  first 8 positions of each record
  284.  V format  --  first 8 positions of each record
  285. 0To find out how to specify that line numbers are not  stored  in  the  data  set  |
  286.  containing the commands, see the description of the PARM field.                   |
  287. 0    The EDSUTIL program sets step completion codes indicating the results of its
  288.  processing:
  289. 00   Processing completed normally.
  290. 04   Processing completed.  However, some minor errors occurred.   Messages  were
  291.      produced describing the conditions.                                           |
  292. 08   Processing completed.  However,  some  errors  which  may  be  serious  have
  293.      occurred.  Messages were produced describing the conditions.                  |
  294. 012  A command was terminated before it was completed.   Messages  were  produced  |
  295.      describing the error.
  296. -
  297.                                   Commands
  298. 0    Commands are used to provide instructions  for  the  EDSUTIL  program.   The
  299.  general format of the commands follows the syntax of WYLBUR commands.
  300. 0    Comments may be used in commands by beginning the  comment  with  a  percent
  301.  sign  (%).   The comment is terminated by the end of the line.  A blank or empty
  302.  line is treated as a comment line.
  303. 0    More than one command may be included in a line by separating  the  commands
  304.  with a semicolon (;).  A command may be continued by including two percent signs
  305.  (%%) at the location where the command is being split.  The next line is used as
  306.  the continuation line unless it is a blank line or a comment line.  Any informa-
  307.  tion which is on the same line and follows the two percent signs (%%) is treated
  308.  as  a  comment.  The percent signs must appear after a complete option; that is,
  309.  if an option of a command consists of more than  one  word,  the  percents  must
  310.  follow the last word in the option.
  311. 0    The abbreviations used in WYLBUR may also be used to abbreviate any  of  the
  312.  commands or options for the EDSUTIL program.
  313. -
  314. -
  315.  EDSUTIL:  Job Control Language
  316. 1                                                                               7
  317. -
  318.  COPY COMMAND
  319. +____ _______:
  320. 0    The COPY command is used to copy a data set to another data set.  Conversion
  321.  to  and  from  edit format is supported.  A data set is designated by specifying
  322.  the ddname associated with the DD statement which defines  the  data  set.   The  |
  323.  general format of the COPY command is:                                            |
  324. 0COPY DDNAME=input-ddname TO DDNAME=output-ddname
  325. 0where "input-ddname" is the ddname of the DD statement defining the data set  to  |
  326.  be  copied  and  "output-ddname"  is the ddname of the DD statement defining the  |
  327.  data set to be written.  For example, to copy a data set with a ddname of INPUT,  |
  328.  to a data set with the ddname OUTPUT, the following command would be used:
  329. 0COPY DDNAME=INPUT TO DDNAME=OUTPUT
  330. 0    If DISP=MOD is used for a data set being written in edit  format,  the  user
  331.  must  insure  that  the  line  numbers  of the resulting data set will all be in  |
  332.  ascending sequence.                                                               |
  333. 0    If the data set being written is a non-edit format data set, no line numbers
  334.  will be included in the output data set unless the NUMBERED, TSO, IBM, NUMBER or
  335.  TIMES options (see below) are specified.
  336. 0    More than one data set may be copied by including the ddnames  of  the  data
  337.  sets,  separated by the word AND, following COPY and preceding the TO portion of
  338.  the command.  When copying multiple data sets to one edit format data  set,  the
  339.  user must insure that the line numbers for the data set written are in ascending
  340.  sequence.  In particular, careful attention should be made when more than one of
  341.  the data sets being copied is in edit format.  There are options described below
  342.  which provide mechanisms for handling line numbers.
  343. 0    In the following example, the COPY command instructs the EDSUTIL program  to
  344.  copy the contents of the data set with a ddname of IN1, and then the contents of
  345.  the data set with a ddname of IN2, to a data set with the ddname OUTPUT.
  346. 0COPY DDNAME=IN1 AND DDNAME=IN2 TO DDNAME=OUTPUT
  347. 0    To copy data sets to more than one output data set,  the  data  sets  to  be
  348.  written  are  specified  by  including  the  ddnames  of  the  output data sets,
  349.  separated by AND, following the word TO.  For example, to copy a data  set  with
  350.  the  ddname  INPUT to a data set with the ddname OUT1 and to a data set with the
  351.  ddname OUT2, the following command could be used:
  352. 0COPY DDNAME=INPUT TO DDNAME=OUT1 AND DDNAME=OUT2
  353. 0    There are a number of options available to indicate special handling of  the
  354.  data  sets.  These options must be specified after the ddname of each applicable
  355.  data set.  The options may be specified in any order.  If an option is  repeated
  356.  or  if two incompatible options are coded, then only the last one encountered is  |
  357.  used.                                                                             |
  358. -
  359. 0                                                              EDSUTIL:  Commands
  360. 18
  361. -
  362.  LIST                        The contents of the data set are to be listed.  Only
  363.                              the  input  or  the  output can be listed; input and
  364.                              output data sets cannot both be listed.
  365. 0                            The listing is directed to the data set specified by  |
  366.                              the SYSPRINT DD statement or another output data set  |
  367.                              specified in the PARM field (described below).
  368. 0                            If line numbers are  part  of  the  data  set  being
  369.                              listed,  they are included in the listing.  The line
  370.                              number appears to the left of the text of  the  line
  371.                              and is separated from the text by two blanks.
  372. 0                            A number of options are available to specify how the
  373.                              listing  is  to  be  performed.   These options, de-
  374.                              scribed in the LIST command (see below), are:         |
  375. 0                            UNNUMBERED
  376.                              CC
  377.                              MC
  378.                              INDENT n
  379.                              DOUBLE
  380.                              TRIPLE
  381.                              SPACING n
  382.                              MARKER c
  383. 0NUMBERED column/column      Indicates that a  line  number  is  stored  in  each
  384.                              record  of  a  non-edit  format  data set.  The line
  385.                              numbers are located in the  indicated  column  posi-
  386.                              tions  of  each  record.   The  column positions are
  387.                              specified by separating the first and  last  columns
  388.                              with a slash (/).
  389. 0                            The columns may be omitted, in which case the  loca-
  390.                              tion  of  the  line  numbers  depends  on the record
  391.                              format of the data set:
  392. 0                            F format -- last 8 positions  of  the record
  393.                              U format -- first 8 positions of  the record
  394.                              V format -- first 8 positions of  the record
  395. 0                            The numbers located in the specified  positions  are
  396.                              used  as  the line number of each record in the data
  397.                              set.  Any valid WYLBUR absolute line number, with or
  398.                              without  the period, is acceptable.  If the data set
  399.                              is being copied, the line number is removed as  each
  400.                              line  is  copied.  If the data set is being written,
  401.                              the text in the  line  is  moved  to  the  right  to
  402.                              provide  positions for the line number to be stored,
  403.                              unless the MERGE or OVERLAY options  are  specified.
  404.                              The  text  of a line will be truncated on the right,
  405.                              if necessary, to make the length of the  line  equal
  406. -
  407.  EDSUTIL:  Commands
  408. 1                                                                               9
  409. -
  410.                              to  the  record  length.   If more positions are re-
  411.                              quired to write a line number, the  line  number  is
  412.                              truncated on the left.
  413. 0TSO column/column           The TSO option is the same as  the  NUMBERED  option
  414.                              except  that  the line number in the specified posi-
  415.                              tions does not contain a decimal point (.) and is in
  416.                              TSO  (IBM)  format.  To convert a WYLBUR line number
  417.                              to TSO format the line number is padded on the right
  418.                              with zeroes, if necessary, to obtain three digits to
  419.                              the right of the decimal point, and is padded on the
  420.                              left  with  zeroes,  if  necessary,  to  obtain five
  421.                              digits to  the  left  of  the  decimal  point.   The
  422.                              decimal  point is then removed.  To convert from TSO
  423.                              format to WYLBUR format, the decimal  point  is  in-
  424.                              serted  after  the  fifth digit, and if appropriate,
  425.                              zeroes are removed from the right and left  portions
  426.                              of the number.
  427. 0IBM column/column           Synonym for TSO.
  428. 0INSERT                      Used with the NUMBERED, TSO or IBM  options  when  a
  429.                              data  set is being written to indicate that the text
  430.                              in and following the columns where the  line  number
  431.                              is  to  be  stored  is  to  be moved to the right to
  432.                              provide positions  for  the  line  number.   If  the
  433.                              NUMBERED,  TSO  or IBM option is not specified, NUM-
  434.                              BERED is assumed.  INSERT is the default line number
  435.                              insertion technique.
  436. 0MERGE                       Used with the NUMBERED, TSO or IBM  options  when  a
  437.                              data  set is being written to indicate that the line
  438.                              number is to be placed in each line  only  if  there
  439.                              are only blanks in the columns where the line number
  440.                              is to be placed.  The blanks are to be replaced with
  441.                              the line number.  If the NUMBERED, TSO or IBM option
  442.                              is not specified, NUMBERED is assumed.
  443. 0OVERLAY                     Used with the NUMBERED, TSO or IBM  options  when  a
  444.                              data  set is being written to indicate that the line
  445.                              numbers are to replace any text in the columns where
  446.                              the line numbers are to be stored.  If the NUMBERED,
  447.                              TSO or IBM option  is  not  specified,  NUMBERED  is
  448.                              assumed.
  449. 0NUMBER START line-number    NUMBER specifies how line numbers are to  be  gener-
  450.         BY increment         ated for each line in the data set.
  451. 0                            The starting line number  follows  the  word  START.
  452.                              The  word START may be omitted.  If the START option
  453.                              is omitted, a starting line number  of  1  is  used.
  454.                              The  increment  used  to  generate  succeeding  line
  455. -
  456.                                                                EDSUTIL:  Commands
  457. 110
  458. -
  459.                              numbers is chosen by using a 1 in the  last  decimal
  460.                              position of the starting line number.
  461. 0                            The BY option may be used to specify  the  increment
  462.                              to be used to generate succeeding line numbers.  The
  463.                              increment may range from .001 to 99999.999.  If  the
  464.                              START  option  is not specified and the BY option is
  465.                              used, the starting line number is set to  the  value
  466.                              of the increment.
  467. 0                            If the NUMBERED or TSO options are  also  used,  the
  468.                              positions  specified  by  the NUMBERED or TSO option
  469.                              are removed and the line numbers  are  generated  by
  470.                              following  the  method  established  by  the  number
  471.                              option.
  472. 0                            When writing a data set, and the  NUMBERED,  TSO  or
  473.                              IBM  options  are not specified, the NUMBERED option
  474.                              is assumed.
  475. 0                            The NUMBER and TIMES options are mutually exclusive.
  476. 0TIMES factor                Specifies that the line numbers, either generated or
  477.                              stored  in  each  record of the data set, are multi-
  478.                              plied by the specified factor before they are  used.
  479.                              The factor may range from .001 to 99999.999.
  480. 0                            The TIMES and NUMBER options are mutually exclusive.
  481. 0SKIP integer                Specifies the number of lines to be skipped before a
  482.                              line is read or written.
  483. 0TAKE integer                Specifies the number of lines to be read or written.
  484. 0RECFM U                     Indicates that the data set has edit format  charac-
  485.                              teristics (RECFM is U and BLKSIZE is greater than or
  486.                              equal to 1022), but  the  data  set  is  not  to  be
  487.                              treated as an edit format data set.
  488. 0    The following examples illustrate some uses of these options:
  489. 0COPY DDNAME=INPUT TAKE 100 TO DDNAME=OUTPUT
  490. 0    The first 100 records of the data set with a ddname INPUT are  copied  to  a
  491.      data set with the ddname OUTPUT.
  492. 0COPY DDNAME=IN1 LIST AND DDNAME=IN2 LIST TO DDNAME=OUTPUT NUMBER
  493. 0    The contents of data sets with ddnames IN1 and IN2 are listed  to  the  data  |
  494.      set  designated  by  the SYSPRINT DD statement.  The data set being written,  |
  495.      with a ddname OUTPUT, contains the records from the data set with the ddname
  496.      IN1  followed by the records from the data set with the ddname IN2.  Because
  497. -
  498.  EDSUTIL:  Commands
  499. 1                                                                              11
  500. -
  501.      the NUMBER option was specified, the line numbers of each record in the data
  502.      set  written  are  generated  by  using  a  starting line number of 1 and an
  503.      increment of 1.
  504. -LIST COMMAND
  505. +____ _______:
  506. 0    The LIST command is used to obtain a listing of a data set.  The listing  is
  507.  directed  to  the  data set specified by the SYSPRINT DD statement or the output  |
  508.  data set specified in the PARM field (described below).   If  line  numbers  are  |
  509.  being  listed  with  the data set, the line number is separated from the text of
  510.  the line by two blanks.  A data set  is  designated  by  specifying  the  ddname
  511.  associated  with  the DD statement which defines the data set following the word  |
  512.  LIST.  For example, to list the contents of the data set with a ddname of  DATA,
  513.  the following command would be used:
  514. 0LIST DDNAME=DATA
  515. 0    More than one data set may be listed by including the ddnames  of  the  data
  516.  sets,  separated  by  AND, following the word LIST.  The data sets are listed in
  517.  the order in which they appear in the command.  For example, to  list  the  data
  518.  sets with ddnames PROGRAM and DATA, the following command could be used.
  519. 0LIST DDNAME=PROGRAM AND DDNAME=DATA
  520. 0    The TO DDNAME=ddname option may be used to direct the listing to a specified  |
  521.  data set.  For example, the following command could be used to list the data set
  522.  with a ddname of INPUT to the data set defined by a DD statement LISTING:         |
  523. 0LIST DDNAME=INPUT TO DDNAME=LISTING
  524. 0    To direct the listing to more than one data set, the data  sets  to  receive
  525.  the listing are specified by including the ddnames of these data sets, separated
  526.  by AND, following the word TO.  For example, to list the data set with a  ddname
  527.  of  INPUT  to  a  data  set  with the ddname of LIST1 and to a data set with the
  528.  ddname of LIST2, the following command could be used:
  529. 0LIST DDNAME=INPUT TO DDNAME=LIST1 AND DDNAME=LIST2
  530. 0    There are a number of additional options available that may be specified for  |
  531.  each  output  data  set referenced to indicate instructions for how the data set
  532.  listings are to be done.  These options must be specified after  the  ddname  of
  533.  each applicable data set.
  534. 0UNNUMBERED                  Line numbers are not listed.
  535. 0CC                          The data set is processed assuming it contains  ANSI
  536.                              carriage control characters in the first position of
  537.                              each line.  For more information  on  ANSI  carriage
  538.                              control, see the Users Guide.
  539. -
  540. -                                                              EDSUTIL:  Commands
  541. 112
  542. -
  543.  MC                          The data  set  is  processed  assuming  it  contains
  544.                              machine  carriage  control  characters  in the first
  545.                              position of each  line.   For  more  information  on
  546.                              machine carriage control, see the Users Guide.
  547. 0INDENT n                    Indicates the number of blanks to be inserted before
  548.                              the  text  of  each line is listed.  If line numbers
  549.                              are being listed with the data set, the  blanks  are
  550.                              inserted before the line number.
  551. 0DOUBLE                      The output is to be double spaced (i.e.,  one  blank  |
  552.                              line before each line from the data set).  To obtain  |
  553.                              this result, ANSI carriage  control  characters  are  |
  554.                              inserted in each line.  For more information on ANSI
  555.                              carriage control, see the Users Guide.
  556. 0TRIPLE                      The output is to be triple spaced (i.e.,  two  blank  |
  557.                              lines  before  each  line  from  the  data set).  To  |
  558.                              obtain this result, ANSI carriage control characters  |
  559.                              are inserted before each line.  For more information
  560.                              on ANSI carriage control, see the Users Guide.
  561. 0SPACING n                   SPACING n, where "n" is a  positive  integer,  indi-
  562.                              cates that n-1 blank lines should appear before each
  563.                              line in the data set.  To obtain this  result,  ANSI
  564.                              carriage  control  characters  are  used.   For more
  565.                              information on ANSI carriage control, see the  Users
  566.                              Guide.
  567. 0MARKER c                    MARKER c, where "c" is a character,  indicates  that
  568.                              an eject to a new page should be performed if a line  |
  569.                              is encountered that only contains the character  "c"  |
  570.                              in  the  first position.  A line that contains a "c"  |
  571.                              in the first position and other  characters  in  the  |
  572.                              line  is  listed.  To perform the functions provided  |
  573.                              by this option, ANSI carriage control characters are
  574.                              inserted before each line.  The marker character may
  575.                              be enclosed in either  single  or  double  quotation
  576.                              marks.   For  more information on ANSI carriage con-
  577.                              trol, see the Users Guide.
  578. 0    The following options, described above for the COPY command, may be used  to
  579.  specify the characteristics of the input data sets:
  580. 0NUMBERED column/column
  581.  TSO column/column
  582.  IBM column/column
  583.  NUMBER START line-number BY increment
  584.  TIMES factor
  585.  SKIP integer
  586.  TAKE integer
  587.  RECFM U
  588. -
  589.  EDSUTIL:  Commands
  590. 1                                                                              13
  591. -
  592.  CALL COMMAND
  593. +____ _______:
  594. 0    The CALL command is used to execute another main program.  When  the  called
  595.  program  completes  execution,  control  is  returned to the EDSUTIL program and
  596.  commands following the CALL command are executed.  The name of the program to be
  597.  executed  follows the word CALL.  A parameter string may be passed to the called
  598.  program by specifying  a  series  of  characters,  representing  the  parameter,  |
  599.  enclosed  in  single  or  double  quotation marks following the word WITH.  WITH
  600.  appears after the name of the program.  The syntax of the CALL command is:
  601. 0CALL program-name WITH 'string'
  602. 0    The ABORT option is available on the CALL command  to  permit  specifying  a
  603.  condition  to  stop  execution of the EDSUTIL program.  The condition checked is
  604.  the value of the return code from the program called.  The syntax of  the  ABORT
  605.  option is
  606. 0ABORT IF RC relational-operator integer
  607. 0The valid relational-operators are:
  608. 0O_e_a_o_            M_a_i_g
  609. +_p_r_t_r            _e_n_n_
  610. 0   EQ               Equal
  611.     NEQ (or NE)      Not equal                                                     |
  612.     LT               Less than (same as NGE)
  613.     NLT              Not less than (same as GE)
  614.     LE               Less than or equal (same as NGT)
  615.     NLE              Not less than or equal (same as GT)
  616.     GE               Greater than or equal (same as NLT)
  617.     NGE              Not greater than or equal (same as LT)
  618.     GT               Greater than (same as NLE)
  619.     NGT              Not greater than (same as LE)
  620. 0The return code is compared  to  the  integer,  using  the  relational  operator
  621.  specified.  If the comparison is true, the EDSUTIL program stops execution.  For
  622.  example, if the following command were issued, the EDSUTIL  program  would  stop
  623.  execution if the program named CALC returned a code greater than or equal to 8:
  624. 0CALL CALC ABORT IF RC GE 8
  625. 0Only the word ABORT, optionally followed  by  the  relational-operator  and  the
  626.  integer  are  required.   If  both  the  relational-operator and the integer are
  627.  omitted, then ABORT IF RC GT 0 is assumed.
  628. 0    The Job Control Language required for the EDSUTIL program and for the  other
  629.  program to be executed must be included in the job.
  630. 0    The amount of memory (core storage)  required  by  the  EDSUTIL  program  is
  631.  approximately  100K  bytes.   If  the  user calls another program, the amount of  |
  632.  storage requested must include the storage required by the called  program  plus
  633. -
  634. 0                                                              EDSUTIL:  Commands
  635. 114
  636. -
  637.  the  100K  bytes required by the EDSUTIL program, plus the buffer space required  |
  638.  for data sets defined by the user.
  639. -
  640.                                  PARM Field
  641. 0    The input statements to the EDSUTIL program are  provided  by  the  commands  |
  642.  described  above.   The  ddnames  of  the  DD statements that describe where the  |
  643.  commands are located and where they are to be listed may  be  specified  in  the  |
  644.  PARM field.  The following options may be included in the PARM field:             |
  645.                                                                                    |
  646.  SYSIN=in-ddn            The ddname of the  DD  statement  that  describes  where  |
  647.                          commands are located.  The default is to assume a ddname  |
  648.                          of SYSIN.                                                 |
  649.                                                                                    |
  650.  SYSPRINT=out-ddn        The ddname of the DD statement that describes where  the  |
  651.                          commands will be listed and where messages issued by the  |
  652.                          EDSUTIL program will be  printed.   The  default  is  to  |
  653.                          assume a ddname of SYSPRINT.                              |
  654.                                                                                    |
  655.  UNNUMBERED              The data set containing the commands  does  not  contain  |
  656.                          line  numbers.   The  default is to assume that the data  |
  657.                          set contains line numbers.                                |
  658.                                                                                    |
  659.  ABEND                   The data management abends (e.g., x13, x14, x37  abends)  |
  660.                          are  not to be intercepted.  The default is to intercept  |
  661.                          data management abends and to print a message indicating  |
  662.                          the abend.                                                |
  663.                                                                                    |
  664.  MESSAGES=n              After the same message is printed n times, that  message  |
  665.                          will  no  longer be printed.  A summary of the number of  |
  666.                          times each message is suppressed will  be  listed.   The  |
  667.                          only  messages that can be suppressed are those that may  |
  668.                          occur many times --  for  example,  messages  describing  |
  669.                          errors  that  occur while reading or writing a data set.  |
  670.                          Messages that  generally  do  not  appear  in  abundance  |
  671.                          (e.g., syntax error messages) are never suppressed.  The  |
  672.                          word INFINITY can follow MESSAGES to  indicate  that  no  |
  673.                          messages  will  ever  be  suppressed.  The default is to  |
  674.                          suppress messages  after  they  have  printed  10  times  |
  675.                          (i.e., MESSAGES 10).                                      |
  676.                                                                                    |
  677.  TERMINATE=m             Terminates a command when  the  same  message  has  been  |
  678.                          printed m times.  If a command is terminated, processing  |
  679.                          will continue with the next command.  The only  messages  |
  680.                          for which a count is kept are those that may potentially  |
  681.                          occur numerous times -- for example, messages describing  |
  682.                          errors  that  occur while reading or writing a data set.  |
  683.                          Messages that  generally  do  not  appear  in  abundance  |
  684.                          (e.g., syntax error messages) are not counted.  The word  |
  685.                          INIFINITY can follow TERMINATE to indicate that  a  com-  |
  686. -
  687.  EDSUTIL:  Commands
  688. 1                                                                              15
  689. -
  690.                          mand  will  never be terminated because of the number of  |
  691.                          messages.  The default is INFINITY.                       |
  692.                                                                                    |
  693.                                                                                    |
  694.      One command may be included in the PARM field  by  specifying  the  command,  |
  695.  preceded  by  a  slash  (/), as the last option in the PARM field.  The slash is
  696.  required preceding the command, even though the other options may be omitted.  A
  697.  command  included in the PARM field is executed before any commands in the SYSIN
  698.  data set.  The general format of the PARM field is:
  699. 0PARM='SYSIN=in-ddn,SYSPRINT=out-ddn,UNNUMBERED,ABEND,MESSAGES=n,TERMINATE=m/cmd'  |
  700. -
  701.                              EDSUTIL Procedure
  702. 0    The EDSUTIL procedure is defined to provide some of the Job Control Language
  703.  necessary to execute the EDSUTIL program.
  704. 0    The following symbolic parameters available in the EDSUTIL procedure provide
  705.  a method for specifying the options available in the PARM field.  These symbolic
  706.  parameters are optional.
  707. 0Symbolic Parameter     Function
  708. +________ _________     ________
  709. 0UTILOPT                Used to specify the SYSIN, UNNUMBERED,  SYSPRINT,  ABEND,  |
  710.                         MESSAGES and TERMINATE PARM field options.  More than one  |
  711.                         option may be used by separating the options by blanks or  |
  712.                         commas.
  713. 0                       SYSIN
  714. +                       _____
  715. 0                       Code UTILOPT='SYSIN=input-ddname' to specify  the  ddname  |
  716.                         of  the DD statement defining the data set containing the  |
  717.                         commands to the EDSUTIL program.  If used, a DD statement  |
  718.                         with the specified ddname must be included.                |
  719. 0                       The default ddname is SYSIN, defining  the  system  input  |
  720.                         stream.  A SYSIN DD statement may be included to define a  |
  721.                         different input command data set.
  722. 0                       UNNUMBERED
  723. +                       __________
  724. 0                       Code UTILOPT='UNNUMBERED' to indicate that the  data  set  |
  725.                         containing the commands does not contain line numbers.
  726. 0                       The default is to assume that the command input data  set
  727.                         contains line numbers.
  728. -
  729. -
  730. 0                                                            EDSUTIL:  PARM Field
  731. 116
  732. -
  733.                         SYSPRINT                                                   |
  734. +                       ________
  735.                                                                                    |
  736.                         Code  UTILOPT='SYSPRINT=output-ddname'  to  specify   the  |
  737.                         ddname  of  the  DD statement defining the data set where  |
  738.                         the commands will be listed and where messages issued  by  |
  739.                         the  EDSUTIL  program  will  be  printed.   If used, a DD  |
  740.                         statement with the specified ddname must be included.      |
  741.                                                                                    |
  742.                         The default ddname is  SYSPRINT,  defining  the  standard  |
  743.                         printer.   The SYSPRINT DD statement in the procedure may  |
  744.                         be overridden to  define  another  data  set  to  receive  |
  745.                         messages.   If  added,  the  SYSPRINT  DD  statement must  |
  746.                         appear before any additional  DD  statements  being  sup-  |
  747.                         plied.                                                     |
  748.                                                                                    |
  749.                         ABEND                                                      |
  750. +                       _____
  751.                                                                                    |
  752.                         Code UTILOPT='ABEND' to  indicate  that  data  management  |
  753.                         ABENDs  (e.g., x13, x14, x37 abends) are not to be inter-  |
  754.                         cepted.                                                    |
  755.                                                                                    |
  756.                         The default is to intercept data  management  ABENDs  and  |
  757.                         issue a message indicating the error.                      |
  758.                                                                                    |
  759.                         MESSAGES                                                   |
  760. +                       ________
  761.                                                                                    |
  762.                         Code UTILOPT='MESSAGES=n' to indicate the number of times  |
  763.                         the    same    messages    is   to   be   listed.    Code  |
  764.                         MESSAGES=INFINITY to list all of the messages.             |
  765.                                                                                    |
  766.                         The default is to suppress each message after it has been  |
  767.                         printed 10 times.                                          |
  768.                                                                                    |
  769.                         TERMINATE                                                  |
  770. +                       _________
  771.                                                                                    |
  772.                         Code UTILOPT='TERMINATE=n' to indicate that a command  is  |
  773.                         to  terminate after the same message has been generated n  |
  774.                         times.  If  a  command  is  terminated,  processing  will  |
  775.                         continue  with the next command.  Code TERMINATE=INFINITY  |
  776.                         to never terminate a command because  of  the  number  of  |
  777.                         messages.                                                  |
  778.                                                                                    |
  779.                         The default is to never terminate a  command  because  of  |
  780.                         the number of messages (i.e., INFINITY).                   |
  781. 0COMMAND                To specify the first command to be  executed  before  the
  782.                         commands   in   the   command   input   data   set,   use
  783.                         COMMAND='command'.
  784. 0                       The default is to assume that the command input data  set
  785.                         contains all the commands.
  786. -
  787. 0EDSUTIL Procedure
  788. 1                                                                              17
  789. -
  790.                                   Examples
  791. 0    To obtain a listing of an edit format data set named AAAAIII.TEXT, stored on
  792.  FILE19, the following job could be executed.  The job uses the EDSUTIL procedure
  793.  and the symbolic parameter COMMAND to specify the command.  A DD statement  with  |
  794.  the name TEXT defines the data set to be listed.                                  |
  795. 0//    (Class A JOB Statement)
  796.  //        EXEC EDSUTIL,COMMAND='LIST DDNAME=TEXT'
  797.  //TEXT     DD  DSNAME=AAAAIII.TEXT,UNIT=FILE,
  798.  //             VOL=SER=FILE19,DISP=SHR
  799. -    The following example copies an edit format data set to  a  non-edit  format
  800.  data  set  and produces a listing of the copied data set.  The procedure EDSUTIL
  801.  is used.  The ddname of the data set to be copied is IN and the  ddname  of  the
  802.  data set to be written is OUT.
  803. 0//        EXEC EDSUTIL
  804.  //IN       DD  DSNAME=AAAAIII.IN,UNIT=FILE,VOL=SER=FILE10,DISP=SHR
  805.  //OUT      DD  DSNAME=AAAAIII.OUT,UNIT=FILE,VOL=SER=TMP002,
  806.  //             DISP=(NEW,KEEP),DCB=(RECFM=FB,LRECL=80,BLKSIZE=6320),              |
  807.  //             SPACE=(TRK,(10,5),RLSE)
  808.  COPY  DDNAME=IN TO DDNAME=OUT LIST
  809. 0In the previous example, the COPY command is  the  only  command  given  to  the
  810.  EDSUTIL  program.   The  command  is  specified in the SYSIN input data set (the  |
  811.  system generates a //SYSIN DD * statement when one is not  present).   The  same  |
  812.  result  could  have  been  obtained  by  using the COMMAND symbolic parameter to
  813.  specify the command instead of using the input data set.
  814. 0    The next example illustrates the use of the EDSUTIL program  to  convert  an
  815.  edit  format  data  set to a non-edit format data set, call a program that reads  |
  816.  the data set copied and writes an output data set, and then  converts  the  data  |
  817.  set  written  by the program to an edit format data set.  The following informa-
  818.  tion is useful in understanding the example:
  819. 0. The STEPLIB DD statement informs the system where the program  called  by  the  |
  820.    CALL command is stored.
  821. 0. The SYSPRINT DD statement designates that the output will be  printed  on  the  |
  822.    standard  printers.   This is also where all messages from the EDSUTIL program
  823.    will be listed.
  824. 0. The first command copies the data set designated on the DD statement INPUT  to  |
  825.    the  temporary  data  set  &&INPUT  as specified on the DD statement FT01F001.  |
  826.    This data set is converted from edit  format  to  non-edit  format  as  it  is  |
  827.    copied.   Line  numbers  are not included in the output, non-edit format, data
  828.    set.
  829. -
  830. -
  831.                                                                EDSUTIL:  Examples
  832. 118
  833. -
  834.  . The program CALC is called  and  reads  input  from  the  temporary  data  set
  835.    &&INPUT.  Output is written to the non-edit format temporary data set &&OUTPUT  |
  836.    as specified on the DD statement FT22F001.                                      |
  837. 0. The temporary data set &&OUTPUT is copied  to  an  edit  format  data  set  as  |
  838.    specified on the OUTPUT DD statement.                                           |
  839. 0. The last command produces a listing of the original input  data  set  and  the
  840.    final  output  data  set.   The listing is printed on the standard printers as  |
  841.    described by the SYSPRINT DD statement                                          |
  842. 0. The FT15F001 DD statement is included to obtain  errors  occuring  during  the  |
  843.    execution  of  the  Fortran  program  CALC,  and  the SYSUDUMP DD statement is  |
  844.    included to obtain a system dump in case a system ABEND error condition arises  |
  845.    during the execution of this job step.
  846. -//        EXEC PGM=EDSUTIL,PARM='SYSIN=CMDIN'
  847.  //STEPLIB  DD  DSNAME=AAAAIII.PGM,UNIT=FILE,VOL=SER=CNTL002,DISP=SHR              |
  848.  //SYSPRINT DD  SYSOUT=A
  849.  //FT01F001 DD  DSNAME=&&INPUT,UNIT=SYSDA,DISP=(NEW,DELETE),
  850.  //             DCB=(RECFM=FB,LRECL=80,BLKSIZE=6320),                              |
  851.  //             SPACE=(CYL,(1,1))
  852.  //FT15F001 DD  SYSOUT=A
  853.  //FT22F001 DD  DSNAME=&&OUTPUT,UNIT=SYSDA,DISP=(NEW,DELETE),
  854.  //             DCB=(RECFM=FB,LRECL=80,BLKSIZE=6320),                              |
  855.  //             SPACE=(CYL,(1,1))
  856.  //INPUT    DD  DSNAME=AAAAIII.INPUT,UNIT=FILE,VOL=SER=FILE10,DISP=SHR
  857.  //OUTPUT   DD  DSNAME=AAAAIII.OUTPUT,UNIT=FILE,VOL=SER=TMP002,
  858.  //             DISP=(NEW,KEEP),SPACE=(TRK,(10,5),RLSE)
  859.  //SYSUDUMP DD  SYSOUT=A
  860.  //CMDIN    DD  *
  861.  COPY DDNAME=INPUT TO DDNAME=FT01F001
  862.  CALL CALC
  863.  COPY DDNAME=FT22F001 TO DDNAME=OUTPUT
  864.  LIST DDNAME=INPUT AND DDNAME=OUTPUT
  865. -
  866. -
  867. -
  868. -
  869. -
  870. -
  871. 0EDSUTIL:  Examples
  872. 1                                                                              19
  873. -
  874.                                Abbreviations
  875. -W_r_               A_b_e_i_t_o_s
  876. +_o_d               _b_r_v_a_i_n_
  877. 0AND                &
  878.  BY
  879.  CALL
  880.  CC
  881.  COPY               COP, CPY
  882.  DDNAME             DD, DDN
  883.  DOUBLE             DBL
  884.  IBM                                                                               |
  885.  INDENT             IND
  886.  INFINITY           INF                                                            |
  887.  INSERT             INS                                                            |
  888.  LIST               LIS, (L)
  889.  MARKER             MAR, MARK
  890.  MERGE                                                                             |
  891.  MESSAGES           MSGS                                                           |
  892.  MC
  893.  NUMBER             NUM
  894.  NUMBERED           NUMD
  895.  RECFM
  896.  SKIP
  897.  SPACING            SPN
  898.  START
  899.  TAKE
  900.  TERMINATE          TERM                                                           |
  901.  TIMES
  902.  TO
  903.  TRIPLE             TRI, TPL
  904.  TSO
  905.  UNNUMBERED         UNN
  906.  WITH
  907. -
  908.  Abbreviations in parenthesis are only valid for commands, not options.
  909. -
  910. -
  911. -
  912. -
  913. -
  914. 0                                                                   Abbreviations
  915. 120
  916. -
  917.                      Edit Format Data Set (ED) Routines
  918. -                           General Information
  919. -    These subroutines provide a mechanism for  programs  to  directly  read  and
  920.  write  edit  and non-edit format sequential data sets sets and members of parti-
  921.  tioned data sets.  The ability to handle both edit and non-edit format data sets
  922.  provides  the user with the flexibility of not needing to know the format of the
  923.  data set to be accessed.  If only non-edit format data sets are to  be  handled,
  924.  the  facilities  available in the programming language should be used instead of
  925.  these routines.
  926. 0    These subroutines are callable from any of the major languages supported  at
  927.  the Computer Center (i.e., Assembler Language, COBOL, FORTRAN, and PL/I).  These  |
  928.  subroutines are stored in the cataloged partitioned data set named  NIH.UTILITY.  |
  929.  To  allow  the  use  of  PL/I character string variables, a separate set of sub-  |
  930.  routines has been provided that may only be called from PL/I.  These subroutines  |
  931.  are  denoted  by  the  letter  "P"  suffixed to the name of the subroutine.  For  |
  932.  example, programs written in Assembler Language, COBOL, or  FORTRAN  would  call
  933.  subroutine EDINIT, whereas a PL/I program must call EDINITP.  For the most part,
  934.  the calling sequences for the subroutines with and without the  "P"  suffix  are
  935.  exactly the same.  The only difference is that the subroutines with a "P" suffix
  936.  take advantage of the fact that PL/I keeps track  of  the  length  of  character
  937.  strings for the programmer.  Consequently, it is not necessary for the PL/I user
  938.  to pass this length as an  argument.   Since  the  documentation  for  the  PL/I
  939.  callable  subroutines  is  nearly  identical  to  that for the non-PL/I callable  |
  940.  subroutines, a special notation is  used  in  this  document  to  indicate  both  |
  941.  subroutine  names.   For  example,  EDINIT(P)  refers  to  both EDINIT (which is
  942.  callable from Assembler Language, COBOL, and FORTRAN),  and  EDINITP  (which  is
  943.  callable from PL/I).
  944. -S_M_A_Y O_ E_ S_B_O_T_N_S
  945. +_U_M_R_ _F _D _U_R_U_I_E_:
  946. 0    The subroutines are divided into two groups:  those which must be used,  and
  947.  those which provide optional functions.
  948. -1.  Required Subroutines
  949. -EDINIT(P) -- This subroutine is called first for each data set  to  be  read  or
  950.               written.   It  establishes  an  internal  work  area  for the other
  951.               subroutines.
  952. 0EDOPEN(P) -- This subroutine opens a data set for processing.
  953. 0EDGET(P)  -- This subroutine is called to read a logical record from a data set.
  954.               If  the  records  read  are  from an edit format data set, they are
  955.               converted to non-edit format.
  956. -
  957.  ED Routines: General Information
  958. 1                                                                              21
  959. -
  960.  EDPUT(P)  -- This subroutine is called to write a logical  record  into  a  data
  961.               set.   If the data set has edit format characteristics, the records
  962.               are converted to edit format as they are written.
  963. 0EDMSG(P)  -- This subroutine returns the text of  an  error  message  associated
  964.               with the return code returned by the previous subroutine call.
  965. 0EDCLOS(P) -- This subroutine is called for each data set processed in  order  to
  966.               properly close the data set.
  967. 0EDTERM(P) -- This subroutine is called to terminate processing and free the work
  968.               area established by EDINIT(P).
  969. -2.  Optional Subroutines
  970. -EDNCOL(P) -- This subroutine is used to specify the column  positions  for  line
  971.               numbers in a non-edit format data set.
  972. 0EDNGEN(P) -- This subroutine is used to designate how line  numbers  are  to  be
  973.               generated for each line in the data set.
  974. 0EDSET(P)  -- This subroutine is used to  set  information  about  the  data  set
  975.               (e.g., RECFM of the data set).
  976. 0EDSHOW(P) -- This subroutine is used to show information  (e.g.,  RECFM  of  the
  977.               data set).
  978. 0EDGETL(P) -- This subroutine is a version of EDGET(P) that returns  the  address  |
  979.               of the location where the characters of the line read are stored.
  980. 0EDNCNV(P) -- This subroutine converts line numbers between integer and character
  981.               representation.
  982. -ARGUMENTS
  983. +_________:
  984. -1.  Common Declarations
  985. 0    Many of these subroutines have arguments that must be declared to be  binary  |
  986.  full  word  (4  byte)  integer (fixed point) variables.  In this document, these
  987.  variables will be referred to  as  simply  integer  variables.   To  declare  an
  988.  integer variable named VAR, the following could be used:
  989. 0Language             Declaration
  990. +________             ___________
  991. 0COBOL                VAR PIC S9(8) COMPUTATIONAL
  992.  FORTRAN              INTEGER*4 VAR
  993.  PL/I                 DECLARE VAR FIXED BINARY(31)                                 |
  994.  Assembler            VAR  DS  F
  995. -
  996.                                                  ED Routines: General Information
  997. 122
  998. -
  999.      Arguments containing character strings are also used.  The following is  one
  1000.  method  which  may  be  used  to  declare  these  variables.  VAR is used as the
  1001.  variable name and "n" is the number of characters in the character string.
  1002. -Language             Declaration
  1003. +________             ___________
  1004. 0COBOL                VAR PIC X(n)
  1005.  FORTRAN              LOGICAL*1 VAR(n)
  1006.                            or
  1007.                       DIMENSION VAR(m)
  1008.                         where m is the smallest integer that is greater  than  or
  1009.                         equal to n divided by 4
  1010.  PL/I                 DECLARE VAR CHARACTER(n) VARYING
  1011.                                 or
  1012.                       DECLARE VAR CHARACTER(n)
  1013.  Assembler            VAR  DS  CLn
  1014. 0    For PL/I, to copy declarations for all subroutine entry point  and  argument
  1015.  types,  use  %INCLUDE EDDCLS statements where the entry points would normally be
  1016.  declared.  If this is done when  using  the  standard  PL/I  compile  procedures
  1017.  (i.e.,  PLIXCOMP,  PLICCOMP),  several additions must be made in the EXEC state-  |
  1018.  ment.   When  using  the  PL/I  Optimizing  compiler   (i.e.,   PLIXCOMP),   add  |
  1019.  OPTIONS=INCLUDE  and LIBNAME='NIH.MACLIB'. When using the PL/I Checkout compiler  |
  1020.  (i.e., PLICCOMP), add LIBNAME='NIH.MACLIB'.                                       |
  1021. -2.  Control Word
  1022. 0    All subroutines have as a first argument a control word, referred to in this
  1023.  documentation as CNTRL.  CNTRL is used to reference a work area that is acquired  |
  1024.  by subroutine EDINIT(P).                                                          |
  1025. 0    CNTRL must be an integer variable.  The call to EDINIT(P) stores a value  in
  1026.  the  location  referenced  by  CNTRL,  which  is  used to identify the work area
  1027.  established for the data set being processed.  The value of  CNTRL  is  used  by
  1028.  other  subroutines  to  identify  the  proper  work  area for the data set being
  1029.  processed.
  1030. 0    If the user fails to call EDINIT(P) to initialize the variable CNTRL, or  if
  1031.  the  contents  of  CNTRL  is  altered after the call to EDINIT(P), the next sub-
  1032.  routine call using the variable CNTRL will cause the program to ABEND.   If  the
  1033.  program  uses  linkage  editor  overlays,  CNTRL  should  be in the root segment
  1034.  (segment 1).
  1035. -3.  Return Code
  1036. 0    The second argument for all subroutines is a return  code,  referred  to  in
  1037.  this  documentation  as  RETURN.   This  argument  is used to return information
  1038.  concerning the processing of the subroutine.  RETURN must be  an  integer  vari-
  1039. -
  1040. 0ED Routines: General Information
  1041. 1                                                                              23
  1042. -
  1043.  able.   The  subroutine  stores an integer in the variable RETURN that gives the  |
  1044.  result of the subroutine processing.                                              |
  1045. 0Return Code Range         Meaning
  1046. +_________________         _______
  1047. 0    0                     Normal completion
  1048.    1 -  99                 Informational only
  1049.  100 - 199                 Warning; processing may continue
  1050.  200 - 299                 Error; processing may continue
  1051.  300 - 399                 Error; further processing of the same
  1052.                            data set will cause an ABEND
  1053. -
  1054.  LINE NUMBERS
  1055. +____________:
  1056. 0    Each line in an edit format data  set  has  a  line  number.   Some  of  the
  1057.  subroutines  reference these line numbers.  There are two ways that line numbers
  1058.  are represented:
  1059. -1.  Character string form of a line number
  1060. 0. WYLBUR line number -- This number is represented by 0 to 5 digits,  a  decimal
  1061.    point,  and 0 to 3 digits.  At least one digit must be specified.  If the line
  1062.    number is an integer, the decimal point may be omitted.   Leading  blanks  and
  1063.    zeroes  are ignored.  Trailing blanks are ignored; trailing zeroes are treated
  1064.    as digits.  It is an error if blanks appear in the number.  Examples of  valid  |
  1065.    WYLBUR line numbers:  53.9, 112, 0.781, .3                                      |
  1066. 0. TSO (IBM) line number -- This number is formed by  taking  the  WYLBUR  repre-
  1067.    sentation,  multiplying  it  by 1000, and optionally padding it with zeroes or  |
  1068.    blanks on the left.  Leading zeroes and blanks are ignored.  Examples of valid  |
  1069.    TSO (IBM) line numbers:  00053900, 112000, 00781, 00000300.  Notice that these  |
  1070.    numbers are the same ones used in the example of WYLBUR line numbers.
  1071. 0    Character string line numbers are passed to  and  from  the  subroutines  in
  1072.  character string arguments.
  1073. -2.  Binary integer form of a line number
  1074. 0    The binary integer form of a line number is created  by  taking  the  WYLBUR
  1075.  character  string  form,  multiplying  it by 1000, and converting it to a binary
  1076.  full word (4 byte) integer.
  1077. 0    Binary integer line numbers are  passed  to  and  from  the  subroutines  in
  1078.  integer variable arguments.
  1079. -
  1080. -
  1081. 0                                                ED Routines: General Information
  1082. 124
  1083. -
  1084.  ABEND C_________:
  1085. +_____ _ONDITIONS
  1086. 0    If an error is encountered for which it is unreasonable to expect  a  user's
  1087.  program to be able to recover, the subroutine will ABEND.  The ABEND will have a
  1088.  user code of 2001.  The subroutine will also  issue  a  message  describing  the
  1089.  error.   The message will have an identification number of NIH2001.  For a batch
  1090.  program, the NIH2001 message will be displayed  on  the  JES2  job  log;  for  a
  1091.  program executing under TSO, the message will be displayed on the terminal.
  1092. -
  1093. -
  1094. -
  1095. -
  1096. -
  1097. -
  1098. -
  1099. -
  1100. -
  1101. -
  1102. -
  1103. -
  1104. -
  1105. -
  1106. -
  1107. -ED Routines: General Information
  1108. 1                                                                              25
  1109. -
  1110.                             SUBROUTINE EDINIT(P)
  1111. -P_R_O_E   This subroutine establishes and initializes an internal work area  for
  1112. +_U_P_S_:
  1113.            the  subroutines  that process the data set.  It must be called before
  1114.            any of the other subroutines.
  1115. -ARGUMENTS  CNTRL,RETURN
  1116. +_________:
  1117. 0  NAME     FUNCTION
  1118. +  ____     ________
  1119. 0  CNTRL    A control word.
  1120. 0  RETURN   Return code.  The possible values are:
  1121. 0           0    Processing completed normally.
  1122. -
  1123. -
  1124. -
  1125. -
  1126. -
  1127. -
  1128. -
  1129. -
  1130. -
  1131. -
  1132. -
  1133. -
  1134. -                                                            SUBROUTINE EDINIT(P)
  1135. 126
  1136. -
  1137.                             SUBROUTINE EDOPEN(P)
  1138. -P_R_O_E   This subroutine opens the data set for processing.  A DD statement for  |
  1139. +_U_P_S_:
  1140.            the  data  set  must  be  included in the JCL for the job step (or, an  |
  1141.            appropriate ALLOCATE command issued under TSO).
  1142. 0          EDOPEN(P) acquires an additional internal  work  area  which  includes
  1143.            buffers  where  the  records  read or written are stored.  The size of
  1144.            these buffers depends on the block size associated with the data  set,
  1145.            and  thus the amount of storage used by this subroutine varies accord-
  1146.            ing to the block size of the data set being processed.
  1147. 0          A data set that has the DCB attributes  RECFM=U  and  BLKSIZE  greater  |
  1148.            than  or  equal to 1022 is assumed to be an edit format data set.  The
  1149.            EDSET(P) routine may be called to specify that a data set  with  these
  1150.            characteristics is to be treated as a non-edit format data set.
  1151. 0          In the case of writing a data set, the data set will be in edit format
  1152.            unless  DCB parameters are specified on the associated DD statement or  |
  1153.            via the EDSET(P) subroutine, or the data set is directed to  a  SYSOUT  |
  1154.            class.   Additional  considerations also apply when writing a non-edit
  1155.            data set.  When requesting a record format  other  than  RECFM=U,  the
  1156.            user  must also specify a value for LRECL.  For blocked data sets when
  1157.            no block size is specified, a block size less than or  equal  to  6356  |
  1158.            will be chosen which is compatible with the RECFM and LRECL specifica-  |
  1159.            tion.  If the data set is directed to a SYSOUT  class  and  no  record  |
  1160.            format  is  specified,  RECFM=U is assumed; if no block size is speci-
  1161.            fied, a block size of 254 is used.
  1162. -ARGUMENTS  CNTRL,RETURN,DDNAME,TYPE
  1163. +_________:
  1164. 0  NAME     FUNCTION
  1165. +  ____     ________
  1166. 0  CNTRL    The same control word that was specified when EDINIT(P) was called.    |
  1167. 0  RETURN   Return code.  The possible values are:
  1168. 0           0     Processing completed normally.
  1169.             100   Subroutine EDNCOL(P) was called to specify the column positions
  1170.                   of  line  numbers for a non-edit format data set.  However, the
  1171.                   data set opened was edit format.  The call to EDNCOL(P) will be
  1172.                   ignored.
  1173.             200   Column positions specified by a previous call to EDNCOL(P)  are
  1174.                   inconsistent with the attributes of the data set.  The informa-
  1175.                   tion set by EDNCOL(P) is ignored.
  1176.             300   An ABEND has been intercepted.  The intercepted IBM ABEND  code
  1177.                   may  be  obtained  by calling EDSHOW(P).  A descriptive message
  1178.                   may be obtained by calling EDMSG(P).   The  data  set  was  not
  1179.                   opened.
  1180. -
  1181. 0SUBROUTINE EDOPEN(P)
  1182. 1                                                                              27
  1183. -
  1184.             301   The data set was not opened.  There is no DD statement for  the  |
  1185.                   data set referenced.                                             |
  1186. 0  DDNAME   The DDNAME associated with the DD statement of the  data  set  to  be  |
  1187.             processed  must  be  stored  in  this 8 byte character variable.  The
  1188.             DDNAME must be padded on the right  with  blanks,  if  necessary,  to
  1189.             completely fill the area.
  1190. 0           For subroutine EDOPENP, this argument must be a PL/I character string
  1191.             variable and need not be padded with blanks.
  1192. 0  TYPE     An integer indicating the type of processing to be performed must  be
  1193.             stored  into  this  integer variable before EDOPEN(P) is called.  The
  1194.             acceptable values are:
  1195. 0           1    A data set is to be read.
  1196.             101  A data set is to be written.
  1197.             102  Records are to be added at the end  of  an  existing  data  set,
  1198.                  without  using  a disposition of MOD on the data set's DD state-  |
  1199.                  ment.                                                             |
  1200. -NOTES
  1201. +_____:
  1202. 0    If the value of TYPE is invalid or an attempt is made to  open  a  data  set
  1203.  when  another  data  set  is  already open using the same control word, the sub-
  1204.  routine will ABEND.
  1205. -
  1206. -
  1207. -
  1208. -
  1209. -
  1210. -
  1211. -
  1212. -
  1213. -
  1214. 0                                                            SUBROUTINE EDOPEN(P)
  1215. 128
  1216. -
  1217.                             SUBROUTINE EDGET(P)
  1218. -P_R_O_E   This subroutine is called to read a logical record from  a  data  set.
  1219. +_U_P_S_:
  1220.            If  the  records  read are from an edit format data set, they are con-
  1221.            verted to non-edit format.  The subroutine assumes that the  data  set
  1222.            has  already been opened by the EDOPEN(P) subroutine.  The records are
  1223.            read in sequential order.
  1224. -ARGUMENTS  CNTRL,RETURN,LINENO,LINE,LENMAX,LENACT
  1225. +_________:
  1226. 0  NAME     FUNCTION
  1227. +  ____     ________
  1228. 0  CNTRL    The same control word that was specified when the data set was opened  |
  1229.             by the EDOPEN(P) subroutine call.
  1230. 0  RETURN   Return code.  Unless otherwise documented, a record is returned.  The  |
  1231.             possible values are:                                                   |
  1232. 0           0     Processing completed normally.
  1233.             1     There are no more records in the data set to be read (an end of
  1234.                   file  condition  was encountered).  No record is returned.  The
  1235.                   EDCLOS(P) subroutine should be called to  close  the  data  set
  1236.                   properly.   If  no  more  data  sets  are to be processed, then
  1237.                   EDTERM(P) should be called to release work area storage for use
  1238.                   by the remainder of the program.
  1239.             100   The record was truncated on the right to a length equal to  the
  1240.                   number  of  characters specified by the value of LENMAX (or the
  1241.                   length of the PL/I character string  variable  when  EDGETP  is
  1242.                   called).   For  EDGET,  the  actual length of the record, after
  1243.                   truncation, is returned in LENACT.  The length  of  the  record
  1244.                   before truncation can be obtained by calling EDSHOW(P).
  1245.             101   A concatenated data set  with  attributes  different  from  the
  1246.                   previously processed data set was opened.  One of the following
  1247.                   changes occurred:  (1) the maximum record length  changed,  (2)
  1248.                   RECFM changed, (3) the format changed between edit and non-edit
  1249.                   format.  No record from the data set  is  returned.   The  next
  1250.                   call  to  EDGET(P) will process records starting with the first
  1251.                   record in the concatenated data set.  The maximum  record  size
  1252.                   may  be  obtained  by  calling  EDSHOW(P).   Previous  calls to
  1253.                   EDNCOL(P) are no longer used.
  1254.             102   When opening a concatenated data set, the line  number  of  the  |
  1255.                   first  line  is less than the line number of the last line from  |
  1256.                   the previous data set.  To obtain the  value  of  the  previous  |
  1257.                   line  number,  call EDSHOW(P).  The line number obtained by the  |
  1258.                   next call to EDGET(P) will be compared against the line  number  |
  1259.                   returned from this call to EDGET(P).                             |
  1260.             200   An I/O error occurred.  The record in error  is  returned,  and
  1261.                   the  processing  of  the  data set may continue.  A message de-
  1262.                   scribing the I/O error may be obtained by calling EDMSG(P).
  1263. -
  1264. 0SUBROUTINE EDGET(P)
  1265. 1                                                                              29
  1266. -
  1267.             201   For a non-edit  format  data  set,  where  EDNCOL(P)  had  been
  1268.                   called,  an invalid line number was encountered.  LINENO is set
  1269.                   to -1.  The characters to be used as the line number,  as  well
  1270.                   as  the value of the last valid line number, may be obtained by
  1271.                   calling EDSHOW(P).
  1272.             202   A physical block that was not in edit format was encountered in  |
  1273.                   an  edit  format  data  set.   No  record  from the data set is
  1274.                   returned.  The next  call  to  EDGET(P)  will  process  records
  1275.                   starting with the next physical block.
  1276.             203   In an edit format data set, a line that is not in  edit  format  |
  1277.                   was  encountered.   No  line  is  returned.   The  next call to
  1278.                   EDGET(P) will process records starting with the next line.
  1279.             204   The line number exceeded the maximum number allowed.  LINENO is
  1280.                   set to -1.
  1281.             205   The line number is less than or  equal  to  the  previous  line
  1282.                   number.   To obtain the value of the previous line number, call
  1283.                   EDSHOW(P).  The line  number  obtained  by  the  next  call  to
  1284.                   EDGET(P) will be compared against the line number returned from
  1285.                   this call to EDGET(P).
  1286.             206   A non-edit format data set with a record format of U  or  V  is
  1287.                   being  processed.   EDNCOL(P)  has  been  called.   A record is
  1288.                   encountered whose length is  too  short  to  contain  the  line
  1289.                   number  specified  by  the call to EDNCOL(P).  LINENO is set to
  1290.                   -1.  The characters representing the partial line number may be
  1291.                   obtained by calling EDSHOW(P).
  1292.             300   An ABEND has been intercepted.  The intercepted IBM ABEND  code
  1293.                   may  be  obtained  by calling EDSHOW(P).  A descriptive message
  1294.                   may be obtained by calling EDMSG(P).  No  record  is  returned.
  1295.                   Further   data   set   processing  (other  than  EDCLOS(P)  and
  1296.                   EDTERM(P)) are not allowed.
  1297. 0  LINENO   A binary integer line number is stored by EDGET(P) in this full  word
  1298.             (4 byte) area.
  1299. 0           When reading an edit format data set, LINENO is normally set equal to
  1300.             the  line  number  obtained  from  the  record read.  However, if the
  1301.             EDNGEN(P) subroutine has been called to generate line  numbers,  then
  1302.             LINENO  will  be  set equal to the line number that was generated for  |
  1303.             the record read.                                                       |
  1304. 0           When reading a non-edit format data set, LINENO is normally set equal
  1305.             to  -1.   There  are two exceptions:  (1) if the EDNCOL(P) subroutine
  1306.             has been called to specify that line numbers are  in  the  data  set,
  1307.             then  LINENO  will  be set equal to the line number obtained from the  |
  1308.             record read; (2) if subroutine EDNGEN(P) has been called to  generate  |
  1309.             line  numbers,  then  the LINENO will be set equal to the line number  |
  1310.             which was generated for the record read.
  1311. 0  LINE     Subroutine EDGET(P) stores the characters of the line read into  this
  1312.             character  variable.   If  necessary, the line read will be padded on
  1313.             the right with blanks or truncated on the right to fit.
  1314. -
  1315. 0                                                             SUBROUTINE EDGET(P)
  1316. 130
  1317. -
  1318.             For subroutine EDGETP, this argument must be a PL/I character  string
  1319.             variable.   If  LINE is a fixed length character string variable, the
  1320.             line read will be padded on the right with  blanks.   For  a  varying
  1321.             length  character  string,  the  current  length is set to the actual
  1322.             length of the line read.
  1323. 0  LENMAX   The maximum number of characters that can be placed in location  LINE  |
  1324.             must be stored in this integer variable before EDGET is called.
  1325. 0           For subroutine EDGETP, this argument should be omitted.
  1326. 0  LENACT   Subroutine EDGET stores into this integer variable the actual  number
  1327.             of  characters  stored  into the variable LINE, after truncation, but
  1328.             before padding with blanks.
  1329. 0           For subroutine EDGETP, this argument should be omitted.
  1330. -NOTES
  1331. +_____:
  1332. 0    If the data set is not open, the subroutine will ABEND.
  1333. -
  1334. -
  1335. -
  1336. -
  1337. -
  1338. -
  1339. -
  1340. -
  1341. -
  1342. -
  1343. -
  1344. 0SUBROUTINE EDGET(P)
  1345. 1                                                                              31
  1346. -
  1347.                             SUBROUTINE EDPUT(P)
  1348. -P_R_O_E   This subroutine is called to write a logical record into a  data  set.
  1349. +_U_P_S_:
  1350.            If  the  data  set  has  edit  format characteristics, the records are
  1351.            converted to edit format as they are written.  The subroutine  assumes
  1352.            that the data set has already been opened by the EDOPEN(P) subroutine.
  1353.            The buffers established by EDOPEN(P) are used to store the records  to
  1354.            be  written.   Records  are  actually written to the data set when the
  1355.            buffers become  full.   The  data  set  should  be  closed  using  the
  1356.            EDCLOS(P)  subroutine  when processing of the data set is completed in
  1357.            order to insure that the last buffer of information is written.
  1358. -ARGUMENTS  CNTRL,RETURN,LINENO,LNOUT,LINE,LENGTH
  1359. +_________:
  1360. 0  NAME     FUNCTION
  1361. +  ____     ________
  1362. 0  CNTRL    The same control word that was specified when the data set was opened  |
  1363.             by the EDOPEN(P) subroutine call.
  1364. 0  RETURN   Return code.  Unless otherwise stated, a  record  was  written.   The  |
  1365.             possible values are:                                                   |
  1366. 0           0     Processing completed normally.
  1367.             100   For non-edit format data sets, an attempt was made to  write  a  |
  1368.                   record  longer  than  the  maximum record length.  The line was  |
  1369.                   written, but was truncated on the right to the maximum length.
  1370.             101   More positions were required to write the line number than were
  1371.                   specified  by  EDNCOL(P).   The  line was written, but the line
  1372.                   number was truncated on the left.
  1373.             102   In a non-edit format data set the line number was less than  or
  1374.                   equal to the previous line number.  The value of the last valid
  1375.                   line number may be obtained by  calling  EDSHOW(P).   The  line
  1376.                   number  used  in  the  next  call  to EDPUT(P) will be compared  |
  1377.                   against the number used in this call to EDPUT(P).                |
  1378.             200   An I/O error occurred.  The processing  of  the  data  set  may
  1379.                   continue.   A  message describing the I/O error may be obtained
  1380.                   by calling EDMSG(P).
  1381.             201   The line number exceeded the maximum number allowed.  The  line
  1382.                   associated  with  the  line  number was ignored and no line was
  1383.                   written.  The value of  the  last  valid  line  number  may  be
  1384.                   obtained by calling EDSHOW(P).
  1385.             202   In an edit format data set the line number  was  less  than  or
  1386.                   equal  to  the previous line number.  The line was not written.
  1387.                   The value of the last valid line  number  may  be  obtained  by
  1388.                   calling EDSHOW(P).
  1389.             300   An ABEND has been intercepted.  The intercepted IBM ABEND  code
  1390.                   may  be  obtained  by calling EDSHOW(P).  A descriptive message
  1391.                   may be obtained by  calling  EDMSG(P).   No  line  is  written.
  1392.                   Further   data   set   references  (other  than  EDCLOS(P)  and
  1393.                   EDTERM(P)) are not allowed.
  1394. -
  1395.                                                               SUBROUTINE EDPUT(P)
  1396. 132
  1397. -
  1398.    LINENO   A binary integer line number to be associated with the record  to  be
  1399.             written  must  be  stored in this integer variable before EDPUT(P) is
  1400.             called.
  1401. 0           If LINENO is -1 and a line number is needed,  the  line  number  will
  1402.             automatically  be generated.  Line numbers are generated by examining
  1403.             the last line number written and selecting the next  highest  integer
  1404.             line  number.   If no line number has been written, the line number 1
  1405.             is used.  If EDNGEN(P) has been called, the  increment  specified  by  |
  1406.             EDNGEN(P)  is  used  to generate line numbers, including the starting  |
  1407.             line number.                                                           |
  1408. 0           If a non-edit format data set is being  written,  and  the  EDNCOL(P)
  1409.             subroutine  is  not called to indicate the location for line numbers,
  1410.             then no line numbers are written and the value of LINENO is ignored.
  1411. 0  LNOUT    EDPUT(P) stores into this full word (4 byte) area  a  binary  integer
  1412.             line  number  equal to the line number written.  If a non-edit format
  1413.             data set is being written, and the EDNCOL(P) subroutine is not called
  1414.             to  indicate  the location for the line numbers, then no line numbers
  1415.             are written and the value of LNOUT is set to -1.
  1416. 0  LINE     The characters of the line to be  written  must  be  stored  in  LINE
  1417.             before  EDPUT(P) is called.  If necessary, lines written to data sets
  1418.             with RECFM=F or RECFM=FB will be padded on the right with  blanks  or
  1419.             truncated on the right.
  1420. 0           For subroutine EDPUTP, this argument must be a PL/I character  string
  1421.             variable.
  1422. 0  LENGTH   The actual number of characters to be written from location LINE must
  1423.             be stored into this integer variable before EDPUT is called.
  1424. 0           For subroutine EDPUTP, this argument should be omitted.
  1425. -NOTES
  1426. +_____:
  1427. 0    If the data set is not open, the subroutine will ABEND.
  1428. -
  1429. -
  1430. -
  1431. -
  1432. -
  1433. 0SUBROUTINE EDPUT(P)
  1434. 1                                                                              33
  1435. -
  1436.                             SUBROUTINE EDMSG(P)
  1437. -P_R_O_E   This routine returns the text of a message associated with the  return
  1438. +_U_P_S_:
  1439.            code returned by the last subroutine call.
  1440. -ARGUMENTS  CNTRL,RETURN,MSG,LENMAX,LENACT
  1441. +_________:
  1442. 0  NAME     FUNCTION
  1443. +  ____     ________
  1444. -  CNTRL    The same control word which was specified when EDINIT(P) was called.
  1445. 0  RETURN   Return code.  The possible values are:
  1446. 0           0     Processing completed normally.
  1447.             100   The message has been truncated on the right to a  length  equal
  1448.                   to  the  number  of characters specified by the value of LENMAX
  1449.                   (or the length of  the  PL/I  character  string  variable  when
  1450.                   EDMSGP  is  called).   The  actual length of the message, after
  1451.                   truncation, is returned in LENACT.
  1452. 0  MSG      The characters representing the error message are stored into MSG  by
  1453.             the  EDMSG(P)  subroutine.   The message returned will not exceed 132
  1454.             characters in length.  If necessary, the message will  be  padded  on
  1455.             the right with blanks or truncated on the right to fit into the area.
  1456. 0           For subroutine EDMSGP, this argument must be a PL/I character  string
  1457.             variable.   If  MSG  is a fixed-length character string variable, the
  1458.             message will be padded on the  right  with  blanks.   For  a  varying
  1459.             length  character  string,  the  current  length is set to the actual
  1460.             length of the message.
  1461. 0  LENMAX   The maximum number of characters that can be placed in  location  MSG  |
  1462.             must be stored into this integer variable before EDMSG is called.
  1463. 0           For subroutine EDMSGP, this argument should be omitted.
  1464. 0  LENACT   Subroutine EDMSG stores into this integer variable the actual  number
  1465.             of  characters  in  the message, after truncation, but before padding
  1466.             with blanks.
  1467. 0           For subroutine EDMSGP, this argument should be omitted.
  1468. -
  1469. -
  1470. -
  1471. -                                                             SUBROUTINE EDMSG(P)
  1472. 134
  1473. -
  1474.                             SUBROUTINE EDCLOS(P)
  1475. -P_R_O_E   This subroutine must be called for each data set processed in order to
  1476. +_U_P_S_:
  1477.            properly  close  the  data set.  If the data set is being written, the
  1478.            last few records stored in the buffer portion of  the  work  area  are
  1479.            written to the data set.
  1480. 0          The internal work area established by EDINIT(P)  is  returned  to  the
  1481.            state  it was in immediately following the call to EDINIT(P).  Thus, a
  1482.            call  to  subroutine  EDCLOS(P)  "erases"  the  following  information
  1483.            concerning the data set being processed:
  1484. 0          a) All information about the column positions for line numbers and how  |
  1485.               they  are to be generated, that was specified by calls to EDNCOL(P)  |
  1486.               and/or EDNGEN(P).
  1487. 0          b) All DCB characteristics.
  1488. 0          Therefore, if another data set  (or  the  same  data  set)  is  to  be
  1489.            processed,  this  information  may  need  to be specified again before
  1490.            EDOPEN(P) is called.
  1491. 0          If no more data sets are to be processed, EDTERM(P) should be called.
  1492. -ARGUMENTS  CNTRL,RETURN
  1493. +_________:
  1494. 0  NAME     FUNCTION
  1495. +  ____     ________
  1496. 0  CNTRL    The same control word which was  specified  when  the  data  set  was
  1497.             opened by the EDOPEN(P) subroutine call.
  1498. 0  RETURN   Return code.  The possible values are:
  1499. 0           0     Processing completed normally.
  1500.             100   No data set was open.
  1501.             200   An I/O error has occurred.  The  processing  of  the  job  will
  1502.                   continue.   A  message describing the I/O error may be obtained
  1503.                   by calling EDMSG(P).  The data set was closed.
  1504.             300   An ABEND has been intercepted.  The intercepted IBM ABEND  code
  1505.                   may be obtained by calling EDMSG(P) or EDSHOW(P).  The data set
  1506.                   was closed.
  1507. -
  1508. -
  1509. -
  1510. -
  1511.  SUBROUTINE EDCLOS(P)
  1512. 1                                                                              35
  1513. -
  1514.                             SUBROUTINE EDTERM(P)
  1515. -P_R_O_E   This subroutine is called to terminate processing  with  the  ED  sub-
  1516. +_U_P_S_:
  1517.            routines.   The  work  areas  set  up  by the EDINIT(P) subroutine are
  1518.            freed, thus making the storage used by the  work  areas  available  to
  1519.            other  parts  of  the  program  being  executed.  Subroutine EDCLOS(P)
  1520.            should have been called previously to close the data set.
  1521. -ARGUMENTS  CNTRL,RETURN
  1522. +_________:
  1523. 0  NAME     FUNCTION
  1524. +  ____     ________
  1525. 0  CNTRL    The same control word that was specified when EDINIT(P) was called.    |
  1526. 0  RETURN   Return code.  The possible values are
  1527. 0           0     Processing completed normally.
  1528.             100   Subroutine EDCLOS(P) had not been called to close the data set.
  1529.                   EDTERM(P)  first  closes  the  data set and then frees the work
  1530.                   areas.
  1531. -
  1532. -
  1533. -
  1534. -
  1535. -
  1536. -
  1537. -
  1538. -
  1539. -
  1540. -
  1541. -
  1542.                                                              SUBROUTINE EDTERM(P)
  1543. 136
  1544. -
  1545.                                   Examples
  1546. -    The following examples include programs for  each  language  that  can  call  |
  1547.  these  subroutines:   COBOL, FORTRAN, PL/I and Assembler.  Each program performs  |
  1548.  the same function.  An edit format data set is read and printed.  There  are  at  |
  1549.  most  80  characters  in each record of the data set.  A sample DD statement for  |
  1550.  the input data set is:                                                            |
  1551.                                                                                    |
  1552.  //GO.IN    DD  DSNAME=AAAAIII.INPUT,UNIT=FILE,VOL=SER=FILE17,DISP=SHR             |
  1553.                                                                                    |
  1554.      For COBOL and PL/I, output is directed to the  SYSPRINT  DD  statement;  for  |
  1555.  Assembler,  output  is  directed  to  the  SYSOUT DD statement; and for FORTRAN,  |
  1556.  output is directed to the  FT15F001  DD  statement.   These  DD  statements  are  |
  1557.  defined as the printer in the Computer Center standard procedures.                |
  1558. -
  1559. -
  1560. -
  1561. -
  1562. -
  1563. -
  1564. -
  1565. -
  1566. -
  1567. -
  1568. -
  1569. -
  1570. -
  1571. 0ED Routines: Examples
  1572. 1                                                                              37
  1573. -
  1574.  1.  COBOL
  1575. 0       IDENTIFICATION DIVISION.
  1576.         PROGRAM-ID. ED.
  1577. 0       DATA DIVISION.
  1578.         WORKING-STORAGE SECTION.
  1579.         01  CNTRL               PIC X(4).
  1580.         01  DDNAME              PIC X(8).
  1581.         01  LINE-VAR            PIC X(80).
  1582.         01  MSG-VAR             PIC X(132).
  1583.         01  RETURN-VALUE        PIC S9(8) COMPUTATIONAL.
  1584.         01  LINENO              PIC S9(8) COMPUTATIONAL.
  1585.         01  TYP                 PIC S9(8) COMPUTATIONAL.
  1586.         01  LENMAX              PIC S9(8) COMPUTATIONAL.
  1587.         01  LENACT              PIC S9(8) COMPUTATIONAL.
  1588.         PROCEDURE DIVISION.
  1589.        *
  1590.        * SET UP INPUT DATA SET
  1591.        *
  1592.             MOVE 'IN      ' TO DDNAME.
  1593.             CALL 'EDINIT' USING CNTRL RETURN-VALUE.
  1594.             MOVE 1 TO TYP.
  1595.             CALL 'EDOPEN' USING CNTRL RETURN-VALUE DDNAME TYP.
  1596.             IF RETURN-VALUE NOT EQUAL 0 GO TO CLOSE-SECTION.
  1597.        *
  1598.        * READ AND PRINT DATA SET
  1599.        *
  1600.             MOVE 80 TO LENMAX.
  1601.         READ-PRINT-SECTION.
  1602.             CALL 'EDGET' USING CNTRL RETURN-VALUE LINENO LINE-VAR
  1603.                LENMAX LENACT.
  1604.             IF RETURN-VALUE NOT EQUAL 0 GO TO CLOSE-SECTION.
  1605.             DISPLAY LINE-VAR.
  1606.             GO TO READ-PRINT-SECTION.
  1607.        *
  1608.        * CLOSE DATA SET
  1609.        *
  1610.         CLOSE-SECTION.
  1611.             MOVE 132 TO LENMAX.
  1612.             CALL 'EDMSG' USING CNTRL RETURN-VALUE MSG-VAR
  1613.                LENMAX LENACT.
  1614.             DISPLAY MSG-VAR.
  1615.             CALL 'EDCLOS' USING CNTRL RETURN-VALUE.
  1616.             CALL 'EDTERM' USING CNTRL RETURN-VALUE.
  1617.         EXITING.
  1618.             STOP RUN.
  1619. -
  1620. -
  1621. -                                                           ED Routines: Examples
  1622. 138
  1623. -
  1624.  2.  FORTRAN
  1625. 0C
  1626.  C DECLARATIONS
  1627.  C
  1628.        INTEGER*4 CNTRL,RETURN
  1629.        INTEGER*4 LINENO,LINE(20),LENMAX,LENACT,MSG(33)
  1630.        REAL*8 DDNAME
  1631.        DATA DDNAME/'IN      '/
  1632.  C
  1633.  C SET UP DATA SET TO BE READ
  1634.  C
  1635.        CALL EDINIT(CNTRL,RETURN)
  1636.        CALL EDOPEN(CNTRL,RETURN,DDNAME,1)
  1637.        IF (RETURN.NE.0) GO TO 600
  1638.  C
  1639.  C READ AND PRINT DATA SET
  1640.  C
  1641.  100   CALL EDGET(CNTRL,RETURN,LINENO,LINE,80,LENACT)
  1642.        IF (RETURN.NE.0) GO TO 600
  1643.        WRITE(15,1000) LINE
  1644.  1000  FORMAT(1X,20A4)
  1645.        GO TO 100
  1646.  C
  1647.  C CLOSE DATA SET
  1648.  C
  1649.  600   CALL EDMSG(CNTRL,RETURN,MSG,132,LENACT)
  1650.        WRITE(15,2000) MSG
  1651.  2000  FORMAT(1X,33A4)
  1652.        CALL EDCLOS(CNTRL,RETURN)
  1653.        CALL EDTERM(CNTRL,RETURN)
  1654.  700   STOP
  1655.        END
  1656. -
  1657. -
  1658. -
  1659. -
  1660. -
  1661. -
  1662. -
  1663. 0ED Routines: Examples
  1664. 1                                                                              39
  1665. -
  1666.  3.  PL/I
  1667. 0 ED: PROCEDURE OPTIONS(MAIN);
  1668. 0    %INCLUDE EDDCLS;
  1669. 0    DCL (CNTRL,RETURN,LINENO) FIXED BINARY(31);
  1670.      DCL DDNAME CHARACTER(8) INIT('IN');
  1671.      DCL LINE CHARACTER(80) VARYING;
  1672.      DCL MSG CHARACTER(132) VARYING;
  1673. 0    /*  SET UP INPUT DATA SET  */
  1674. 0    CALL EDINITP(CNTRL,RETURN);
  1675.      CALL EDOPENP(CNTRL,RETURN,DDNAME,1);
  1676.      IF RETURN ^= 0 THEN GO TO CLOSE;
  1677. 0    /*  READ AND PRINT DATA SET  */
  1678. 0    DO WHILE ('1'B);
  1679.         CALL EDGETP(CNTRL,RETURN,LINENO,LINE);
  1680.         IF RETURN ^= 0 THEN GO TO CLOSE;
  1681.         PUT EDIT(LINE) (A) SKIP;
  1682.         END;
  1683. 0    /*  CLOSE DATA SETS  */
  1684. 0    CLOSE:
  1685.         CALL EDMSGP(CNTRL,RETURN,MSG);
  1686.         PUT EDIT(MSG) (A) SKIP;
  1687.         CALL EDCLOSP(CNTRL,RETURN);
  1688.         CALL EDTERMP(CNTRL,RETURN);
  1689.      EXIT:
  1690.         END ED;
  1691. -
  1692. -
  1693. -
  1694. -
  1695. -
  1696. -
  1697. -
  1698.                                                             ED Routines: Examples
  1699. 140
  1700. -
  1701.  4.  Assembler
  1702. 0ED       CSECT
  1703.           SAVE  (14,12),,*
  1704.           BALR  12,0
  1705.           USING *,12
  1706.           ST    13,SAVEAREA+4
  1707.           LA    11,SAVEAREA
  1708.           ST    11,8(0,13)
  1709.           LR    13,11
  1710.           OPEN  (PUTDCB,(OUTPUT))
  1711.  *
  1712.  * SET UP INPUT DATA SET
  1713.  *
  1714.           CALL  EDINIT,(CNTRL,RETURN)
  1715.           CALL  EDOPEN,(CNTRL,RETURN,DDNAME,ONE)
  1716.           CLC   RETURN,=F'0'
  1717.           BNE   CLOSE
  1718.  *
  1719.  * READ AND WRITE DATA SET
  1720.  *
  1721.  LOOP     CALL  EDGET,(CNTRL,RETURN,LINENO,LINE,LENMAX,LENACT)
  1722.           CLC   RETURN,=F'0'
  1723.           BNE   CLOSE
  1724.           PUT   PUTDCB,LINE
  1725.           B     LOOP
  1726.  *
  1727.  * CLOSE DATA SET
  1728.  *
  1729.  CLOSE    CALL  EDMSG,(CNTRL,RETURN,LINE,LENMAX2,LENACT)
  1730.           PUT   PUTDCB,LINE
  1731.           CALL  EDCLOS,(CNTRL,RETURN)
  1732.           CALL  EDTERM,(CNTRL,RETURN)
  1733.  EXIT     CLOSE (PUTDCB)
  1734.           L     13,SAVEAREA+4
  1735.           RETURN (14,12),RC=0
  1736.  *
  1737.  * SET UP INITIAL VALUES AND WORK AREAS
  1738.  *
  1739.  CNTRL    DS    F
  1740.  DDNAME   DC    CL8'IN'
  1741.  LINE     DC    CL132' '
  1742.  LENMAX   DC    F'80'
  1743.  LENMAX2  DC    F'132'
  1744.  LENACT   DS    F
  1745.  RETURN   DS    F
  1746.  LINENO   DS    F
  1747.  ONE      DC    F'1'
  1748.  PUTDCB   DCB   DDNAME=SYSOUT,DSORG=PS,MACRF=(PM),RECFM=FB,LRECL=132,   X
  1749.                 BLKSIZE=132
  1750.  SAVEAREA DC    18A(0)
  1751.           END
  1752. -
  1753.  ED Routines: Examples
  1754. 1                                                                              41
  1755. -
  1756.                 Special Considerations for Data Set Handling
  1757. -P_O_E_S_N_ M_L_I_L_ D_T_ S_T_:
  1758. +_R_C_S_I_G _U_T_P_E _A_A _E_S
  1759. 0    In general, the processing of multiple data sets may  be  divided  into  two
  1760.  categories:
  1761. -1.  Only one data set is open at any given time:
  1762. 0    Only one call to EDINIT(P) is necessary.   After  the  EDINIT(P)  call,  the
  1763.  first data set is processed by calling EDOPEN(P) and whatever other routines are
  1764.  necessary.  When processing of the first data set  has  been  completed,  it  is
  1765.  closed  by a call to EDCLOS(P), but EDTERM(P) should not be invoked.  The second
  1766.  data set is processed by again calling EDOPEN(P) and whatever other routines are
  1767.  necessary.   When  processing  of  this  data  set is completed, it is closed by
  1768.  another call to EDCLOS(P).  This procedure may be repeated for as many data sets
  1769.  as  necessary.   When  all  of  the  data  sets  have been processed, subroutine
  1770.  EDTERM(P) is called.
  1771. -2.  Several data sets are to be opened simultaneously:
  1772. 0    These subroutines are reentrant and refreshable since  they  do  not  modify
  1773.  themselves.   This  means  that the subroutines may be used to process more than
  1774.  one data set by establishing more than one work  area  with  multiple  calls  to
  1775.  EDINIT(P) using different control words.
  1776. 0    There must be one call to EDINIT(P) for each data set which will be open  at
  1777.  the  same time.  Each of these calls to EDINIT(P) must specify a unique variable
  1778.  name for the control word argument (CNTRL).
  1779. -A_D_N_ O_T_ A_ E_I_T_N_ E_I_ F_R_A_ D_T_ S_T
  1780. +_D_I_G _N_O _N _X_S_I_G _D_T _O_M_T _A_A _E_:
  1781. 0    Records may be added to an edit format data set  by  using  DISP=MOD  or  by
  1782.  setting TYPE equal to 102 in the call to EDOPEN(P), but it is the responsibility
  1783.  of the user to insure that the line numbers used for the data set will all be in
  1784.  ascending order.
  1785. -
  1786. -
  1787. -
  1788. -
  1789. -
  1790.                                              Considerations for Data Set Handling
  1791. 142
  1792. -
  1793.                             SUBROUTINE EDNCOL(P)
  1794. -P_R_O_E   This subroutine specifies the column positions where line numbers  are
  1795. +_U_P_S_:
  1796.            stored  in  a non-edit format data set.  No line numbers are used when
  1797.            processing a non-edit format data set unless  EDNCOL(P)  or  EDNGEN(P)
  1798.            are called.
  1799. 0          If the data set is being read,  the  positions  in  each  record  that  |
  1800.            contain  the line number are always removed as each line is processed.  |
  1801.            If the data set is being written, the text in  the  line  normally  is
  1802.            moved  to  the  right, if necessary, to provide positions for the line
  1803.            number to be stored.  The EDSET(P) subroutine may be  called  to  have
  1804.            the  line  numbers  overlay  or  be  merged with text in the specified
  1805.            columns.  The text of a line  will  be  truncated  on  the  right,  if
  1806.            necessary,  to  make the length of the line fit the record length.  If
  1807.            more positions are required to write a line number than are specified,
  1808.            the line number is truncated on the left.
  1809. -ARGUMENTS  CNTRL,RETURN,TYPE,COL1,COL2
  1810. +_________:
  1811. 0  NAME     FUNCTION
  1812. +  ____     ________
  1813. 0  CNTRL    The same control word that was specified when EDINIT(P) was called.    |
  1814. 0  RETURN   Return code.  The possible values are:
  1815. 0           0     Processing completed normally.
  1816.             200   Invalid column positions were  specified.   The  call  to  this
  1817.                   subroutine will be ignored.
  1818.             201   The  column  positions  specified  are  inconsistent  with  the
  1819.                   attributes  of  the  data set being processed.  This subroutine
  1820.                   call is ignored.
  1821.             202   The data set being processed is edit format.   This  subroutine
  1822.                   call is ignored.
  1823. 0  TYPE     An integer indicating information concerning the location and  format
  1824.             of  the  line  numbers must be stored in this integer variable before
  1825.             EDNCOL(P) is called.  The possible values are:
  1826. 0           1  Turns off processing of line numbers.  Further calls  to  EDGET(P)  |
  1827.                ignore  line  numbers that exist in the data set and further calls  |
  1828.                to EDPUT(P) no longer write line numbers into the data set.
  1829.             2  Indicates that WYLBUR line  numbers  are  stored  in  the  default
  1830.                positions.  The location of the line numbers depends on the record
  1831.                format of the data set:
  1832. 0              F format -- last 8 positions of the data
  1833.                U format -- first 8 positions of the data
  1834.                V format -- first 8 positions of the data
  1835. -
  1836. 0SUBROUTINE EDNCOL(P)
  1837. 1                                                                              43
  1838. -
  1839.                The numbers located in these positions are used as the line number
  1840.                of each record in the data set.
  1841.             3  Indicates that the columns where WYLBUR line  numbers  are  stored
  1842.                are being specified by the user in the COL1 and COL2 parameters.
  1843.             4  Specifies that TSO (IBM) line numbers are stored  in  the  default
  1844.                positions.  The location of the line numbers depends on the record
  1845.                format of the data set:
  1846. 0              F format -- last 8 positions of the data
  1847.                U format -- first 8 positions of the data
  1848.                V format -- first 8 positions of the data
  1849. 0              The numbers located in these positions are used as the line number
  1850.                of each record in the data set.
  1851.             5  Indicates that TSO (IBM) line numbers are  stored  in  the  column
  1852.                positions specified by the user in the COL1 and COL2 parameters.
  1853. 0  COL1     If the value of TYPE is 3  or  5,  the  integer  variable  COL1  must
  1854.             contain the starting absolute column position for the location of the
  1855.             line number when EDNCOL(P) is called.  The first column  is  numbered
  1856.             1.   If  TYPE  is  1,  2,  or  4, the contents of COL1 is not used by
  1857.             EDNCOL(P).
  1858. 0  COL2     If the value of TYPE is 3  or  5,  the  integer  variable  COL2  must
  1859.             contain  the  ending absolute column position for the location of the
  1860.             line number when EDNCOL(P) is called.  If TYPE is 1,  2,  or  4,  the
  1861.             contents of COL2 is not used by EDNCOL(P).
  1862. -NOTES
  1863. +_____:
  1864. 0    If the value of TYPE is invalid, the subroutine will ABEND.
  1865. -
  1866. -
  1867. -
  1868. -
  1869. -
  1870. -
  1871. -
  1872. -                                                            SUBROUTINE EDNCOL(P)
  1873. 144
  1874. -
  1875.                             SUBROUTINE EDNGEN(P)
  1876. -P_R_O_E   This subroutine permits the user to specify how line numbers are to be
  1877. +_U_P_S_:
  1878.            generated for each line in the data set.
  1879. -ARGUMENTS  CNTRL,RETURN,TYPE,LINENO,INCR
  1880. +_________:
  1881. 0  NAME     FUNCTION
  1882. +  ____     ________
  1883. 0  CNTRL    The same control word which was specified when EDINIT(P) was called.
  1884. 0  RETURN   Return code.  The possible values are:
  1885. 0           0    Processing completed normally.
  1886.             200  An invalid starting line number was specified.  The call to this
  1887.                  subroutine will be ignored.
  1888.             201  An invalid increment was specified.  The call to this subroutine
  1889.                  will be ignored.
  1890.             202  An invalid multiplication factor was  specified.   The  call  to
  1891.                  this subroutine will be ignored.
  1892.             203  Starting line number is less than or equal to the previous  line
  1893.                  number.   The  call  to this routine will be ignored.  To obtain
  1894.                  the value of the previous line number, call EDSHOW(P).
  1895. 0  TYPE     An integer indicating the type of processing to be performed must  be
  1896.             stored  in  this  integer  variable  before EDNGEN(P) is called.  The
  1897.             possible values are:
  1898. 0           1  Removes the use of the line number generation scheme as previously
  1899.                established  by  a  call  to EDNGEN(P).  Further calls to EDPUT(P)
  1900.                must include the line number, unless EDNCOL(P) has been called  to
  1901.                stop  the  storing  of line numbers in a non-edit format data set.
  1902.                Further calls to EDGET(P) will return the line number or return -1
  1903.                if no line number is available.
  1904.             2  The remaining parameters specify  the  starting  line  number  and
  1905.                increment  to  be  used  to  generate line numbers.  If a non-edit
  1906.                format data set is being read and  the  EDNCOL(P)  subroutine  has
  1907.                been  called  to  indicate that line numbers in each record of the
  1908.                data set are to be used, the positions containing the line numbers
  1909.                of  each record are removed and the numbering process is performed
  1910.                as specified by this call to EDNGEN(P).
  1911.             3  The line numbers are multiplied by  the  factor  supplied  in  the
  1912.                variable  LINENO.   For data sets being read, the line numbers are
  1913.                obtained from the data set; for data sets being written, the  user
  1914.                is specifying the line numbers in the calls to EDPUT(P).
  1915. 0  LINENO   If TYPE is 2, LINENO  must  contain  a  binary  integer  line  number
  1916.             representing the starting line number when EDNGEN(P) is called.
  1917. -
  1918. -SUBROUTINE EDNGEN(P)
  1919. 1                                                                              45
  1920. -
  1921.             If TYPE is 3, LINENO must contain  a  positive  binary  integer  line
  1922.             number  representing  the multiplication factor used to generate line
  1923.             numbers when EDNGEN(P) is called.  A  line  number  is  generated  by
  1924.             multiplying the current value of the line number by the factor.
  1925. 0           If TYPE is 1, the contents of LINENO is not used by EDNGEN(P).
  1926. 0  INCR     If TYPE is 2, INCR must contain a positive binary integer line number
  1927.             representing  the  increment  used  to  generate  line  numbers  when
  1928.             EDNGEN(P) is called.  A  line  number  is  generated  by  adding  the
  1929.             increment to the current value of the line number.
  1930. 0           If TYPE is 1 or 3, the contents of INCR is not used by EDNGEN(P).
  1931. -NOTES
  1932. +_____:
  1933. 0    If the value of TYPE is invalid, the subroutine will ABEND.
  1934. -
  1935. -
  1936. -
  1937. -
  1938. -
  1939. -
  1940. -
  1941. -
  1942. -
  1943. -
  1944. -
  1945. -
  1946. 0                                                            SUBROUTINE EDNGEN(P)
  1947. 146
  1948. -
  1949.                             SUBROUTINE EDSET(P)
  1950. -P_R_O_E   This subroutine may be used to set  information  about  the  data  set
  1951. +_U_P_S_:
  1952.            (e.g.,  LRECL).   Information  set by this subroutine takes precedence
  1953.            over information on the DD statement or in the data set label.          |
  1954. -ARGUMENTS  CNTRL,RETURN,ITEM,IPARM,CPARM,LENGTH
  1955. +_________:
  1956. 0  NAME     FUNCTION
  1957. +  ____     ________
  1958. 0  CNTRL    The same control word which was specified when EDINIT(P) was called.
  1959. 0  RETURN   Return code.  The possible values are:
  1960. 0           0     Processing completed normally.
  1961.             200   An invalid value for IPARM was specified.   The  call  to  this
  1962.                   subroutine will be ignored.
  1963.             201   Invalid character information was specified in CPARM.  The call
  1964.                   to this subroutine will be ignored.
  1965. 0  ITEM     An integer indicating the item to be  set  must  be  stored  in  this
  1966.             integer variable before EDSET(P) is called.  The possible values are:
  1967. 0           1     The logical record length (LRECL), between 0 and 32760, of  the
  1968.                   data  set is specified in the variable IPARM.  This must be set
  1969.                   before EDOPEN(P) is called.
  1970.             2     The block size (BLKSIZE), between 0 and 32760, of the data  set  |
  1971.                   is  specified  in  the variable IPARM.  This must be set before  |
  1972.                   EDOPEN(P) is called.
  1973.             3     A flag may be set for each line in  an  edit  format  data  set
  1974.                   indicating  whether  the  line  has been changed.  This is used
  1975.                   together with the variable IPARM to indicate whether or not the
  1976.                   flag is to be used.  The acceptable values of IPARM are:
  1977. 0                 . 1 means that each line written is to  be  flagged  as  having
  1978.                     been changed (this is the default).
  1979.                   . 2 means that any lines written  are  not  to  be  flagged  as
  1980.                     having been changed.
  1981. 0                 This mechanism can be used to selectively flag lines  that  are  |
  1982.                   being changed.  The EDSHOW(P) subroutine may be used to display  |
  1983.                   whether or not changed lines are being flagged, and if  a  line
  1984.                   is read, whether or not it was flagged as having been changed.
  1985.             4     Specifies the technique used for writing line numbers  in  each
  1986.                   line  of  a  non-edit format data set.  The technique chosen is
  1987.                   determined by the value of IPARM.   The  acceptable  values  of
  1988.                   IPARM are:
  1989. 0                 . 1 means to move the text in the  columns  to  the  right  and
  1990.                     insert the line number (this is the default).
  1991. -
  1992.  SUBROUTINE EDSET(P)
  1993. 1                                                                              47
  1994. -
  1995.                   . 2 means to overlay whatever is in the columns with  the  line
  1996.                     number.
  1997.                   . 3 means to merge the line numbers into the columns -- if  the
  1998.                     columns  contain  blanks,  move  the  line  number  into  the
  1999.                     columns; if the columns do not contain  all  blanks,  do  not
  2000.                     store the line number in the line.
  2001. 0           5     Indication of whether or not the  subroutine  is  to  intercept
  2002.                   data   management  ABEND  situations  in  EDOPEN(P),  EDGET(P),
  2003.                   EDPUT(P) and EDCLOS(P).  The value of IPARM determines what  is
  2004.                   done.  The acceptable values of IPARM are:
  2005. 0                 . 1 means ABEND situations will be intercepted.   These  situa-
  2006.                     tions  will  cause  an  IBM message to be written to the JES2
  2007.                     system log and no dump is produced (this is the default).
  2008.                   . 2 means ABEND situations  will  not  be  intercepted.   These
  2009.                     situations will cause termination of the job and a dump to be
  2010.                     produced if a dump DD statement has been included in the JCL.  |
  2011. 0           6     Indicates that the format of the data set is  being  specified.
  2012.                   The format is determined by the value of IPARM.  The acceptable
  2013.                   values of IPARM are:
  2014. 0                 . 1 means EDIT format.  For data sets being read, EDGET(P) will
  2015.                     attempt to read the data set as edit format regardless of its
  2016.                     characteristics.   For  data  sets  being  written,  any  DCB
  2017.                     parameters previously specified are not used and the data set
  2018.                     is written in EDIT format.
  2019.                   . 2 means non-EDIT format.  If no record format  is  specified,
  2020.                     then  VBS is used.  If no logical record length is specified,  |
  2021.                     then 504 is used.  For blocked data sets and no block size is  |
  2022.                     specified,  the  block  size  chosen  will  be  equal  to the
  2023.                     greatest integer which is less than  or  equal  to  6356  and  |
  2024.                     which is compatible with the record format and logical record  |
  2025.                     length.                                                        |
  2026. 0           7     Specifies whether or not character strings returned from a call
  2027.                   to  EDGET  are  to  be  padded  on the right with blanks to the
  2028.                   maximum length of the string (i.e., the value of LENMAX).   The
  2029.                   value  of IPARM determines what is done.  The acceptable values
  2030.                   of IPARM are:
  2031. 0                 . 1 means padding is performed (this is the default).
  2032.                   . 2 means padding is not performed.
  2033. 0           101   The record format (RECFM) of the data set (e.g.,  F,  FB,  VBS,
  2034.                   etc.)  is  specified  in  the variable CPARM.  This must be set
  2035.                   before EDOPEN(P) is called.
  2036. 0  IPARM    If the value of ITEM is less than 100,  the  integer  variable  IPARM
  2037.             must contain the information being set before EDSET(P) is called.  If
  2038. -
  2039. 0                                                             SUBROUTINE EDSET(P)
  2040. 148
  2041. -
  2042.             the value of ITEM is greater than 100, then the contents of IPARM are
  2043.             not used by EDSET(P).
  2044. 0  CPARM    If the value of ITEM is greater than  100,  CPARM  must  contain  the
  2045.             information  being  set  before  EDSET(P) is called.  If the value of
  2046.             ITEM is less than 101, then the contents of CPARM  are  not  used  by
  2047.             EDSET(P).
  2048. 0           For subroutine EDSETP, this argument must be a PL/I character  string
  2049.             variable.
  2050. 0  LENGTH   The maximum number of characters which  can  be  placed  in  location
  2051.             CPARM  must  be  stored  into  this  integer variable before EDSET is
  2052.             called.
  2053. 0           For subroutine EDSETP, this argument should be omitted.
  2054. -NOTES
  2055. +_____:
  2056. 0    If the value of ITEM is invalid, or an attempt is made to set a value for  a  |
  2057.  data  set that is opened and the item must be set before the data set is opened,  |
  2058.  the subroutine will ABEND.
  2059. -
  2060. -
  2061. -
  2062. -
  2063. -
  2064. -
  2065. -
  2066. -
  2067. -
  2068. -
  2069. -SUBROUTINE EDSET(P)
  2070. 1                                                                              49
  2071. -
  2072.                             SUBROUTINE EDSHOW(P)
  2073. -P_R_O_E   This subroutine may be used to show information (e.g., LRECL  of  data
  2074. +_U_P_S_:
  2075.            set, RECFM of data set).
  2076. -ARGUMENTS  CNTRL,RETURN,ITEM,IANS,CANS,LENMAX,LENACT
  2077. +_________:
  2078. 0  NAME     FUNCTION
  2079. +  ____     ________
  2080. 0  CNTRL    The same control word which was specified when EDINIT(P) was called.
  2081. 0  RETURN   Return code.  The possible values are:
  2082. 0           0     Processing completed normally.
  2083.             100   No information is available (e.g., before  EDOPEN(P)  has  been  |
  2084.                   called).   If ITEM was less than 100, -1 was stored in IANS; if
  2085.                   ITEM was greater than 100, blanks were placed in location CANS.
  2086.             101   Before being stored in location CANS, character information was
  2087.                   truncated  on  the  right  to  a  length equal to the number of
  2088.                   characters specified by the value of LENMAX (or the  length  of
  2089.                   the  PL/I  character  string  variable when EDSHOWP is called).
  2090.                   The actual length of the record, after truncation, is  returned
  2091.                   in LENACT.
  2092.             102   Data set has not been opened.  The information returned is  the
  2093.                   default value or the value set by the EDSET(P) routine.
  2094. 0  ITEM     An integer indicating the item to be shown must  be  stored  in  this
  2095.             integer  variable  before  EDSHOW(P)  is called.  The possible values
  2096.             are:
  2097. 0           1     The logical record length (LRECL) of the data set.
  2098.             2     The block size (BLKSIZE) of the data set.
  2099.             3     The maximum number of characters allowed in each logical record
  2100.                   of a data set.  This differs from the LRECL in the case of edit
  2101.                   format data sets and data sets with RECFM of V.
  2102.             4     The actual length of text returned by EDGET(P),  EDNCNV(P),  or
  2103.                   EDSHOW(P) (before truncation, if applicable).
  2104.             5     Value of the last valid line number referenced.
  2105.             6     Indicates whether or not a flag is being set for lines changed.
  2106.                   The value returned in IANS indicates the action being taken:
  2107. 0                 . 1 means when lines are written they  are  flagged  as  having
  2108.                     been changed.
  2109.                   . 2 means when lines are written they are not flagged as having
  2110.                     been changed.
  2111. 0           7     Indicates whether or not the last line read has the flag set or
  2112.                   not,  indicating  that a change has been made in the line.  The
  2113.                   value returned in IANS indicates the action being taken:
  2114. -
  2115. 0                                                            SUBROUTINE EDSHOW(P)
  2116. 150
  2117. -
  2118.                   . 1 means the record read has been changed.
  2119.                   . 2 means the record read has not been changed.
  2120. 0           8     Indicates the method used for writing line numbers into a line.
  2121.                   The value returned in IANS indicates the action being taken:
  2122. 0                 . 1 means that text is moved to the right  when  inserting  the
  2123.                     line numbers.
  2124.                   . 2 means that whatever is in the columns is overlayed with the
  2125.                     line number.
  2126.                   . 3 means that the line  numbers  are  being  merged  with  the
  2127.                     columns  -- if the columns contain blanks, the line number is
  2128.                     moved into the columns; if the columns  do  not  contain  all
  2129.                     blanks, the line number is not stored in the line.
  2130. 0           9     Indicates whether or not ABEND situations are intercepted.  The
  2131.                   value returned in IANS indicates the action being taken:
  2132. 0                 . 1 means ABEND situations are intercepted.
  2133.                   . 2 means ABEND situations are not intercepted.
  2134. 0           10    The format of the data set.  The value returned in  IANS  indi-
  2135.                   cates  whether  or  not  the  data  set  is in edit or non-edit
  2136.                   format:
  2137. 0                 . 1 means the data set is edit format.
  2138.                   . 2 means the data set is non-edit format.
  2139. 0           11    The record format (RECFM) of  the  data  set  in  the  form  it
  2140.                   appears  in  the  DCBRECFM  field of a data control block.  The
  2141.                   three high order bytes of the integer are zero.   See  the  IBM  |
  2142.                   OS/VS2  MVS  Data Management Macro Instructions manual for more  |
  2143. +                 ______  ___  ____ __________ _____ ____________
  2144.                   information on the DCBRECFM field.  The record  format  of  the  |
  2145.                   data  set is available in character representation by using 101
  2146.                   as the value for ITEM.
  2147. 0           12    Indicates whether or not a string returned from a call to EDGET
  2148.                   is padded on the right with blanks.  The value returned in IANS
  2149.                   indicates the action being taken:
  2150. 0                 . 1 means padding is performed.
  2151.                   . 2 means padding is not performed.
  2152. 0           101   The record format (RECFM) of  the  data  set.   The  characters
  2153.                   returned  are  those  that  would  be  coded  in the RECFM sub-
  2154.                   parameter of the DCB parameter of a DD statement (e.g., FB  for
  2155.                   fixed blocked format).
  2156.             102   The value of the IBM ABEND code for an intercepted ABEND.   The
  2157.                   value  returned  in  CANS is of the form xxx-rc, where "xxx" is
  2158.                   three characters representing the actual hexadecimal ABEND code
  2159.                   and  "-rc" is the optional return code provided with some ABEND
  2160.                   codes.  Examples are 80A and 213-04.
  2161. -
  2162.  SUBROUTINE EDSHOW(P)
  2163. 1                                                                              51
  2164. -
  2165.             103   When reading a non-edit format data set, an invalid line number
  2166.                   was  encountered.   The  characters  read that form the invalid  |
  2167.                   line number are returned in CANS.                                |
  2168. 0  IANS     An integer representing the information requested is stored  in  this
  2169.             integer  variable by EDSHOW(P).  Used when ITEM is less than 100.  If
  2170.             ITEM is greater than 100, then the contents of IANS are not  used  by
  2171.             EDSHOW(P).
  2172. 0  CANS     The characters representing the information requested  is  stored  in
  2173.             this  area  by EDSHOW(P).  If necessary, the information is padded on
  2174.             the right with blanks or truncated on the right.  Used when  ITEM  is
  2175.             greater  than  100.   If  ITEM is less than 100, then the contents of
  2176.             CANS are not used by EDSHOW(P).
  2177. 0           For subroutine EDSHOWP, this argument must be a PL/I character string
  2178.             variable.   If  CANS is a fixed-length character string variable, the
  2179.             information will be padded on the right with blanks.  For  a  varying
  2180.             length  character  string,  the  current  length is set to the actual
  2181.             length of the information.
  2182. 0  LENMAX   The maximum number of characters that can be placed in location  CANS  |
  2183.             must be stored into this integer variable before EDSHOW is called.
  2184. 0           For subroutine EDSHOWP, this argument should be omitted.
  2185. 0  LENACT   Subroutine EDSHOW stores into  this  integer  the  actual  number  of
  2186.             characters  stored  in  location  CANS,  after truncation, but before
  2187.             padding with blanks.
  2188. 0           For subroutine EDSHOWP, this argument should be omitted.
  2189. -NOTES
  2190. +_____:
  2191. 0    If the value of ITEM is invalid, the subroutine will ABEND.
  2192. -
  2193. -
  2194. -
  2195. -
  2196. -
  2197. -
  2198. 0                                                            SUBROUTINE EDSHOW(P)
  2199. 152
  2200. -
  2201.                             SUBROUTINE EDGETL(P)
  2202. -P_R_O_E   This subroutine is a version of EDGET(P) that returns the  address  of  |
  2203. +_U_P_S_:
  2204.            the location where the characters of the line read are stored.
  2205. 0          Since there is no support in COBOL and Fortran for handling  pointers,
  2206.            this subroutine is not useable in these two languages.
  2207. -ARGUMENTS  CNTRL,RETURN,LINENO,PNTR,LENACT
  2208. +_________:
  2209. 0  NAME     FUNCTION
  2210. +  ____     ________
  2211. 0  CNTRL    The same control word that was specified when the data set was opened  |
  2212.             by the EDOPEN(P) subroutine call.
  2213. 0  RETURN   Return code.  Values are identical to those of EDGET(P).
  2214. 0  LINENO   A binary integer line number is stored by EDGETL(P) in this full word
  2215.             (4 byte) area.
  2216. 0           When reading an edit format data set, LINENO is normally set equal to
  2217.             the  line  number  obtained  from  the  record read.  However, if the
  2218.             EDNGEN(P) subroutine has been called to generate line  numbers,  then
  2219.             LINENO  will  be set equal to the line number which was generated for
  2220.             the record read.
  2221. 0           When reading a non-edit format data set, LINENO is normally set equal
  2222.             to  -1.   There  are two exceptions:  (1) if the EDNCOL(P) subroutine
  2223.             has been called to specify that line numbers are  in  the  data  set,
  2224.             then  LINENO  will  be set equal to the line number obtained from the  |
  2225.             record read:  (2) if subroutine EDNGEN(P) has been called to generate  |
  2226.             line  numbers,  then  the LINENO will be set equal to the line number  |
  2227.             which was generated for the record read.
  2228. 0  PNTR     A binary integer variable where EDGETL(P) stores the address  of  the
  2229.             location where the characters of the line read are stored.  The value
  2230.             returned in PNTR is only valid until  the  next  call  to  EDGETL(P),
  2231.             EDGET(P), EDCLOS(P), or EDTERM(P).
  2232. 0           For subroutine EDGETLP, this argument must be declared as  a  POINTER
  2233.             variable.   Upon  successful  return  from  EDGETLP, the pointer will
  2234.             contain the address of a fixed length character string  whose  length
  2235.             is  returned in LENACT.  Since a fixed length string is returned, the
  2236.             PL/I programmer must either know the length  of  the  records  to  be
  2237.             returned,  or  declare  a BASED character string with a length longer
  2238.             than any possible record and use the SUBSTR function to refer to  the
  2239.             actual data.
  2240. 0  LENACT   Subroutine EDGETL(P) stores into this  integer  variable  the  actual
  2241.             number of characters in the line read.
  2242. -
  2243.  SUBROUTINE EDGETL(P)
  2244. 1                                                                              53
  2245. -
  2246.  NOTES
  2247. +_____:
  2248. 0    If the data set is not open, the subroutine will ABEND.
  2249. -
  2250. -
  2251. -
  2252. -
  2253. -
  2254. -
  2255. -
  2256. -
  2257. -
  2258. -
  2259. -
  2260. -
  2261. -
  2262. -
  2263. -
  2264. -
  2265. -
  2266. 0                                                            SUBROUTINE EDGETL(P)
  2267. 154
  2268. -
  2269.                             SUBROUTINE EDNCNV(P)
  2270. -P_R_O_E    This subroutine may be used to convert the representation of  a  line
  2271. +_U_P_S_:
  2272.             number (1) between binary integer and WYLBUR character format, or (2)
  2273.             between binary integer and TSO (IBM) character format.
  2274. -ARGUMENTS  CNTRL,RETURN,OPTION,LINENO,CHARS,LENMAX,LENACT
  2275. +_________:
  2276. 0  NAME     FUNCTION
  2277. +  ____     ________
  2278. 0  CNTRL    The same control word that was specified when EDINIT(P) was called.    |
  2279. 0  RETURN   Return code.  The possible return values are:
  2280. 0           0    Processing completed normally.
  2281.             100  The converted line number was truncated on the left in order  to
  2282.                  fit in the area established by CHARS, to the length equal to the
  2283.                  number of characters specified by the value of  LENMAX  (or  the
  2284.                  length  of the PL/I character string if EDNCNVP is called).  The
  2285.                  actual number of characters in the line  number,  after  trunca-
  2286.                  tion, is returned in LENACT.
  2287.             200  An attempt was made to convert an invalid line number.
  2288. 0  OPTION   An integer representing the type of conversion to  be  done  must  be
  2289.             stored  in  this  integer  variable  before EDNCNV(P) is called.  The
  2290.             values are:
  2291. 0           1     Conversion from binary integer to  WYLBUR  format.   A  decimal
  2292.                   point  is  always  included  in the converted line number.  The
  2293.                   result of the conversion is  9  characters,  with  the  decimal
  2294.                   point in the sixth position.
  2295.             2     Conversion from  binary  integer  to  WYLBUR  format.   If  the
  2296.                   converted  line  number is an integer, the decimal point is not
  2297.                   included in the converted  line  number.   The  result  of  the
  2298.                   conversion  is  the  least  number  of  characters necessary to
  2299.                   represent the line number.
  2300.             3     Conversion from binary integer to TSO (IBM) format.  The result
  2301.                   of the conversion is eight digits, with leading zeros.
  2302.             101   Conversion from WYLBUR format to binary integer format.
  2303.             102   Conversion from TSO (IBM) format to binary integer format.
  2304. 0  LINENO   Contains the binary integer line number, either to  be  converted  or
  2305.             after conversion, depending on the value of OPTION.
  2306. 0  CHARS    Contains the WYLBUR or TSO (IBM)  line  number  in  character  string
  2307.             format,  either to be converted or after conversion, depending on the
  2308.             value of OPTION.
  2309. 0           For subroutine EDNCNVP, if the conversion is from binary  integer  to
  2310.             character  string  (i.e.,  WYLBUR or TSO (IBM)) format, this argument
  2311. -
  2312.  SUBROUTINE EDNCVN(P)
  2313. 1                                                                              55
  2314. -
  2315.             must be a character string variable.   If  CHARS  is  a  fixed-length
  2316.             character  string  variable,  the  line  number will be padded on the
  2317.             right with blanks.   For  a  varying  length  character  string,  the
  2318.             current length is set to the actual length of the line number.
  2319. 0  LENMAX   The maximum number of characters which  can  be  placed  in  location
  2320.             CHARS  must  be  stored  in  this  integer  variable before EDNCNV is
  2321.             called.
  2322. 0           For subroutine EDNCNVP, this argument should be omitted.
  2323. 0  LENACT   The actual number of characters in a  line  number,  after  the  line
  2324.             number  was  truncated,  but  before  the line number was padded with
  2325.             blanks, is returned in this integer variable  by  subroutine  EDNCNV.
  2326.             The  number  of characters is only calculated when conversion is from
  2327.             binary integer to character format (i.e., WYLBUR or TSO (IBM)).  This
  2328.             variable  will  be  ignored if conversion is from character to binary
  2329.             integer format.
  2330. 0           For subroutine EDNCNVP, this argument should be omitted.
  2331. -NOTES
  2332. +_____:
  2333. 0    If the value of OPTION is invalid, the subroutine will ABEND.
  2334. -
  2335. -
  2336. -
  2337. -
  2338. -
  2339. -
  2340. -
  2341. -
  2342. -
  2343. -
  2344.                                                              SUBROUTINE EDNCVN(P)
  2345. 156
  2346. -
  2347.                                   Examples
  2348. -    The following examples include programs for  each  language  that  can  call  |
  2349.  these  subroutines:   COBOL, FORTRAN, PL/I and Assembler.  Each program performs  |
  2350.  the same function.  An edit format data set is copied to a  non-edit  data  set.
  2351.  The  ddname  of the DD statement for the edit format input data set is stored in  |
  2352.  DDNAMI.  There are at most 80 characters in each record of the data set.  In the
  2353.  non-edit  format  data  set  written,  the line numbers are stored in columns 73
  2354.  through 80.  The ddname of the DD statement for the output data set is stored in  |
  2355.  DDNAMO.  In an effort to keep the examples as short and simple as possible, only  |
  2356.  a bare minimum of error processing has been included.  Sample DD statements  for  |
  2357.  these data sets are:                                                              |
  2358. 0//GO.IN    DD  DSNAME=AAAAIII.INPUT,UNIT=FILE,VOL=SER=FILE17,DISP=SHR
  2359.  //GO.OUT   DD  DSNAME=AAAAIII.OUTPUT,UNIT=FILE,VOL=SER=TMP003,
  2360.  //             DISP=(NEW,KEEP),DCB=(RECFM=FB,LRECL=80,BLKSIZE=6320),              |
  2361.  //             SPACE=(TRK,(10,2),RLSE)
  2362. -
  2363. -
  2364. -
  2365. -
  2366. -
  2367. -
  2368. -
  2369. -
  2370. -
  2371. -
  2372. -
  2373. -
  2374. 0ED Routines: Examples
  2375. 1                                                                              57
  2376. -
  2377.  1.  COBOL
  2378. 0       IDENTIFICATION DIVISION.
  2379.         PROGRAM-ID. ED.
  2380. 0       DATA DIVISION.
  2381.         WORKING-STORAGE SECTION.
  2382.         01  CNTRLI              PIC X(4).
  2383.         01  CNTRLO              PIC X(4).
  2384.         01  DDNAMI              PIC X(8).
  2385.         01  DDNAMO              PIC X(8).
  2386.         01  LINE-VAR            PIC X(80).
  2387.         01  MSG-VAR             PIC X(132).
  2388.         01  RETURN-VALUE        PIC S9(8) COMPUTATIONAL.
  2389.         01  LINENO              PIC S9(8) COMPUTATIONAL.
  2390.         01  TYP                 PIC S9(8) COMPUTATIONAL.
  2391.         01  LNOUT               PIC S9(8) COMPUTATIONAL.
  2392.         01  LENGTH-VAR          PIC S9(8) COMPUTATIONAL.
  2393.         01  LENMAX              PIC S9(8) COMPUTATIONAL.
  2394.         01  LENACT              PIC S9(8) COMPUTATIONAL.
  2395.         01  COL1                PIC S9(8) COMPUTATIONAL.
  2396.         01  COL2                PIC S9(8) COMPUTATIONAL.
  2397.         PROCEDURE DIVISION.
  2398.         SET-UP-SECTION.
  2399.             MOVE 'IN      ' TO DDNAMI.
  2400.             MOVE 'OUT     ' TO DDNAMO.
  2401.        *
  2402.        *  SET UP DATA SETS
  2403.        *
  2404.             CALL 'EDINIT' USING CNTRLI RETURN-VALUE.
  2405.             CALL 'EDINIT' USING CNTRLO RETURN-VALUE.
  2406.             MOVE 1 TO TYP.
  2407.             CALL 'EDOPEN' USING CNTRLI RETURN-VALUE DDNAMI TYP.
  2408.             IF RETURN-VALUE NOT EQUAL 0 GO TO ERROR-I.
  2409.             MOVE 2 TO TYP.
  2410.             CALL 'EDNCOL' USING CNTRLO RETURN-VALUE TYP COL1 COL2.
  2411.             IF RETURN-VALUE NOT EQUAL 0 GO TO ERROR-O.
  2412.             MOVE 101 TO TYP.
  2413.             CALL 'EDOPEN' USING CNTRLO RETURN-VALUE DDNAMO TYP.
  2414.             IF RETURN-VALUE NOT EQUAL 0 GO TO ERROR-O.
  2415. -
  2416. -
  2417. -
  2418. -
  2419. -
  2420.                                                             ED Routines: Examples
  2421. 158
  2422. -
  2423.        *
  2424.        *  READ AND WRITE DATA SET
  2425.        *
  2426.         READ-WRITE-SECTION.
  2427.             MOVE 80 TO LENMAX.
  2428.             CALL 'EDGET' USING CNTRLI RETURN-VALUE LINENO LINE-VAR
  2429.                LENMAX LENACT.
  2430.             IF RETURN-VALUE NOT EQUAL 0 GO TO ERROR-I.
  2431.             MOVE 72 TO LENGTH-VAR.
  2432.             CALL 'EDPUT' USING CNTRLO RETURN-VALUE LINENO LNOUT
  2433.                LINE-VAR LENGTH-VAR.
  2434.             IF RETURN-VALUE NOT EQUAL 0 GO TO ERROR-O.
  2435.             GO TO READ-WRITE-SECTION.
  2436.        *
  2437.        *  OBTAIN TEXT OF ERROR MESSAGE
  2438.        *
  2439.         ERROR-I.
  2440.             MOVE 132 TO LENMAX.
  2441.             CALL 'EDMSG' USING CNTRLI RETURN-VALUE MSG-VAR
  2442.                LENMAX LENACT.
  2443.             GO TO PRINT-IT.
  2444.         ERROR-O.
  2445.             MOVE 132 TO LENMAX.
  2446.             CALL 'EDMSG' USING CNTRLO RETURN-VALUE MSG-VAR
  2447.                LENMAX LENACT.
  2448.         PRINT-IT.
  2449.             DISPLAY MSG-VAR.
  2450.        *
  2451.        *  CLOSE DATA SETS
  2452.        *
  2453.         CLOSE-SECTION.
  2454.             CALL 'EDCLOS' USING CNTRLI RETURN-VALUE.
  2455.             CALL 'EDCLOS' USING CNTRLO RETURN-VALUE.
  2456.             CALL 'EDTERM' USING CNTRLI RETURN-VALUE.
  2457.             CALL 'EDTERM' USING CNTRLO RETURN-VALUE.
  2458.         EXITING.
  2459.             STOP RUN.
  2460. -
  2461. -
  2462. -
  2463. -
  2464. -
  2465. -
  2466.  ED Routines: Examples
  2467. 1                                                                              59
  2468. -
  2469.  2.  FORTRAN
  2470. 0C
  2471.  C  DECLARATIONS
  2472.  C
  2473.        INTEGER*4 CNTRLI,CNTRLO,RETURN
  2474.        INTEGER*4 LINENO,LNOUT,LINE(20),LENMAX,LENACT,MSG(33)
  2475.        REAL*8 DDNAMI,DDNAMO
  2476.        DATA DDNAMI/'IN      '/,DDNAMO/'OUT     '/
  2477.  C
  2478.  C  SET UP DATA SETS
  2479.  C
  2480.        CALL EDINIT(CNTRLI,RETURN)
  2481.        CALL EDINIT(CNTRLO,RETURN)
  2482.        CALL EDOPEN(CNTRLI,RETURN,DDNAMI,1)
  2483.        IF (RETURN.NE.0) GO TO 200
  2484.        CALL EDNCOL(CNTRLO,RETURN,2,0,0)
  2485.        IF (RETURN.NE.0) GO TO 300
  2486.        CALL EDOPEN(CNTRLO,RETURN,DDNAMO,101)
  2487.        IF (RETURN.NE.0) GO TO 300
  2488.  C
  2489.  C  READ AND WRITE DATA SET
  2490.  C
  2491.    100 CALL EDGET(CNTRLI,RETURN,LINENO,LINE,80,LENACT)
  2492.        IF (RETURN.NE.0) GO TO 200
  2493.        CALL EDPUT(CNTRLO,RETURN,LINENO,LNOUT,LINE,72)
  2494.        IF (RETURN.NE.0) GO TO 300
  2495.        GO TO 100
  2496.  C
  2497.  C  OBTAIN TEXT OF ERROR MESSAGE
  2498.  C
  2499.    200 CALL EDMSG(CNTRLI,RETURN,MSG,132,LENACT)
  2500.        GO TO 400
  2501.    300 CALL EDMSG(CNTRLO,RETURN,MSG,132,LENACT)
  2502.    400 WRITE(15,500) MSG
  2503.    500 FORMAT(1X,33A4)
  2504.  C
  2505.  C  CLOSE DATA SETS
  2506.  C
  2507.    600 CALL EDCLOS(CNTRLI,RETURN)
  2508.        CALL EDCLOS(CNTRLO,RETURN)
  2509.        CALL EDTERM(CNTRLI,RETURN)
  2510.        CALL EDTERM(CNTRLO,RETURN)
  2511.    700 STOP
  2512.        END
  2513. -
  2514. -
  2515. -
  2516. 0                                                           ED Routines: Examples
  2517. 160
  2518. -
  2519.  3.  PL/I
  2520. 0 ED: PROCEDURE OPTIONS(MAIN);
  2521. 0    %INCLUDE EDDCLS;
  2522.      DCL (CNTRLI,CNTRLO) FIXED BINARY(31);
  2523.      DCL DDNAMI CHARACTER(8) INIT('IN');
  2524.      DCL DDNAMO CHARACTER(8) INIT('OUT');
  2525.      DCL LINE CHARACTER(80) VARYING;
  2526.      DCL MSG CHARACTER(132) VARYING;
  2527.      DCL (RETURN,LINENO,LNOUT) FIXED BINARY(31);
  2528. 0    /*  SET UP DATA SETS  */
  2529. 0    CALL EDINITP(CNTRLI,RETURN);
  2530.      CALL EDINITP(CNTRLO,RETURN);
  2531.      CALL EDOPENP(CNTRLI,RETURN,DDNAMI,1);
  2532.      IF RETURN ^= 0 THEN GO TO ERROR_I;
  2533.      CALL EDNCOLP(CNTRLO,RETURN,2,0,0);
  2534.      IF RETURN ^= 0 THEN GO TO ERROR_O;
  2535.      CALL EDOPENP(CNTRLO,RETURN,DDNAMO,101);
  2536.      IF RETURN ^= 0 THEN GO TO ERROR_O;
  2537. 0    /*  READ AND WRITE DATA SET  */
  2538. 0    DO WHILE ('1'B);
  2539.         CALL EDGETP(CNTRLI,RETURN,LINENO,LINE);
  2540.         IF RETURN ^= 0 THEN GO TO ERROR_I;
  2541.         CALL EDPUTP(CNTRLO,RETURN,LINENO,LNOUT,LINE);
  2542.         IF RETURN ^= 0 THEN GO TO ERROR_O;
  2543.         END;
  2544. 0    /*  OBTAIN TEXT OF ERROR MESSAGE  */
  2545. 0    ERROR_I:
  2546.       CALL EDMSGP(CNTRLI,RETURN,MSG);
  2547.       PUT EDIT(MSG) (A) SKIP;
  2548.       GO TO CLOSE;
  2549.      ERROR_O:
  2550.       CALL EDMSGP(CNTRLO,RETURN,MSG);
  2551.       PUT EDIT(MSG) (A) SKIP;
  2552. 0    /*  CLOSE DATA SETS  */
  2553. 0   CLOSE:
  2554.      CALL EDCLOSP(CNTRLI,RETURN);
  2555.      CALL EDCLOSP(CNTRLO,RETURN);
  2556.      CALL EDTERMP(CNTRLI,RETURN);
  2557.      CALL EDTERMP(CNTRLO,RETURN);
  2558.     EXIT:
  2559.      END ED;
  2560. -
  2561. 0ED Routines: Examples
  2562. 1                                                                              61
  2563. -
  2564.  4.  Assembler
  2565. 0ED       CSECT
  2566.           SAVE  (14,12),,*
  2567.           BALR  12,0
  2568.           USING *,12
  2569.           ST    13,SAVEAREA+4
  2570.           LA    11,SAVEAREA
  2571.           ST    11,8(0,13)
  2572.           LR    13,11
  2573.           OPEN  (PUTDCB,(OUTPUT))
  2574.  *
  2575.  *  SET UP DATA SETS
  2576.  *
  2577.           CALL  EDINIT,(CNTRLI,RETURN)
  2578.           CALL  EDINIT,(CNTRLO,RETURN)
  2579.           CALL  EDOPEN,(CNTRLI,RETURN,DDNAMI,ONE)
  2580.           CLC   RETURN,=F'0'
  2581.           BNE   ERRORI
  2582.           CALL  EDNCOL,(CNTRLO,RETURN,TWO,ZERO,ZERO)
  2583.           CLC   RETURN,=F'0'
  2584.           BNE   ERRORO
  2585.           CALL  EDOPEN,(CNTRLO,RETURN,DDNAMO,ONEOHONE)
  2586.           CLC   RETURN,=F'0'
  2587.           BNE   ERRORO
  2588.  *
  2589.  *  READ AND WRITE DATA SET
  2590.  *
  2591.  LOOP     CALL  EDGET,(CNTRLI,RETURN,LINENO,LINE,LENMAX,LENACT)
  2592.           CLC   RETURN,=F'0'
  2593.           BNE   ERRORI
  2594.           CALL  EDPUT,(CNTRLO,RETURN,LINENO,LNOUT,LINE,LENGTH)
  2595.           CLC   RETURN,=F'0'
  2596.           BNE   ERRORO
  2597.           B     LOOP
  2598.  *
  2599.  *  OBTAIN TEXT OF ERROR MESSAGE
  2600.  *
  2601.  ERRORI   CALL  EDMSG,(CNTRLI,RETURN,LINE,LENMAX2,LENACT)
  2602.           B     PRINT
  2603.  ERRORO   CALL  EDMSG,(CNTRLO,RETURN,LINE,LENMAX2,LENACT)
  2604.  PRINT    PUT   PUTDCB,LINE
  2605.  *
  2606.  *  CLOSE DATA SETS
  2607.  *
  2608.  CLOSE    CALL  EDCLOS,(CNTRLI,RETURN)
  2609.           CALL  EDCLOS,(CNTRLO,RETURN)
  2610.           CALL  EDTERM,(CNTRLI,RETURN)
  2611.           CALL  EDTERM,(CNTRLO,RETURN)
  2612.  EXIT     CLOSE (PUTDCB)
  2613.           L     13,SAVEAREA+4
  2614.           RETURN (14,12),RC=0
  2615. -
  2616.                                                             ED Routines: Examples
  2617. 162
  2618. -
  2619.  *
  2620.  *  SET UP INITIAL VALUES AND WORK AREAS
  2621.  *
  2622.  CNTRLI   DS    F
  2623.  CNTRLO   DS    F
  2624.  DDNAMI   DC    CL8'IN'
  2625.  DDNAMO   DC    CL8'OUT'
  2626.  LINE     DC    CL132' '
  2627.  LENGTH   DC    F'72'
  2628.  LENMAX   DC    F'80'
  2629.  LENMAX2  DC    F'132'
  2630.  LENACT   DS    F
  2631.  RETURN   DS    F
  2632.  LINENO   DS    F
  2633.  LNOUT    DS    F
  2634.  ZERO     DC    F'0'
  2635.  ONE      DC    F'1'
  2636.  TWO      DC    F'2'
  2637.  ONEOHONE DC    F'101'
  2638.  PUTDCB   DCB   DDNAME=SYSOUT,DSORG=PS,MACRF=(PM),RECFM=FB,LRECL=80,    X
  2639.                 BLKSIZE=80
  2640.  SAVEAREA DC    18A(0)
  2641.           END
  2642. -
  2643. -
  2644. -
  2645. -
  2646. -
  2647. -
  2648. -
  2649. -
  2650. -
  2651. -
  2652. -ED Routines: Examples
  2653. 1                                                                              63
  2654. -
  2655.                              Reference Summary
  2656. -PAGE  SUBROUTINE   ARGUMENTS                        FUNCTION
  2657. +____  __________   _________                        ________
  2658. 025    EDINIT       CNTRL,RETURN                     Initialization
  2659.  26    EDOPEN       CNTRL,RETURN,DDNAME,TYPE         Open data set
  2660.  28    EDGET        CNTRL,RETURN,LINENO,LINE,        Read next record
  2661.                       LENMAX,LENACT
  2662.  31    EDPUT        CNTRL,RETURN,LINENO,LNOUT,       Write next record
  2663.                       LINE,LENGTH
  2664.  33    EDMSG        CNTRL,RETURN,MSG,LENMAX,         Get message text
  2665.                       LENACT
  2666.  34    EDCLOS       CNTRL,RETURN                     Close data set
  2667.  35    EDTERM       CNTRL,RETURN                     Termination
  2668.  42    EDNCOL       CNTRL,RETURN,TYPE,COL1,COL2      Column positions  for  line
  2669.                                                      numbers
  2670.  44    EDNGEN       CNTRL,RETURN,TYPE,LINENO,INCR    Line number generation
  2671.  46    EDSET        CNTRL,RETURN,ITEM,IPARM,         Set information
  2672.                       CPARM,LENGTH
  2673.  49    EDSHOW       CNTRL,RETURN,ITEM,IANS,          Show information
  2674.                       CANS,LENMAX,LENACT
  2675.  52    EDGETL       CNTRL,RETURN,LINENO,PNTR,        Get address of next record
  2676.                       LENACT
  2677.  54    EDNCNV       CNTRL,RETURN,OPTION,LINENO,      Line number conversion
  2678.                       CHARS,LENMAX,LENACT
  2679. -
  2680.  25    EDINITP      CNTRL,RETURN                     Initialization
  2681.  26    EDOPENP      CNTRL,RETURN,DDNAME,TYPE         Open data set
  2682.  28    EDGETP       CNTRL,RETURN,LINENO,LINE         Read next record
  2683.  31    EDPUTP       CNTRL,RETURN,LINENO,LNOUT,LINE   Write next record
  2684.  33    EDMSGP       CNTRL,RETURN,MSG                 Get message text
  2685.  34    EDCLOSP      CNTRL,RETURN                     Close data set
  2686.  35    EDTERMP      CNTRL,RETURN                     Termination
  2687.  42    EDNCOLP      CNTRL,RETURN,TYPE,COL1,COL2      Column positions  for  line
  2688.                                                      numbers
  2689.  44    EDNGENP      CNTRL,RETURN,TYPE,LINENO,INCR    Line number generation
  2690.  46    EDSETP       CNTRL,RETURN,ITEM,IPARM,CPARM    Set information
  2691.  49    EDSHOWP      CNTRL,RETURN,ITEM,IANS,CANS      Show information
  2692.  52    EDGETLP      CNTRL,RETURN,LINENO,PNTR,LENACT  Get address of next record
  2693.  54    EDNCNVP      CNTRL,RETURN,OPTION,LINENO,      Line number conversion
  2694.                       CHARS
  2695. -
  2696. -
  2697. -
  2698. -                                                               Reference Summary
  2699. 164
  2700. -
  2701.                              Common ABEND Codes
  2702. -    IBM ABEND codes are documented as hexadecimal integers.  Each of  the  ABEND
  2703.  codes  under consideration have an IEC message that must be examined to obtain a
  2704.  complete description of the error that occurred.  The IEC messages appear in the
  2705.  JES2  system log, located at the beginning of the output of each job.  The ABEND
  2706.  codes are described in the IBM document V_2 S_s_e_ C_d_s and  the  IEC  messages
  2707. +                                        _S_ _y_t_m _o_e_
  2708.  are described in the IBM document V_2 S_s_e_ M_s_a_e_.
  2709. +                                  _S_ _y_t_m _e_s_g_s
  2710. 0    The following list contains the most commonly encountered IBM ABEND codes in
  2711.  hexadecimal,  their  associated  IEC message numbers, and a short description of
  2712.  the most common cause of the error.
  2713. 0    The following ABEND codes may be encountered when a data set  is  opened  by
  2714.  the EDOPEN(P) subroutine:
  2715. 0HEX    IEC Msg   Common Meaning
  2716. +___    ___ ___   ______ _______
  2717. 0013    IEC141I   Conflicting or unsupported DCB parameters; member  name  speci-
  2718.                   fied on DD statement not found
  2719.  213    IEC143I   Data set on disk not found
  2720.  413    IEC145I   I/O error reading label on tape
  2721.  613    IEC147I   I/O error in tape label processing or tape positioning
  2722.  813    IEC149I   Data set name on DD statement does not match data set  name  in
  2723.                   tape label
  2724.  A13    IEC151I   File sequence number in LABEL on DD statement not on volume
  2725.  C13    IEC153I   Output data sets cannot be concatenated
  2726. -    The following ABEND codes may be encountered when a data set  is  closed  by
  2727.  the EDCLOS(P) subroutine:
  2728. 0HEX    IEC Msg   Common Meaning
  2729. +___    ___ ___   ______ _______
  2730. 0214    IEC210I   I/O error in tape positioning
  2731.  614    IEC214I   I/O error in writing file mark
  2732.  714    IEC215I   I/O error in tape label processing
  2733.  B14    IEC217I   Error in processing the directory of a PDS
  2734. -
  2735. -
  2736. -
  2737. -
  2738. -
  2739. 0Common ABEND Codes
  2740. 1                                                                              65
  2741. -
  2742.      The following ABEND codes may be encountered when a data set  is  referenced
  2743.  by any of the subroutines (EDOPEN(P), EDGET(P), EDPUT(P), EDCLOS(P)):
  2744. 0HEX    IEC Msg   Common Meaning
  2745. +___    ___ ___   ______ _______
  2746. 0137    IEC022I   I/O error in end of volume processing of tape
  2747.  237    IEC023I   Verification error in tape label processing
  2748.  637    IEC026I   I/O error in tape label processing
  2749.  737    IEC027I   Data set on disk not found for multivolume or concatenated data
  2750.                   set
  2751.  B37    IEC030I   Not enough space  available  on  volume  or  not  enough  space
  2752.                   requested for disk data set
  2753.  D37    IEC031I   Data set needs more space but no secondary  quantity  specified
  2754.                   in SPACE on DD statement
  2755.  E37    IEC032I   Not enough space  available  on  volume  or  not  enough  space
  2756.                   requested for disk data set
  2757. -
  2758. -
  2759. -
  2760. -
  2761. -
  2762. -
  2763. -
  2764. -
  2765. -
  2766. -
  2767. -
  2768. -
  2769. -
  2770.                                                                Common ABEND Codes
  2771. 166
  2772. -
  2773. -
  2774. -
  2775. -
  2776. -
  2777. -
  2778. -
  2779. -
  2780. -
  2781. -
  2782. -
  2783. -
  2784. -
  2785. -
  2786. -
  2787. -
  2788. -
  2789. -
  2790. -
  2791. 0Common ABEND Codes
  2792. 1                                                                              67
  2793. -
  2794.                                    Index
  2795. -Abbreviations, 19                            EDCLOS(P), 34
  2796.  ABEND                                        EDGET(P), 28
  2797.    PARM Field, 14                             EDGETL(P), 52
  2798.    UTILOPT, 16                                EDINIT(P), 25
  2799.  ABEND Conditions, 24                         EDMSG(P), 33
  2800.  ABORT Option                                 EDNCNV(P), 54
  2801.    CALL Command, 13                           EDNCOL(P), 42
  2802.  Arguments, 21                                EDNGEN(P), 44
  2803.    Common Declarations, 21                    EDOPEN(P), 26
  2804.    Control Word, 22                           EDPUT(P), 31
  2805.    Return Code, 22                            EDSET(P), 46
  2806.                                               EDSHOW(P), 49
  2807.  Binary Integer Form                          EDTERM(P), 35
  2808.    Line Numbers, 23                           Line Numbers, 23
  2809.                                             EDCLOS(P), 21, 34
  2810.  CALL Command, 13                           EDGET(P), 20, 28
  2811.    ABORT Option, 13                         EDGETL(P), 21, 52
  2812.    Valid Relational-Operators, 13           EDINIT(P), 20, 25
  2813.  CC Option                                  EDMSG(P), 21, 33
  2814.    LIST Command, 11                         EDNCNV(P), 21, 54
  2815.  Character String Form                      EDNCOL(P), 21, 42
  2816.    Line Numbers, 23                         EDNGEN(P), 21, 44
  2817.  COMMAND, 16                                EDOPEN(P), 20, 26
  2818.  Commands, 6                                EDPUT(P), 21, 31
  2819.    CALL, 13                                 EDSET(P), 21, 46
  2820.    COPY, 7                                  EDSHOW(P), 21, 49
  2821.    LIST, 11                                 EDSUTIL Main Program, 5
  2822.  Common ABEND Codes, 64                       CALL Command, 13
  2823.  COPY Command, 7                              Commands, 6
  2824.    IBM Option, 9                              EDSUTIL Procedure, 15
  2825.    INSERT Option, 9                           JCL, 5
  2826.    LIST Option, 7                             LIST Command, 11
  2827.    MERGE Option, 9                            PARM Field, 14
  2828.    NUMBER START Option, 9                     Program Description, 5
  2829.    NUMBERED Option, 8                       EDSUTIL Procedure, 15
  2830.    OVERLAY Option, 9                          COMMAND, 16
  2831.    RECFM U, 10                                UTILOPT, 15
  2832.    SKIP Option, 10                          EDTERM(P), 21, 35
  2833.    TAKE Option, 10
  2834.    TIMES Option, 10                         IBM Option
  2835.    TSO Option, 9                              COPY Command, 9
  2836.                                             INDENT Option
  2837.  Documents Available, 1                       LIST Command, 12
  2838.  DOUBLE Option                              INSERT Option
  2839.    LIST Command, 12                           COPY Command, 9
  2840. 0ED Routines, 20                            JCL, 5
  2841.    ABEND Conditions, 24
  2842.    Arguments, 21                            Line Numbers, 23
  2843. -
  2844.                                                                             Index
  2845. 168
  2846. -
  2847.    Binary Integer Form, 23                  Reference Summary, 63
  2848.    Character String Form, 23                Required Subroutines, 20
  2849.  LIST Command, 11                             EDCLOS(P), 21
  2850.    CC Option, 11                              EDGET(P), 20
  2851.    DOUBLE Option, 12                          EDINIT(P), 20
  2852.    INDENT Option, 12                          EDMSG(P), 21
  2853.    MARKER Option, 12                          EDOPEN(P), 20
  2854.    MC Option, 11                              EDPUT(P), 21
  2855.    SPACING Option, 12                         EDTERM(P), 21
  2856.    TRIPLE Option, 12                        Return Code Range, 23
  2857.    UNNUMBERED Option, 11
  2858.  LIST Option                                SKIP Option
  2859.    COPY Command, 7                            COPY Command, 10
  2860.                                             SPACING Option
  2861.  Manuals Available, 1                         LIST Command, 12
  2862.  MARKER Option                              Subroutines
  2863.    LIST Command, 12                           EDCLOS(P), 34
  2864.  MC Option                                    EDGET(P), 28
  2865.    LIST Command, 11                           EDGETL(P), 52
  2866.  MERGE Option                                 EDINIT(P), 25
  2867.    COPY Command, 9                            EDMSG(P), 33
  2868.  MESSAGES                                     EDNCNV(P), 54
  2869.    PARM Field, 14                             EDNCOL(P), 42
  2870.    UTILOPT, 16                                EDNGEN(P), 44
  2871.  Multiple Data Sets, 41                       EDOPEN(P), 26
  2872.                                               EDPUT(P), 31
  2873.  NUMBER START Option                          EDSET(P), 46
  2874.    COPY Command, 9                            EDSHOW(P), 49
  2875.  NUMBERED Option                              EDTERM(P), 35
  2876.    COPY Command, 8                          Summary of ED Subroutines, 20
  2877.                                               Optional Subroutines, 21
  2878.  Optional Subroutines, 21                     Required Subroutines, 20
  2879.    EDGETL(P), 21                            SYSIN
  2880.    EDNCNV(P), 21                              PARM Field, 14
  2881.    EDNCOL(P), 21                              UTILOPT, 15
  2882.    EDNGEN(P), 21                            SYSPRINT
  2883.    EDSET(P), 21                               PARM Field, 14
  2884.    EDSHOW(P), 21                              UTILOPT, 16
  2885.  OVERLAY Option
  2886.    COPY Command, 9                          TAKE Option
  2887.                                               COPY Command, 10
  2888.  PARM Field, 14                             TERMINATE
  2889.    ABEND, 14                                  PARM Field, 14
  2890.    MESSAGES, 14                               UTILOPT, 16
  2891.    SYSIN, 14                                TIMES Option
  2892.    SYSPRINT, 14                               COPY Command, 10
  2893.    TERMINATE, 14                            TRIPLE Option
  2894.    UNNUMBERED, 14                             LIST Command, 12
  2895.  Program Description, 5                     TSO Option
  2896.                                               COPY Command, 9
  2897.  RECFM U Option
  2898.    COPY Command, 10                         UNNUMBERED
  2899. -
  2900.  Index
  2901. 1                                                                              69
  2902. -
  2903.    PARM Field, 14                             SYSIN, 15
  2904.    UTILOPT, 15                                SYSPRINT, 16
  2905.  UNNUMBERED Option                            TERMINATE, 16
  2906.    LIST Command, 11                           UNNUMBERED, 15
  2907.  UTILOPT, 15
  2908.    ABEND, 16                                Valid Relational-Operators, 13
  2909.    MESSAGES, 16
  2910. -
  2911. -
  2912. -
  2913. -
  2914. -
  2915. -
  2916. -
  2917. -
  2918. -
  2919. -
  2920. -
  2921. -
  2922. -
  2923. -
  2924. -
  2925. -
  2926.                                                                             Index
  2927. 170
  2928. -
  2929. -
  2930. -
  2931. -
  2932. -
  2933. -
  2934. -
  2935. -
  2936. -
  2937. -
  2938. -
  2939. -
  2940. -
  2941. -
  2942. -
  2943. -
  2944. -
  2945. -
  2946. -
  2947. 0Index
  2948. 1
  2949.                                 Comment Form
  2950. -Is the Edit Format Utility Package Manual                    YES  NO
  2951. 0                   Clear?                                    __   __
  2952.                     Well Organized?                           __   __
  2953.                     Complete?                                 __   __
  2954.                     Accurate?                                 __   __
  2955.                     Suitable for the beginner?                __   __
  2956.                     Suitable for the advanced user?           __   __
  2957. -Comments:  _____________________________________________________________________
  2958. 0________________________________________________________________________________
  2959. 0________________________________________________________________________________
  2960. 0________________________________________________________________________________
  2961. 0________________________________________________________________________________
  2962. 0________________________________________________________________________________
  2963. 0________________________________________________________________________________
  2964. 0________________________________________________________________________________
  2965. 0________________________________________________________________________________
  2966. 0________________________________________________________________________________
  2967. 0________________________________________________________________________________
  2968. 0________________________________________________________________________________
  2969. 0________________________________________________________________________________
  2970. 0________________________________________________________________________________
  2971. 0________________________________________________________________________________
  2972. 0________________________________________________________________________________
  2973. -
  2974. 0Please give page references where appropriate.  If you  wish  a  reply,  include
  2975.  your name and mailing address.
  2976. -                             Send to:  NIH
  2977.                                         DCRT
  2978.                                         Computer Center
  2979.                                         Technical Information Office
  2980.                                         Bldg. 12A, Rm. 1017
  2981.                                         Bethesda, Maryland   20205
  2982. 1
  2983. -
  2984. -
  2985. -
  2986. -
  2987. -
  2988. -
  2989. -
  2990. -
  2991. -
  2992. -
  2993. -
  2994. -
  2995. -
  2996. -
  2997. -
  2998. -
  2999. -
  3000. -
  3001. -
  3002. 1                            Table of Contents
  3003. -
  3004.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1
  3005. 0Documents Available  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1  |
  3006.                                                                                    |
  3007.  Using This Manual  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   3  |
  3008. 0EDSUTIL Main Program . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5
  3009. 0    Program Description  . . . . . . . . . . . . . . . . . . . . . . . . . .   5
  3010.      Job Control Language (JCL) . . . . . . . . . . . . . . . . . . . . . . .   5
  3011. 0    Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   6
  3012. 0         COPY Command  . . . . . . . . . . . . . . . . . . . . . . . . . . .   7
  3013.           LIST Command  . . . . . . . . . . . . . . . . . . . . . . . . . . .  11
  3014.           CALL Command  . . . . . . . . . . . . . . . . . . . . . . . . . . .  13
  3015. 0    Parm Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  14
  3016.      EDSUTIL Procedure  . . . . . . . . . . . . . . . . . . . . . . . . . . .  15
  3017.      Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  17
  3018.      Abbreviations  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  19
  3019. 0Edit Format Data Set (ED) Routines . . . . . . . . . . . . . . . . . . . . .  20
  3020. 0    General Information  . . . . . . . . . . . . . . . . . . . . . . . . . .  20
  3021. 0         Summary of ED Subroutines . . . . . . . . . . . . . . . . . . . . .  20
  3022.           Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  21
  3023.           Line Numbers  . . . . . . . . . . . . . . . . . . . . . . . . . . .  23
  3024.           ABEND Conditions  . . . . . . . . . . . . . . . . . . . . . . . . .  24
  3025. 0    EDINIT(P)  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  25
  3026.      EDOPEN(P)  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  26
  3027.      EDGET(P) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  28
  3028.      EDPUT(P) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  31
  3029.      EDMSG(P) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  33
  3030.      EDCLOS(P)  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  34
  3031.      EDTERM(P)  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  35
  3032.      Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  36
  3033. 0    Special Considerations for Data Set Handling . . . . . . . . . . . . . .  41
  3034. 0         Processing Multiple Data Sets . . . . . . . . . . . . . . . . . . .  41
  3035.           Adding Onto an Existing Edit Format Data Set  . . . . . . . . . . .  41
  3036. 0    EDNCOL(P)  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  42
  3037.      EDNGEN(P)  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  44
  3038.      EDSET(P) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  46
  3039.      EDSHOW(P)  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  49
  3040.      EDGETL(P)  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  52
  3041.      EDNCNV(P)  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  54
  3042.      Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  56
  3043.      Reference Summary  . . . . . . . . . . . . . . . . . . . . . . . . . . .  63
  3044.      Common Abend Codes . . . . . . . . . . . . . . . . . . . . . . . . . . .  64
  3045. 0Index  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  67
  3046.