Sort/Merge Programming Guide - Public Support Login - Unisys
Sort/Merge Programming Guide - Public Support Login - Unisys
Sort/Merge Programming Guide - Public Support Login - Unisys
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
OS 2200<br />
<strong>Sort</strong>/<strong>Merge</strong><br />
<strong>Programming</strong> <strong>Guide</strong><br />
ClearPath OS 2200 Release 12.1<br />
June 2010 7831 0687–010<br />
unisys<br />
imagine it. done.
NO WARRANTIES OF ANY NATURE ARE EXTENDED BY THIS DOCUMENT. Any product or related information<br />
described herein is only furnished pursuant and subject to the terms and conditions of a duly executed agreement to<br />
purchase or lease equipment or to license software. The only warranties made by <strong>Unisys</strong>, if any, with respect to the<br />
products described in this document are set forth in such agreement. <strong>Unisys</strong> cannot accept any financial or other<br />
responsibility that may be the result of your use of the information in this document or software material, including<br />
direct, special, or consequential damages.<br />
You should be very careful to ensure that the use of this information and/or software material complies with the laws,<br />
rules, and regulations of the jurisdictions with respect to which it is used.<br />
The information contained herein is subject to change without notice. Revisions may be issued to advise of such<br />
changes and/or additions.<br />
Notice to U.S. Government End Users: This is commercial computer software or hardware documentation developed at<br />
private expense. Use, reproduction, or disclosure by the Government is subject to the terms of <strong>Unisys</strong> standard<br />
commercial license for the products, and where applicable, the restricted/limited rights provisions of the contract data<br />
rights clauses.<br />
<strong>Unisys</strong> and ClearPath are registered trademarks of <strong>Unisys</strong> Corporation in the United States and other countries.<br />
All other brands and products referenced in this document are acknowledged to be the trademarks or registered<br />
trademarks of their respective holders.
Contents<br />
Section 1. Getting Started<br />
1.1. Scope ....................................................................................... 1–1<br />
1.2. Notation Conventions .............................................................. 1–2<br />
1.3. <strong>Sort</strong>/<strong>Merge</strong> Processor .............................................................. 1–3<br />
1.3.1. SORT Processor Operation ............................................. 1–3<br />
1.3.2. Modes of Processor Operation ....................................... 1–4<br />
1.4. <strong>Sort</strong>/<strong>Merge</strong> Subroutines ........................................................... 1–4<br />
1.4.1. Modes of Subroutine Operation ...................................... 1–5<br />
1.4.2. Accessing the SORT Subroutines ................................... 1–5<br />
1.5. Release History ........................................................................ 1–6<br />
1.6. New Features and Enhancements .......................................... 1–7<br />
1.6.1. SORT Level 22R2A Enhancements ................................ 1–7<br />
1.6.2. SORT Level 22R2 Enhancements ................................... 1–7<br />
1.6.3. SORT Level 22R1 Enhancements ................................... 1–8<br />
1.6.4. SORT Level 21R1E Enhancements................................. 1–8<br />
1.6.5. SORT Level 21R1D Enhancements ................................ 1–9<br />
1.6.6. SORT Level 21R1C Enhancements ................................ 1–9<br />
1.6.7. SORT Level 21R1 Enhancements ................................. 1–10<br />
1.6.8. SORT Level 20R2 Enhancements ................................. 1–10<br />
1.6.9. SORT Level 20R1C Enhancements .............................. 1–11<br />
1.6.10. SORT Level 20R1B Enhancements .............................. 1–11<br />
1.6.11. SORT Level 20R1 Enhancements ................................. 1–12<br />
1.6.12. SORT Level 19R1 Enhancements ................................. 1–12<br />
1.6.13. SORT Level 18R3 Enhancements ................................. 1–13<br />
1.6.14. SORT Level 17R4 Enhancements ................................. 1–13<br />
1.6.15. SORT Level 18R2 Enhancements ................................. 1–14<br />
1.6.16. SORT Level 18R1 Enhancements ................................. 1–14<br />
1.6.17. SORT Level 17R2 Enhancements ................................. 1–14<br />
1.6.18. SORT Level 17R1 Enhancements ................................. 1–14<br />
1.7. Compatibility .......................................................................... 1–15<br />
1.7.1. SORT Level 22R2B Compatibility.................................. 1–15<br />
1.7.2. SORT Level 22R2A Compatibility.................................. 1–15<br />
1.7.3. SORT Level 22R2 Compatibility .................................... 1–16<br />
1.7.4. SORT Level 22R1 Compatibility .................................... 1–17<br />
1.7.5. SORT Level 21R1F Compatibility .................................. 1–17<br />
1.7.6. SORT Level 21R1E Compatibility .................................. 1–18<br />
1.7.7. SORT Level 21R1D Compatibility ................................. 1–18<br />
1.7.8. SORT Level 21R1C Compatibility.................................. 1–19<br />
1.7.9. SORT Level 21R1B Compatibility.................................. 1–20<br />
1.7.10. SORT Level 21R1A Compatibility.................................. 1–20<br />
1.7.11. SORT Level 21R1 Compatibility .................................... 1–20<br />
1.7.12. SORT Level 20R2A Compatibility.................................. 1–22<br />
1.7.13. SORT Level 20R2 Compatibility .................................... 1–22<br />
7831 0687–010 iii
Contents<br />
1.7.14. SORT Level 20R1D Compatibility .................................. 1–23<br />
1.7.15. SORT Level 20R1C Compatibility .................................. 1–23<br />
1.7.16. SORT Level 20R1B Compatibility .................................. 1–24<br />
1.7.17. SORT Level 20R1A Compatibility .................................. 1–25<br />
1.7.18. SORT Level 20R1 Compatibility ..................................... 1–25<br />
1.7.19. SORT Level 19R1 Compatibility ..................................... 1–26<br />
1.7.20. SORT Level 18R3 Compatibility ..................................... 1–27<br />
1.7.21. SORT Level 17R4 Compatibility ..................................... 1–27<br />
1.7.22. SORT Level 18R2 Compatibility ..................................... 1–27<br />
1.7.23. SORT Level 18R1A Compatibility .................................. 1–27<br />
1.7.24. SORT Level 18R1 Compatibility ..................................... 1–27<br />
1.7.25. SORT Level 17R2A Compatibility .................................. 1–28<br />
1.7.26. SORT Level 17R2 Compatibility ..................................... 1–28<br />
Section 2. Basic Mode versus Extended Mode Selection<br />
2.1. OS 2200 Environments ............................................................ 2–1<br />
2.2. Using the SORT Processor in Extended Mode ........................ 2–2<br />
2.3. Using the SORT Subroutines in Extended Mode ..................... 2–6<br />
Section 3. The SORT Processor<br />
3.1. Activating the SORT Processor ................................................ 3–1<br />
3.2. Using Parameter Specifications ................................................ 3–2<br />
3.2.1. Types of Parameters ........................................................ 3–3<br />
3.2.2. SORT Processor Program Structure ................................ 3–6<br />
3.2.3. Syntax Rules for SORT Processor Parameter<br />
Specifications............................................................... 3–6<br />
3.2.4. Syntax Rules for Local Parameter Specifications ............ 3–8<br />
3.2.5. SORT Processor Runstream Example ............................. 3–9<br />
3.2.6. SORT Processor Parameter Groups .............................. 3–10<br />
3.3. SORT Processor Parameters .................................................. 3–11<br />
3.3.1. ACCEPT Parameter ........................................................ 3–11<br />
3.3.2. ALLOW Parameter ......................................................... 3–13<br />
3.3.3. BIAS Parameter ............................................................. 3–16<br />
3.3.4. BLOCK Parameter .......................................................... 3–16<br />
3.3.5. BMBLOCK Parameter .................................................... 3–17<br />
3.3.6. CHECK Parameter .......................................................... 3–18<br />
3.3.7. CHECKSUM Parameter ................................................. 3–18<br />
3.3.8. CKPT Parameter ............................................................. 3–19<br />
3.3.9. CODE-TYPE Parameter .................................................. 3–20<br />
3.3.10. CONSOLE Parameter .................................................... 3–21<br />
3.3.11. COPY Parameter ............................................................ 3–21<br />
3.3.12. CORE Parameter ............................................................ 3–21<br />
3.3.13. DATA Parameter ............................................................ 3–22<br />
3.3.14. DEFYEAR Parameter ..................................................... 3–23<br />
3.3.15. DELCON Parameter ....................................................... 3–23<br />
3.3.16. DELDUPS Parameter ..................................................... 3–23<br />
3.3.17. DELLOG Parameter ....................................................... 3–24<br />
3.3.18. DISKS Parameter ........................................................... 3–24<br />
3.3.19. DRUM Parameter .......................................................... 3–25<br />
iv 7831 0687–010
Contents<br />
3.3.20. EQUIP Parameter .......................................................... 3–27<br />
3.3.21. ESORT Parameter ......................................................... 3–27<br />
3.3.22. ESTIMATE Parameter ................................................... 3–28<br />
3.3.23. FAST Parameter ............................................................ 3–29<br />
3.3.24. FILEID Parameter .......................................................... 3–30<br />
3.3.25. FILEIN Parameter .......................................................... 3–30<br />
3.3.26. FILEOUT Parameter ...................................................... 3–32<br />
3.3.27. FILESIN Parameter ........................................................ 3–33<br />
3.3.28. ISKEY Parameter ........................................................... 3–33<br />
3.3.29. ISKEYW Parameter ....................................................... 3–34<br />
3.3.30. JOIN Parameter ............................................................. 3–35<br />
3.3.31. KEY Parameter .............................................................. 3–35<br />
3.3.32. KEYW Parameter........................................................... 3–38<br />
3.3.33. LABEL Parameter .......................................................... 3–41<br />
3.3.34. LIMDRM Parameter ...................................................... 3–41<br />
3.3.35. LIMFST Parameter ........................................................ 3–42<br />
3.3.36. LINKSZ Parameter ......................................................... 3–42<br />
3.3.37. LOCALE Parameter ....................................................... 3–43<br />
3.3.38. LOG Parameter ............................................................. 3–44<br />
3.3.39. MERGE Parameter ........................................................ 3–44<br />
3.3.40. MODE Parameter .......................................................... 3–44<br />
3.3.41. MOVE Parameter .......................................................... 3–47<br />
3.3.42. MSKEY Parameter......................................................... 3–48<br />
3.3.43. MSKEYW Parameter ..................................................... 3–49<br />
3.3.44. NUMREC Parameter ..................................................... 3–50<br />
3.3.45. OWN Parameter ............................................................ 3–50<br />
3.3.46. PREP Parameter ............................................................ 3–51<br />
3.3.47. PRESERVE Parameter ................................................... 3–51<br />
3.3.48. PROCESSING Parameter .............................................. 3–52<br />
3.3.49. RECORD Parameter ...................................................... 3–52<br />
3.3.50. REELS Parameter .......................................................... 3–53<br />
3.3.51. REJECT Parameter ........................................................ 3–53<br />
3.3.52. RETRIEVE Parameter .................................................... 3–55<br />
3.3.53. REVMSAMBLK Parameter ............................................ 3–56<br />
3.3.54. RSZ Parameter .............................................................. 3–57<br />
3.3.55. SELECT Parameter ........................................................ 3–59<br />
3.3.56. SEQ Parameter .............................................................. 3–60<br />
3.3.57. SEQA Parameter ........................................................... 3–60<br />
3.3.58. SEQC Parameter ........................................................... 3–61<br />
3.3.59. SEQX Parameter ........................................................... 3–61<br />
3.3.60. SKIPL Parameter ........................................................... 3–62<br />
3.3.61. SORT Parameter ........................................................... 3–63<br />
3.3.62. SPLIT Parameter ........................................................... 3–63<br />
3.3.63. STOP Parameter ............................................................ 3–64<br />
3.3.64. STOPAPP Parameter ..................................................... 3–67<br />
3.3.65. TAG Parameter .............................................................. 3–68<br />
3.3.66. TAGFILE Parameter....................................................... 3–69<br />
3.3.67. TAPES Parameter .......................................................... 3–70<br />
3.3.68. VOLUME Parameter...................................................... 3–71<br />
3.4. Operator Information ............................................................. 3–71<br />
3.4.1. Estimations .................................................................... 3–71<br />
7831 0687–010 v
Contents<br />
3.4.2. Scratch Facility Assignment ........................................... 3–72<br />
3.5. SORT Processor Use of the Run-Condition Word .................. 3–74<br />
Section 4. User Exit Coding Considerations<br />
4.1. Procedures for Using Your Own Routines ............................... 4–1<br />
4.2. Using Exit Numbers .................................................................. 4–1<br />
4.3. User Exit Number Explanation .................................................. 4–3<br />
4.3.1. User Exit 01 ..................................................................... 4–3<br />
4.3.2. User Exit 10 ..................................................................... 4–3<br />
4.3.3. User Exit 11 or 45 ............................................................ 4–4<br />
4.3.4. User Exit 12 or 46 ............................................................ 4–4<br />
4.3.5. User Exit 13 ..................................................................... 4–5<br />
4.3.6. User Exit 14 or 21 ............................................................ 4–5<br />
4.3.7. User Exit 15 or 47 ............................................................ 4–6<br />
4.3.8. User Exit 31 or 41 ............................................................ 4–6<br />
4.3.9. User Exit 32 or 42 ............................................................ 4–7<br />
4.3.10. User Exit 33 or 43 ............................................................ 4–7<br />
4.3.11. User Exit 34 or 44 ............................................................ 4–8<br />
4.4. SRTGEN .................................................................................... 4–8<br />
Section 5. The SORT Subroutine Parameter Tables for MASM<br />
Programs<br />
5.1. Introduction ............................................................................... 5–1<br />
5.2. R$FILE Assembly-Time Parameters ......................................... 5–2<br />
5.2.1. BIAS Parameter ............................................................... 5–6<br />
5.2.2. CHECK Parameter ............................................................ 5–6<br />
5.2.3. CHECKD Parameter ......................................................... 5–7<br />
5.2.4. CHECKF Parameter .......................................................... 5–8<br />
5.2.5. CHECKK Parameter ......................................................... 5–8<br />
5.2.6. CHECKT Parameter .......................................................... 5–9<br />
5.2.7. COMP Parameter ............................................................. 5–9<br />
5.2.8. CONSOLE Parameter .................................................... 5–10<br />
5.2.9. CONTA Parameter ......................................................... 5–10<br />
5.2.10. CONTB Parameter ......................................................... 5–11<br />
5.2.11. CONTC Parameter ......................................................... 5–12<br />
5.2.12. COPY Parameter ............................................................ 5–12<br />
5.2.13. CORE Parameter ............................................................ 5–13<br />
5.2.14. DEFYEAR Parameter ..................................................... 5–14<br />
5.2.15. DELCON Parameter ....................................................... 5–15<br />
5.2.16. DELLOG Parameter ....................................................... 5–15<br />
5.2.17. DROC Parameter ........................................................... 5–15<br />
5.2.18. ERROR Parameter ......................................................... 5–16<br />
5.2.19. FILES Parameter ............................................................ 5–18<br />
5.2.20. FINAL Parameter ........................................................... 5–19<br />
5.2.21. FPOC Parameter ............................................................ 5–19<br />
5.2.22. KEY Parameter ............................................................... 5–20<br />
5.2.23. KEYW Parameter ........................................................... 5–24<br />
5.2.24. LOCALE Parameter ........................................................ 5–27<br />
5.2.25. LOG Parameter .............................................................. 5–28<br />
vi 7831 0687–010
Contents<br />
5.2.26. LPOC Parameter ........................................................... 5–28<br />
5.2.27. NODISK Parameter ....................................................... 5–29<br />
5.2.28. NOMASS Parameter ..................................................... 5–29<br />
5.2.29. NOTAPE Parameter....................................................... 5–29<br />
5.2.30. OPTION Parameter ....................................................... 5–30<br />
5.2.31. PAD Parameter .............................................................. 5–31<br />
5.2.32. PARTA Parameter ......................................................... 5–31<br />
5.2.33. PARTB Parameter ......................................................... 5–33<br />
5.2.34. PARTC Parameter ......................................................... 5–34<br />
5.2.35. PRESERVE Parameter ................................................... 5–34<br />
5.2.36. RECAREA Parameter .................................................... 5–34<br />
5.2.37. REDOA Parameter ........................................................ 5–35<br />
5.2.38. REDOB Parameter ........................................................ 5–36<br />
5.2.39. RSZ Parameter .............................................................. 5–37<br />
5.2.40. RSZA Parameter ............................................................ 5–37<br />
5.2.41. RSZB Parameter ............................................................ 5–38<br />
5.2.42. RSZW Parameter........................................................... 5–38<br />
5.2.43. SEQ Parameter .............................................................. 5–39<br />
5.2.44. SEQA Parameter ........................................................... 5–40<br />
5.2.45. SEQB Parameter ........................................................... 5–41<br />
5.2.46. SEQC Parameter ........................................................... 5–42<br />
5.2.47. SEQD Parameter ........................................................... 5–43<br />
5.2.48. SEQE Parameter ........................................................... 5–43<br />
5.2.49. SEQF Parameter ............................................................ 5–44<br />
5.2.50. SEQK Parameter ........................................................... 5–45<br />
5.2.51. SMRG Parameter .......................................................... 5–46<br />
5.2.52. VOL Parameter .............................................................. 5–47<br />
5.2.53. VRSZ Parameter ............................................................ 5–47<br />
5.2.54. VRSZA Parameter.......................................................... 5–48<br />
5.2.55. VRSZB Parameter.......................................................... 5–48<br />
5.2.56. VRSZW Parameter ........................................................ 5–49<br />
5.3. Coding Parameter Table Entries as Constants ...................... 5–50<br />
5.4. Using Execution-Time Parameters ........................................ 5–51<br />
5.4.1. LIMDRM Parameter ...................................................... 5–52<br />
5.4.2. LIMFST Parameter ........................................................ 5–52<br />
5.4.3. PSORT Parameter ......................................................... 5–53<br />
5.4.4. R$NCDS Procedure ....................................................... 5–53<br />
5.5. Using Multiple Parameter Tables ........................................... 5–53<br />
Section 6. MASM Program Linkages<br />
6.1. MASM Procedure Definition Elements ................................... 6–2<br />
6.2. MASM <strong>Sort</strong> Program Linkages ................................................ 6–3<br />
6.2.1. MASM <strong>Sort</strong> Open Linkages ............................................ 6–4<br />
6.2.2. MASM <strong>Sort</strong> Release Linkages ........................................ 6–5<br />
6.2.2.1. MASM <strong>Sort</strong> Release Linkages (WORD<br />
Length Records) ................................................. 6–5<br />
6.2.2.2. MASM <strong>Sort</strong> Release Linkages (NON-<br />
WORD Length Records) .................................... 6–7<br />
6.2.3. MASM <strong>Sort</strong> <strong>Sort</strong> Linkages .............................................. 6–8<br />
6.2.4. MASM <strong>Sort</strong> Return Linkages .......................................... 6–9<br />
7831 0687–010 vii
Contents<br />
6.2.5. MASM <strong>Sort</strong> Quick End Linkages ................................... 6–10<br />
6.3. MASM Tape <strong>Sort</strong> Linkages ..................................................... 6–11<br />
6.3.1. IPURI$ ............................................................................ 6–11<br />
6.3.2. RENCY$ ......................................................................... 6–12<br />
6.3.3. RINFO$ .......................................................................... 6–13<br />
6.4. MASM <strong>Merge</strong> Program Linkages ........................................... 6–14<br />
6.4.1. MASM <strong>Merge</strong> Open Linkages ....................................... 6–14<br />
6.4.2. MASM <strong>Merge</strong> Release Linkages ................................... 6–16<br />
6.4.3. MASM <strong>Merge</strong> Request Linkages .................................. 6–17<br />
6.4.4. MASM <strong>Merge</strong> Close Linkages ....................................... 6–18<br />
6.5. Interface Aids to the SORT Subroutine MASM<br />
Linkages ............................................................................. 6–19<br />
6.6. User Routine Substitution Considerations ............................. 6–20<br />
6.6.1. User COMP Code .......................................................... 6–21<br />
6.6.2. User DROC Code ........................................................... 6–22<br />
Section 7. The SORT Subroutine Parameter Tables for UCS C<br />
Programs<br />
7.1. Introduction ............................................................................... 7–1<br />
7.2. Setting Up the UCS C Parameter Table ................................... 7–2<br />
7.3. UCS C Program Parameters ..................................................... 7–4<br />
7.3.1. COMP Parameter ............................................................. 7–5<br />
7.3.2. CONSOLE Parameter ...................................................... 7–6<br />
7.3.3. COPY Parameter .............................................................. 7–7<br />
7.3.4. CORE Parameter .............................................................. 7–7<br />
7.3.5. DROC Parameter ............................................................. 7–8<br />
7.3.6. END Parameter .............................................................. 7–10<br />
7.3.7. FILES Parameter ............................................................ 7–10<br />
7.3.8. INFO Parameter ............................................................. 7–11<br />
7.3.9. KEY Parameter ............................................................... 7–12<br />
7.3.10. LOCALE Parameter ........................................................ 7–14<br />
7.3.11. LOG Parameter .............................................................. 7–15<br />
7.3.12. OPTION Parameter ........................................................ 7–15<br />
7.3.13. PAD Parameter .............................................................. 7–16<br />
7.3.14. PRESERVE Parameter ................................................... 7–16<br />
7.3.15. RSZ Parameter ............................................................... 7–17<br />
7.3.16. SEQ Parameter .............................................................. 7–18<br />
7.3.17. START Parameter .......................................................... 7–19<br />
7.3.18. VOL Parameter .............................................................. 7–20<br />
7.3.19. VRSZ Parameter ............................................................. 7–20<br />
7.4. User Routine Substitution Considerations ............................. 7–21<br />
7.4.1. User Compare Code ...................................................... 7–22<br />
7.4.2. User Duplicate Record Code.......................................... 7–23<br />
Section 8. SORT Subroutine Linkages for UCS C Programs<br />
8.1. UCS C File Inclusion Element ................................................... 8–1<br />
8.2. UCS C Program Linkage Parameters........................................ 8–2<br />
8.2.1. Result Status Parameter .................................................. 8–2<br />
8.2.2. D-Bank Address Parameter.............................................. 8–4<br />
viii 7831 0687–010
Contents<br />
8.2.3. Parameter Table Parameter ............................................ 8–4<br />
8.2.4. Record Information Packet Parameter ............................ 8–4<br />
8.2.4.1. Record Information Packet Definition .................... 8–4<br />
8.2.4.2. Record Information Packet version Field ................ 8–6<br />
8.2.4.3. Record Information Packet buffer_gran<br />
Field .................................................................... 8–6<br />
8.2.4.4. Record Information Packet record_gran<br />
Field .................................................................... 8–6<br />
8.2.4.5. Record Information Packet type Field .................... 8–6<br />
8.2.4.6. Record Information Packet subtype Field .............. 8–7<br />
8.2.4.7. Record Information Packet record_length<br />
Field .................................................................... 8–8<br />
8.2.4.8. Record Information Packet buffer_length<br />
Field .................................................................... 8–8<br />
8.2.4.9. Record Information Packet<br />
number_of_records Field ................................... 8–8<br />
8.2.4.10. Record Information Packet pad_word Field ........... 8–9<br />
8.2.5. Record Address Parameter ............................................. 8–9<br />
8.3. Bulk Interface ........................................................................... 8–9<br />
8.3.1. Fixed Records Buffer Format ........................................ 8–10<br />
8.3.2. Variable1 Records Buffer Format .................................. 8–11<br />
8.3.3. Variable2 Records Buffer Format .................................. 8–12<br />
8.4. UCS C <strong>Sort</strong> Program Linkages ............................................... 8–14<br />
8.4.1. UCS C <strong>Sort</strong> Open Linkage ............................................. 8–14<br />
8.4.2. UCS C <strong>Sort</strong> Release Linkage ......................................... 8–15<br />
8.4.3. UCS C <strong>Sort</strong> <strong>Sort</strong> Linkage ............................................... 8–18<br />
8.4.4. UCS C <strong>Sort</strong> Return Linkage ........................................... 8–18<br />
8.4.5. UCS C <strong>Sort</strong> Close Linkage ............................................. 8–21<br />
8.5. UCS C <strong>Merge</strong> Program Linkages ........................................... 8–21<br />
8.5.1. UCS C <strong>Merge</strong> Open Linkage ......................................... 8–21<br />
8.5.2. UCS C <strong>Merge</strong> Release Linkage ..................................... 8–22<br />
8.5.3. UCS C <strong>Merge</strong> Request Linkage .................................... 8–23<br />
8.5.4. UCS C <strong>Merge</strong> Close Linkage ......................................... 8–25<br />
Section 9. Configuration Parameters<br />
9.1. AUTOMATIC Configuration Parameter .................................... 9–1<br />
9.2. CCSLOCNUM Configuration Parameter .................................. 9–2<br />
9.3. CCSLOCNUMCHK Configuration Parameter ........................... 9–2<br />
9.4. CONSOLE Configuration Parameter ........................................ 9–3<br />
9.5. DEFBMCORE Configuration Parameter .................................. 9–3<br />
9.6. DEFDK Configuration Parameter ............................................. 9–4<br />
9.7. DEFLOCALE Configuration Parameter .................................... 9–4<br />
9.8. DEFTP Configuration Parameter .............................................. 9–5<br />
9.9. DEFXA Configuration Parameter ............................................. 9–5<br />
9.10. DEFXB Configuration Parameter ............................................. 9–6<br />
9.11. LOG Configuration Parameter.................................................. 9–6<br />
9.12. MAXIMUM Configuration Parameter ...................................... 9–7<br />
9.13. MINIMUM Configuration Parameter ....................................... 9–7<br />
9.14. MSAMBLOCK Configuration Parameter .................................. 9–8<br />
9.15. NUMRECWARN Configuration Parameter .............................. 9–8<br />
7831 0687–010 ix
Contents<br />
9.16. PRCERRCONS Configuration Parameter ................................. 9–9<br />
9.17. PROCESSING Configuration Parameter ................................. 9–10<br />
9.18. PREPDEFAULT Configuration Parameter ............................... 9–11<br />
9.19. RBSIZE Configuration Parameter ........................................... 9–11<br />
Section 10. <strong>Sort</strong> Types and Variable-Length <strong>Sort</strong>ing<br />
Considerations<br />
10.1. The CORE Parameter ............................................................. 10–1<br />
10.2. <strong>Sort</strong> Types ............................................................................... 10–2<br />
10.2.1. Basic Mode or Extended Mode Main-Storage-<br />
Only <strong>Sort</strong>s .................................................................. 10–2<br />
10.2.2. Basic Mode and Extended Mode Disk <strong>Sort</strong>s ................. 10–3<br />
10.2.3. One-Level (M1) and Two-Level (M1–M2) Mass<br />
Storage <strong>Sort</strong>s ............................................................. 10–5<br />
10.2.4. Tape <strong>Sort</strong>s ...................................................................... 10–6<br />
10.3. Variable-Length Record Considerations ................................. 10–6<br />
Section 11. Key Field Translation<br />
11.1. Using MASM Compare Instructions ....................................... 11–1<br />
11.2. <strong>Sort</strong>/<strong>Merge</strong> Key Fields ............................................................ 11–2<br />
11.2.1. A - Fieldata Alphanumeric Format .................................. 11–2<br />
11.2.2. B - OS 2200 Signed Binary Format ................................ 11–3<br />
11.2.3. D - Fieldata Sign-Leading Separate-Decimal<br />
Format ....................................................................... 11–3<br />
11.2.4. DATE - ASCII Alphanumeric Date Leading 18-Bit<br />
Year Format ............................................................... 11–4<br />
11.2.5. G - Fieldata Sign-Trailing Separate-Decimal<br />
Format ....................................................................... 11–5<br />
11.2.6. I - International Character Set Format ............................ 11–5<br />
11.2.7. J - Packed Decimal Format ............................................ 11–6<br />
11.2.8. L - Fieldata Sign-Leading Overpunch Format ................. 11–7<br />
11.2.9. M - IBM Signed Binary Format ...................................... 11–7<br />
11.2.10. P - Fieldata Sign-Trailing Overpunch Format .................. 11–7<br />
11.2.11. Q - ASCII Sign-Trailing Overpunch Format ..................... 11–8<br />
11.2.12. R - ASCII Sign-Leading Separate-Decimal Format ......... 11–8<br />
11.2.13. S - ASCII Alphanumeric Format ..................................... 11–9<br />
11.2.14. T - ASCII Sign-Trailing Separate-Decimal Format ........... 11–9<br />
11.2.15. U - Unsigned Binary Format ......................................... 11–10<br />
11.2.16. V - ASCII Sign-Leading Overpunch Format .................. 11–10<br />
Section 12. Tape <strong>Sort</strong> Operations<br />
12.1. SORT Subroutines Tape <strong>Sort</strong> Operations ............................... 12–1<br />
12.1.1. Automatic Tape <strong>Sort</strong>s .................................................... 12–1<br />
12.1.2. Nonautomatic Tape <strong>Sort</strong>s .............................................. 12–2<br />
12.2. Tape <strong>Merge</strong> Power Calculations ............................................. 12–3<br />
12.3. Tape <strong>Sort</strong> Console Messages ................................................. 12–4<br />
12.3.1. Distribution Phase .......................................................... 12–4<br />
x 7831 0687–010
Contents<br />
12.3.2. Intermediate <strong>Merge</strong> Phase ........................................... 12–6<br />
12.3.3. Final <strong>Merge</strong> Phase....................................................... 12–10<br />
12.3.4. CONTA – CONTB – CONTC ........................................ 12–11<br />
12.3.5. REDOA – REDOB ........................................................ 12–11<br />
Appendix A. Summary and Diagnostic Messages<br />
A.1. SORT Processor Error Messages ............................................ A–1<br />
A.2. SORT Subroutine Error Messages ......................................... A–18<br />
A.3. SORT Subroutine Summary Messages ................................. A–34<br />
Appendix B. Examples of Processor Usage<br />
B.1. Printing the Contents of a File ................................................. B–1<br />
B.2. <strong>Sort</strong>ing a File and Producing the Resulting Output File ........... B–2<br />
B.3. Merging Files into One Output File ......................................... B–5<br />
B.4. Selecting a Certain Classification of Records .......................... B–5<br />
B.5. Determining or Assigning Scratch Facilities ............................ B–8<br />
B.6. Performing a TAG/RETRIEVE <strong>Sort</strong> ......................................... B–10<br />
B.7. Creating or Reading Indexed Files ......................................... B–11<br />
B.8. Dynamically Assigning the Output File .................................. B–12<br />
B.9. Specifying Overlapping Keys ................................................. B–12<br />
B.10. Performing an Extended Mode <strong>Sort</strong> ...................................... B–12<br />
Appendix C. Sample Programs Using Common Bank Interface<br />
Appendix D. Sample Programs with UCS C Program Linkages<br />
D.1. Sample <strong>Sort</strong> Program ............................................................... D–1<br />
D.2. Sample <strong>Merge</strong> Program ........................................................... D–5<br />
D.3. Sample UCS C Buffer Program ................................................ D–9<br />
Appendix E. Configuration of Internal Parameters<br />
E.1. Sample DEFAULT$ Configuration Session – Full-<br />
Screen Mode ....................................................................... E–1<br />
E.2. Sample DEFAULT$ Configuration Session – Line<br />
Mode ................................................................................... E–9<br />
Glossary ............................................................................................. 1<br />
Index ............................................................................................. 1<br />
7831 0687–010 xi
Contents<br />
xii 7831 0687–010
Figures<br />
1–1. SORT Processor Data Flow Example................................................................. 1–3<br />
1–2. SORT Subroutines Data Flow Example ............................................................. 1–5<br />
8–1. Record Information Packet Version 1 Structure ................................................ 8–4<br />
8–2. Record Information Packet Version 2 Structure ................................................ 8–5<br />
8–3. Fixed Records Buffer Format ........................................................................... 8–10<br />
8–4. Variable1 Records Buffer Format ..................................................................... 8–11<br />
8–5. Variable1 Records RCW Format ...................................................................... 8–11<br />
8–6. Variable2 Records Buffer Format ..................................................................... 8–13<br />
7831 0687–010 xiii
Figures<br />
xiv 7831 0687–010
Tables<br />
1–1. SORT Processor Operation Modes .................................................................... 1–4<br />
1–2. SORT Subroutines Operation Modes ................................................................ 1–5<br />
2–1. <strong>Sort</strong>/<strong>Merge</strong> Environment Operations ................................................................. 2–1<br />
2–2. SORT Processor Extended Mode Selection, AUTOMATIC Set to YES ............. 2–3<br />
2–3. SORT Processor Extended Mode Selection, AUTOMATIC Set to NO .............. 2–4<br />
2–4. SORT Processor Extended Mode Selection, Y Option Specified ...................... 2–5<br />
2–5. SORT Subroutines Extended Mode Selection ................................................... 2–6<br />
3–1. SORT Processor Global/Local Parameters ......................................................... 3–3<br />
3–2. Overlapping Types ........................................................................................... 3–38<br />
3–3. Determining Processor Record Size ................................................................ 3–58<br />
4–1. SORT Processor User Exit Numbers ................................................................. 4–2<br />
5–1. MASM Parameter Table Generation Methods .................................................. 5–1<br />
5–2. R$FILE Assembly-Time Parameters .................................................................. 5–2<br />
5–3. Key Types ......................................................................................................... 5–24<br />
5–4. Execution-Time Parameters ............................................................................. 5–52<br />
6–1. MASM Statements for <strong>Sort</strong> Open Linkage Types ............................................. 6–4<br />
6–2. MASM Statements for <strong>Sort</strong> Release Linkage Types ......................................... 6–6<br />
6–3. MASM Statements for MASM <strong>Sort</strong> Release Linkage Types (OPTION<br />
Bits 30 or 31 Are Set) .................................................................................... 6–7<br />
6–4. MASM Statements for <strong>Sort</strong> <strong>Sort</strong> Linkage Types ............................................... 6–8<br />
6–5. MASM Statements for <strong>Sort</strong> Return Linkage Types ........................................... 6–9<br />
6–6. MASM Statements for <strong>Sort</strong> Quick End Linkages ............................................ 6–10<br />
6–7. MASM Statements for the IPURI$ Tape <strong>Sort</strong> Linkage .................................... 6–11<br />
6–8. MASM Statements for the RENCY$ Tape <strong>Sort</strong> Linkages ................................ 6–12<br />
6–9. MASM Statements for the RINFO$ Tape <strong>Sort</strong> Linkages ................................. 6–13<br />
6–10. MASM Statements for <strong>Merge</strong> Open Linkages ................................................ 6–15<br />
6–11. MASM Statements for <strong>Merge</strong> Release Linkages ............................................ 6–16<br />
6–12. MASM Statements for <strong>Merge</strong> Request Linkages ........................................... 6–17<br />
7–1. UCS C Program Parameters .............................................................................. 7–4<br />
7–2. Collating Sequence Table Types ...................................................................... 7–19<br />
8–1. Severity Code Values ......................................................................................... 8–2<br />
8–2. Record Information Packet Type Field Values ................................................... 8–6<br />
8–3. Record Information Packet Subtype Field Values When Type Field<br />
Equals 1 ......................................................................................................... 8–7<br />
8–4. Variable1 Records Buffer Fields ....................................................................... 8–12<br />
7831 0687–010 xv
Tables<br />
8–5. <strong>Sort</strong> Release Record Information Packet Input ................................................ 8–15<br />
8–6. <strong>Sort</strong> Release Record Information Packet Exit Condition .................................. 8–17<br />
8–7. <strong>Sort</strong> Return Record Information Packet Input .................................................. 8–19<br />
8–8. <strong>Sort</strong> Return Record Information Packet Exit Conditions .................................. 8–20<br />
10–1. M1 Main Storage Assignment and Reservation <strong>Guide</strong>lines ............................. 10–5<br />
10–2. M1–M2 Main Storage Assignment and Reservation <strong>Guide</strong>lines...................... 10–5<br />
11–1. <strong>Sort</strong>/<strong>Merge</strong> Key Field Translation ..................................................................... 11–2<br />
11–2. Example of Steps in Key Field Translation ........................................................ 11–4<br />
11–3. Example of Steps in Restoring Translated Key Fields ...................................... 11–5<br />
xvi 7831 0687–010
Section 1<br />
Getting Started<br />
<strong>Sort</strong>/<strong>Merge</strong> is a software package that performs sorting and merging operations.<br />
<strong>Sort</strong>/<strong>Merge</strong> provides you with the ability to do the following:<br />
1.1. Scope<br />
• Read input files from different media<br />
• Perform record manipulation operations<br />
• Create specially formatted output files<br />
The <strong>Sort</strong>/<strong>Merge</strong> software package consists of the following:<br />
• The SORT processor (see 1.3, 2.1, 2.2, and Sections 3 and 4)<br />
• The SORT subroutines basic mode MASM linkages (see 1.4, 2.1, 2.3, and Sections 5<br />
and 6)<br />
• The SORT subroutines Universal Compiling System (UCS) C linkages (see 1.4, 2.1,<br />
2.3 and Sections 7 and 8)<br />
<strong>Sort</strong>/<strong>Merge</strong> operates on <strong>Unisys</strong> ClearPath HMP IX Series and 2200 Series systems.<br />
This guide provides an overview of the <strong>Sort</strong>/<strong>Merge</strong> software package and describes the<br />
SORT processor and SORT subroutines in detail. It specifies sort parameters and<br />
explains how to define and generate parameter tables to control <strong>Sort</strong>/<strong>Merge</strong> operations.<br />
Programmers can use procedures in this guide to create MASM and UC programs that<br />
interface with the SORT subroutines.<br />
This programming guide tells programmers how to:<br />
• Perform SORT, MERGE, COPY, or ESTIMATE operations using the SORT processor.<br />
• Tailor the <strong>Sort</strong>/<strong>Merge</strong> operations using the SORT subroutines.<br />
• Transfer control from your programs to the SORT subroutines.<br />
Documentation Updates<br />
This document contains all the information that was available at the time of publication.<br />
Changes identified after release of this document are included in problem list entry (PLE)<br />
18721031. To obtain a copy of the PLE, contact your <strong>Unisys</strong> representative or access<br />
the current PLE from the <strong>Unisys</strong> Product <strong>Support</strong> Web site:<br />
http://www.support.unisys.com/all/ple/18721031<br />
Note: If you are not logged into the Product <strong>Support</strong> site, you will be asked to do so.<br />
7831 0687–010 1–1
Getting Started<br />
1.2. Notation Conventions<br />
The following syntax notation conventions are used in this guide:<br />
• Procedure and processor calls appear as uppercase words and should be entered<br />
exactly as shown. For example:<br />
@SORT,A<br />
ROPN$X<br />
• <strong>Sort</strong>/<strong>Merge</strong> commands consist of parameters and variables.<br />
− A parameter is a word that you enter exactly as shown. Parameter names for<br />
the SORT processor and MASM appear as uppercase words; UCS C parameter<br />
types are lowercase. For example:<br />
SORT processor: ESTIMATE=N<br />
MASM: ′DELLOG′<br />
UC: sm_log_parameter_type<br />
− A variable is a word that represents data you supply (for example, a word, letter,<br />
or number). Variables appear as lowercase, italicized words. For example:<br />
tagÄfileÄname<br />
• In examples that illustrate a user/system dialogue, user-supplied input is in bold text.<br />
For example:<br />
COMMAND ? íCONFIGURE<br />
• Default values in command formats are in bold text. For example:<br />
BIAS=AVG<br />
• Brackets enclose optional words, phrases, or alternatives. For example:<br />
@SORT[,options]<br />
• Macro names and defined constants use underscores. For example:<br />
sm_keyw_parameter<br />
• Changes made since the last version of the manual are shown with yellow<br />
highlighting in the online version (and may appear as shading in the printed version).<br />
1–2 7831 0687–010
1.3. <strong>Sort</strong>/<strong>Merge</strong> Processor<br />
Getting Started<br />
The <strong>Sort</strong>/<strong>Merge</strong> processor, referred to as the SORT processor, is an independent<br />
processor that performs copying, sorting, and merging operations. The SORT processor<br />
is recommended in either of the following situations:<br />
• Performing specific sort or merge operations.<br />
• Interface with the <strong>Sort</strong>/<strong>Merge</strong> software package in conjunction with other<br />
independent programs.<br />
You access the SORT processor using Executive Control Language (ECL) to do the<br />
following:<br />
• Read input files from cards, mass storage, and tape<br />
• Perform copy, estimate, merge, retrieve, or sort operations<br />
• Create output files<br />
1.3.1. SORT Processor Operation<br />
You activate the SORT processor with an ECL processor call. ECL call options and<br />
parameters provide the information necessary to perform the operation you request.<br />
Such information includes the following:<br />
• Processor mode (see 1.3.2)<br />
• Type of input data<br />
• File formats<br />
When you activate a SORT processor operation, the SORT subroutines actually perform<br />
the sort and merge operations. See 1.4, 2.3, and Sections 5 and 6 for information about<br />
the SORT subroutines.<br />
Figure 1–1 represents the data flow of the SORT processor for a sort operation.<br />
Figure 1–1. SORT Processor Data Flow Example<br />
7831 0687–010 1–3
Getting Started<br />
1.3.2. Modes of Processor Operation<br />
The SORT processor performs six operations. These operations are divided into three<br />
modes: sort, merge, and copy. These modes and their respective operations are shown<br />
in Table 1–1.<br />
Table 1–1. SORT Processor Operation Modes<br />
Processor Mode Operation Parameter Description<br />
<strong>Sort</strong> SORT Passes complete input data records through<br />
the sort process.<br />
TAG/SELECT Tells the SORT processor how to reformat<br />
data records before passing them through<br />
the sort process.<br />
TAG/RETRIEVE Tells the SORT processor to perform a<br />
retrieve operation.<br />
ESTIMATE Tells the SORT processor to perform a time<br />
estimate for a SORT or TAG operation.<br />
<strong>Merge</strong> MERGE <strong>Merge</strong>s up to 24 input files into a single<br />
output file using sort keys or an entry point<br />
name of a user routine.<br />
Copy COPY Copies up to 24 input files into a single new<br />
output file without sorting.<br />
You request a SORT processor mode by specifying parameters after the processor call.<br />
Section 3 explains how to specify parameters and provides the parameter formats.<br />
You can direct the SORT processor to perform a SORT or TAG operation either in a basic<br />
mode environment as a basic mode sort, or in an extended mode environment as an<br />
extended mode sort (see Section 2). An extended mode sort takes advantage of the<br />
large memory available with the extended mode environment.<br />
See Sections 3 and 4 for detailed information about the SORT processor.<br />
1.4. <strong>Sort</strong>/<strong>Merge</strong> Subroutines<br />
The <strong>Sort</strong>/<strong>Merge</strong> subroutines, referred to as the SORT subroutines, are used by the SORT<br />
processor to perform the actual sort and merge operations you request.<br />
When you need to tailor a specific <strong>Sort</strong>/<strong>Merge</strong> operation to fit an application exactly, you<br />
can access the SORT subroutines directly through your own MASM programs using<br />
Basic Mode MASM program linkages (see Sections 5 and 6) or through your UCS C<br />
program using the UCS C program linkages (see Sections 7 and 8). You can also<br />
substitute some of your subroutines for the SORT subroutines provided with the<br />
<strong>Sort</strong>/<strong>Merge</strong> package. As a result, the <strong>Sort</strong>/<strong>Merge</strong> package offers flexibility to perform<br />
<strong>Sort</strong>/<strong>Merge</strong> functions at your site.<br />
1–4 7831 0687–010
1.4.1. Modes of Subroutine Operation<br />
Getting Started<br />
Like the SORT processor, the SORT subroutines perform different modes of operations,<br />
as shown in Table 1–2.<br />
Subroutine<br />
Mode<br />
Table 1–2. SORT Subroutines Operation Modes<br />
Description<br />
<strong>Sort</strong> You pass unsorted data records as input to the SORT subroutines. The sort<br />
operation is performed and the records are returned in sorted order.<br />
You can direct the SORT subroutines to perform the operation in a basic mode<br />
environment as a basic mode sort, or in an extended mode environment as an<br />
extended mode sort. An extended mode sort takes advantage of the large<br />
memory available with the extended mode environment.<br />
<strong>Merge</strong> You can use presorted data from up to 24 files as input to the SORT<br />
subroutines. The subroutines merge the data from these files using the key<br />
fields you specify. The merged records are then returned to the user program.<br />
1.4.2. Accessing the SORT Subroutines<br />
You access the SORT subroutines from MASM programs by using procedure calls or<br />
MASM statements with the following types of linkages:<br />
• Standard<br />
• Extended<br />
• Common bank<br />
Section 6 describes these linkages. See Sections 5 and 6 for detailed information about<br />
the SORT subroutines MASM linkages.<br />
You access the SORT subroutines from UCS C programs by using function calls to the<br />
UCS C SORT subroutines linkages. See Sections 7 and 8 for detailed information about<br />
the SORT subroutines UCS C linkages.<br />
Figure 1–2 represents the data flow of the SORT subroutines.<br />
Figure 1–2. SORT Subroutines Data Flow Example<br />
7831 0687–010 1–5
Getting Started<br />
1.5. Release History<br />
This subsection states the release history for <strong>Sort</strong>/<strong>Merge</strong> since level 17R1. It provides<br />
the release level, release date, and the immediate prior release levels to this release.<br />
This information should be used in conjunction with the compatibility and the new<br />
feature and enhancement sections.<br />
Release Level Release Date Prior Releases<br />
22R2B 22R2A<br />
22R2A June 16, 2009 22R2<br />
22R2 September 29, 2008 22R1<br />
22R1 November 10, 2006 21R1F<br />
21R1F October 10, 2005 21R1E<br />
21R1E April 7, 2005 21R1D<br />
21R1D March 19, 2004 21R1C<br />
21R1C August 8, 2003 21R1B<br />
21R1B January 17, 2003 21R1A<br />
21R1A June 6, 2002 21R1<br />
21R1 January 2, 2002 20R2A<br />
20R2A April 12, 2001 20R2<br />
20R2 November 15, 2000 20R1D<br />
20R1D June 23, 2000 20R1C<br />
20R1C October 2, 1999 20R1B<br />
20R1B April 9, 1999 20R1A<br />
20R1A February 23, 1999 20R1<br />
20R1 August 17, 1998 18R3, 19R1<br />
19R1 October 17, 1997 17R4, 18R3<br />
18R3 June 30, 1997 17R2A, 18R2<br />
17R4 June 30, 1997 17R2A<br />
18R2 August 29, 1996 18R1A<br />
18R1A March 29, 1996 18R1<br />
18R1 December 9, 1995 17R2A<br />
17R2A August 24, 1995 17R2<br />
17R2 October 28, 1994 17R1<br />
17R1 March 26, 1994 16R1B<br />
1–6 7831 0687–010
1.6. New Features and Enhancements<br />
Getting Started<br />
This subsection describes the new features and enhancements to <strong>Sort</strong>/<strong>Merge</strong> based on<br />
release level. An identifier is also attached to each item to have a reference ID for each<br />
item and to identify the same functionality when the item is introduced in more than one<br />
symbolic level.<br />
1.6.1. SORT Level 22R2A Enhancements<br />
The following enhancements have been made to <strong>Sort</strong>/<strong>Merge</strong> level 22R2A since level<br />
22R2.<br />
Enhancement<br />
ID Feature Name Description<br />
E1650 Log Message<br />
Run-id<br />
1.6.2. SORT Level 22R2 Enhancements<br />
The initial SORT subroutines LOG message is modified<br />
to include the original and the generated run-id. This<br />
permits log analysis programs that examine sort log<br />
messages to identify the run or transaction associated<br />
with the sort information. For transactions, the original<br />
run-id is the transaction name.<br />
The following enhancements have been made to <strong>Sort</strong>/<strong>Merge</strong> level 22R2 since level<br />
22R1.<br />
Enhancement<br />
ID<br />
Feature Name<br />
E1643 LTO3-HP,<br />
LTO4-HP, T10000,<br />
and T9840D tape<br />
adapts<br />
Description<br />
<strong>Sort</strong>/<strong>Merge</strong> adapts to the LTO3-HP, LTO4-HP, T10000,<br />
and T9840D tape devices. The adapts for these devices<br />
allow input files, output files, and scratch files for a tape<br />
sort to reside on these devices. Please note restriction<br />
C1643 concerning the use of these tapes as input devices<br />
in the SORT Level 22R2 Compatibility section of this<br />
guide.<br />
7831 0687–010 1–7
Getting Started<br />
1.6.3. SORT Level 22R1 Enhancements<br />
The following enhancements have been made to <strong>Sort</strong>/<strong>Merge</strong> level 22R1 since level<br />
21R1E.<br />
Enhancement<br />
ID<br />
Feature Name<br />
E1599 Processor errors<br />
to console<br />
1.6.4. SORT Level 21R1E Enhancements<br />
Description<br />
The SORT processor has been enhanced to optionally<br />
send error messages to the system console. SORT<br />
console configuration parameter PRCERRCONS is<br />
provided to configure SORT to display SORT processor<br />
errors to the system console. PRCERRCONS can be set<br />
to ON or OFF. (OFF is the default.) Additional information<br />
about this enhancement can be found in 9.16, E.1, and<br />
E.2.<br />
When PRCERRCONS is ON, errors detected before the<br />
first parameter is requested and after the @EOF<br />
terminating the parameter input are sent to the system<br />
console. Errors detected after the first parameter is<br />
entered and before the @EOF terminating the parameter<br />
input are not sent to the system console.<br />
Regardless of the PRCERRCONS setting, all processor<br />
error messages are displayed in the run's print listing.<br />
The following enhancements have been made to <strong>Sort</strong>/<strong>Merge</strong> level 21R1E since level<br />
21R1D.<br />
Enhancement<br />
ID<br />
Feature Name<br />
E1586 RDMS UCS-2<br />
Adapt<br />
Description<br />
In conjunction with RDMS 14R1 introducing character<br />
columns with a UCS-2 CCS, the RDMS SORT interface<br />
has changed. SORT now recognizes these UCS-2<br />
character columns and properly sorts these RDMS fields.<br />
Please note SORT Level 21R1E Compatibility C1586 (see<br />
1.7.6) associated with this enhancement.<br />
1–8 7831 0687–010
1.6.5. SORT Level 21R1D Enhancements<br />
Getting Started<br />
The following enhancements have been made to <strong>Sort</strong>/<strong>Merge</strong> level 21R1D since level<br />
21R1C.<br />
Enhancement<br />
ID<br />
Feature Name<br />
E1582 CTC9840 Tape<br />
Adapt<br />
1.6.6. SORT Level 21R1C Enhancements<br />
Description<br />
<strong>Sort</strong>/<strong>Merge</strong> adapts to the CTC9840 tape subsystem<br />
(U9840C). This adapt allows input files, output files, and<br />
scratch files for a tape sort to reside on a CTC9840 tape<br />
device (U9840C). Please note restriction C1582<br />
concerning the use of these tapes as input devices in the<br />
SORT Level 21R1D section of this guide.<br />
The following enhancements have been made to <strong>Sort</strong>/<strong>Merge</strong> level 21R1C since level<br />
21R1.<br />
Enhancement<br />
ID<br />
Feature Name<br />
E1567 CTS9940B Tape<br />
Adapt<br />
E1573 BM to EM<br />
Intercept Routines<br />
Description<br />
<strong>Sort</strong>/<strong>Merge</strong> adapts to the CTS9940B tape subsystem.<br />
This adapt allows input files, output files, and scratch files<br />
for a tape sort to reside on a CTS9940B tape device.<br />
Please note restriction C1567 concerning the use of these<br />
tapes as input devices in the SORT Level 21R1C section<br />
of this guide.<br />
<strong>Sort</strong>/<strong>Merge</strong> introduces two new intercept routines to aid<br />
in the quick conversion of a Basic MASM routine to an<br />
extended mode common-bank SORT. Additional<br />
information and restrictions about this enhancement can<br />
be found in 6.5.<br />
7831 0687–010 1–9
Getting Started<br />
1.6.7. SORT Level 21R1 Enhancements<br />
The following enhancements have been made to <strong>Sort</strong>/<strong>Merge</strong> level 21R1 since level<br />
20R2A.<br />
Enhancement<br />
ID<br />
Feature Name<br />
E1468 Nonword<br />
processing<br />
1.6.8. SORT Level 20R2 Enhancements<br />
Description<br />
The SORT processor has been enhanced to create and<br />
process (without change) nonword length records. This<br />
feature primarily affects MODE=SDF or MODE=DSDF<br />
files; however, MODE=ANSI and MODE=MSAM files are<br />
also affected. A new SORT processor parameter,<br />
PROCESSING, has been created along with the<br />
PROCESSING configuration parameter. The LINKSZ<br />
parameter and the RSZ parameter have been enhanced to<br />
permit bit-length record sizes to be specified. Additional<br />
information about the processor portion of this<br />
enhancement can be found in 3.3.36, 3.3.48, 3.3.54, and<br />
9.17.<br />
The SORT subroutines have also been enhanced to handle<br />
nonword length records. The record size and variable<br />
record size parameter interfaces and the record size fields<br />
in the various subroutine linkages and packets have been<br />
enhanced to permit nonword length record lengths to be<br />
specified. Additional information about the subroutine<br />
portion of this enhancement can be found in 5.2.30,<br />
5.2.39-5.2.42, 5.2.53-5.2.56, 6.2.2, 6.2.4, 7.3.15, 7.3.19,<br />
8.2.4, 8.3-8.3.3, 8.4.2, 8.4.4, 8.5.2, and 8.5.3.<br />
The following enhancements have been made to <strong>Sort</strong>/<strong>Merge</strong> level 20R2 since level<br />
20R1C.<br />
Enhancement<br />
ID<br />
Feature Name<br />
Description<br />
E1437 NUMRECWARN A new configuration parameter that causes the SORT<br />
processor to issue a warning message if a NUMREC<br />
parameter is specified and the input file contains<br />
additional records. Additional information about this<br />
enhancement can be found in 3.3.44 and 9.15.<br />
1–10 7831 0687–010
1.6.9. SORT Level 20R1C Enhancements<br />
Getting Started<br />
The following enhancements have been made to <strong>Sort</strong>/<strong>Merge</strong> level 20R1C since level<br />
20R1B.<br />
Enhancement<br />
ID<br />
Feature Name<br />
Description<br />
E1411 EE Tape Adapt The SORT processor now recognizes CTS5236 tape<br />
devices as capable of processing EE tapes for input files.<br />
The EE tapes can also be used as output files and scratch<br />
files for a tape sort.<br />
E1416 CTS9840 Tape<br />
Adapt<br />
1.6.10. SORT Level 20R1B Enhancements<br />
<strong>Sort</strong>/<strong>Merge</strong> adapts to the CTS9840 tape subsystem. This<br />
adapt allows input files, output files, and scratch files for a<br />
tape sort to reside on a CTS9840 tape device. Please<br />
note restriction C1416 concerning the use of these tapes<br />
as input devices in the 20R1C Compatibility section of this<br />
guide (see 1.7.15).<br />
The following enhancements have been made to <strong>Sort</strong>/<strong>Merge</strong> level 20R1B since level<br />
20R1.<br />
Enhancement<br />
ID<br />
Feature Name<br />
E1380 DLT7000 Tape<br />
Adapt<br />
Description<br />
<strong>Sort</strong>/<strong>Merge</strong> adapts to the DLT7000 tape subsystem. This<br />
adapt allows input files, output files, and as scratch files<br />
for a tape sort to reside on a DLT7000 tape system tape<br />
device. Please note the restrictions in the 20R1B<br />
Compatibility section of this guide (see 1.7.16).<br />
7831 0687–010 1–11
Getting Started<br />
1.6.11. SORT Level 20R1 Enhancements<br />
The following enhancements have been made to <strong>Sort</strong>/<strong>Merge</strong> level 20R1 since level<br />
19R1.<br />
Enhancement<br />
ID<br />
Feature Name<br />
E1324 Virtual Tape<br />
Adapt<br />
Description<br />
<strong>Sort</strong>/<strong>Merge</strong> adapts to the separately priced virtual tape<br />
feature of the Exec. This adapt allows virtual tape files<br />
to be used as input files, output files, and scratch files<br />
for a tape sort.<br />
E1284 Bulk Interface Enhancement to the SORT subroutines UCS C SORT<br />
linkages to allow passing a block or buffer of records<br />
between the UCS C program and the SORT subroutines.<br />
Additional information about this feature can be found<br />
throughout Sections 7 and 8 and in an example in D.3.<br />
E1280 DEFBMCORE A new configuration parameter that limits the amount of<br />
CORE for a basic mode sort for the SORT processor<br />
when a CORE parameter is not specified (see 9.5).<br />
1.6.12. SORT Level 19R1 Enhancements<br />
The following enhancements have been made to <strong>Sort</strong>/<strong>Merge</strong> level 19R1 since level<br />
18R3.<br />
Enhancement<br />
ID<br />
Feature Name<br />
Description<br />
E1153 STOP Parameter New processor parameters that cause the SORT<br />
processor to end examination of input data. See 3.3.63<br />
and 3.3.64 for additional information.<br />
E1149 Delete Duplicate<br />
Records<br />
E1140 Extended Mode<br />
Entry Points<br />
Allows the SORT processor and SORT subroutines to<br />
eliminate duplicate key records without the specification<br />
of user-written data reduction own code (DROC) routine.<br />
See 3.3.16 and 5.2.30 for additional information. This<br />
feature also allows a DROC routine to be specified for a<br />
variable length record sort operation.<br />
The SORT subroutines have been enhanced to include<br />
entry points (linkages) for UCS C programs to call the<br />
extended mode <strong>Sort</strong>/<strong>Merge</strong> subroutines. See Sections 7,<br />
8, and D.1 and D.2 for additional information.<br />
E1105 I18N Delivery 2 The SORT processor and SORT subroutines have been<br />
enhanced to allow the specification of keys that are<br />
ordered according to internationalization (I18N)<br />
conventions. For additional information see 2.2, 3.3.9,<br />
3.3.31, 3.3.32, 3.3.37, 5.2.22 through 5.2.24, 9.2, 9.3, 9.7,<br />
9.19, 11.2.6, and Appendix E.<br />
1–12 7831 0687–010
1.6.13. SORT Level 18R3 Enhancements<br />
Getting Started<br />
The following enhancements have been made to <strong>Sort</strong>/<strong>Merge</strong> level 18R3 since level<br />
18R2.<br />
Enhancement<br />
ID<br />
Feature Name<br />
E1247 CTS5236 Tape<br />
Adapt<br />
Description<br />
Allows <strong>Sort</strong>/<strong>Merge</strong> to access files on the CTS5236 tape<br />
device.<br />
E1213 Date Key Adds a new key type to the SORT processor and SORT<br />
subroutines for sorting 2-digit years with respect to the<br />
Year 2000. Additional information about this feature can<br />
be found in 3.3.14, 3.3.31, 3.3.32, 5.2.14, 5.2.22, 5.2.23,<br />
and 11.2.4.<br />
E1106 Literal Syntax The SORT processor has been enhanced to allow the<br />
specification of nonnumeric literals in specific fields of<br />
some parameters. See 3.2.3 and 3.3.24 for additional<br />
information.<br />
1.6.14. SORT Level 17R4 Enhancements<br />
The following enhancements have been made to <strong>Sort</strong>/<strong>Merge</strong> level 18R3 since level<br />
18R2.<br />
Enhancement<br />
ID<br />
Feature Name<br />
Description<br />
E1213 Date Key Adds a new key type to the SORT processor and SORT<br />
subroutines for sorting 2-digit years with respect to the<br />
Year 2000. Additional information about this feature can<br />
be found in 3.3.14, 3.3.31, 3.3.32, 5.2.14, 5.2.22, 5.2.23,<br />
and 11.2.4.<br />
E1106 Literal Syntax The SORT processor has been enhanced to allow the<br />
specification of nonnumeric literals in specific fields of<br />
some parameters. See 3.2.3 and 3.3.24 for additional<br />
information.<br />
E1024 OST5136 Tape<br />
Adapt<br />
This functionality allows <strong>Sort</strong>/<strong>Merge</strong> to reference tape files<br />
on the OST5136 tape device.<br />
E1014 MSAM Block Size This feature allows the user of the SORT processor more<br />
control over the size of MSAM file block sizes. For<br />
additional information, see 3.3.53 and 9.14.<br />
7831 0687–010 1–13
Getting Started<br />
1.6.15. SORT Level 18R2 Enhancements<br />
The following enhancements have been made to <strong>Sort</strong>/<strong>Merge</strong> level 18R2 since level<br />
18R1.<br />
Enhancement<br />
ID<br />
Feature Name<br />
E1024 OST5136 Tape<br />
Adapt<br />
1.6.16. SORT Level 18R1 Enhancements<br />
Description<br />
This functionality allows <strong>Sort</strong>/<strong>Merge</strong> to reference tape files<br />
on the OST5136 tape device.<br />
The following enhancements have been made to <strong>Sort</strong>/<strong>Merge</strong> level 18R1 since level<br />
17R2.<br />
Enhancement<br />
ID<br />
Feature Name<br />
Description<br />
E1070 ExPipe This feature allows the ExPipe product to be used in<br />
conjunction with the SORT processor.<br />
E1014 MSAM Block Size This feature allows the user of the SORT processor more<br />
control over the size of MSAM file block sizes. For<br />
additional information see 3.3.53 and 9.14.<br />
1.6.17. SORT Level 17R2 Enhancements<br />
The following enhancements have been made to <strong>Sort</strong>/<strong>Merge</strong> level 17R2 since level<br />
17R1.<br />
Enhancement<br />
ID<br />
Feature Name<br />
E1024 36 Track Tape<br />
<strong>Support</strong><br />
Description<br />
Adapt to support 36-track tapes via the CTS 5136 Tape<br />
Device. Also tape compression recognition is supported.<br />
E995 Solarization <strong>Sort</strong>/<strong>Merge</strong> can now be installed with SOLAR.<br />
1.6.18. SORT Level 17R1 Enhancements<br />
The following enhancements have been made to <strong>Sort</strong>/<strong>Merge</strong> level 17R1 since level<br />
16R1.<br />
Enhancement<br />
ID<br />
Feature Name<br />
Description<br />
E953 Error Information This feature provides additional information for some<br />
SORT subroutine I/O error messages. For additional<br />
information, see 5.2.18 and A.2.<br />
E946 Large Files Allows the SORT processor and SORT subroutine to<br />
access large files (greater than 262143 tracks) as input,<br />
output, and scratch files.<br />
1–14 7831 0687–010
1.7. Compatibility<br />
Getting Started<br />
<strong>Sort</strong>/<strong>Merge</strong> maintains upward compatibility whenever possible. However, at times new<br />
features or defect corrections introduce incompatibilities. The following subsections<br />
describe the known incompatibilities or potential compatibility issues based on the<br />
<strong>Sort</strong>/<strong>Merge</strong> level. An identifier is also attached to each item to identify the same<br />
incompatibility issue when it is introduced in more than one symbolic level. Use these<br />
sections along with 1.5 and 1.6 when moving from one <strong>Sort</strong>/<strong>Merge</strong> level to another level<br />
for determining the incompatibilities you might encounter as a result of the product level<br />
upgrade.<br />
1.7.1. SORT Level 22R2B Compatibility<br />
The following describes the incompatibility introduced in <strong>Sort</strong>/<strong>Merge</strong> level 22R2B since<br />
level 22R2A.<br />
Compatibility<br />
ID Description<br />
C1662 The SORT subroutines are now limited to using 16777215 words of memory<br />
as opposed to 16777216. Previous levels of SORT could have corrupted one<br />
word of random records, if 16777216 words of memory were used as the<br />
CORE area. It is possible that previous levels of SORT could have incorrectly<br />
sorted some records due to this corruption and it was not detected. With this<br />
correction, the operation will proceed correctly without any record corruption.<br />
However, incorrectly sorted records from past sorts could produce an error<br />
while attempting to use the file as part of a merge operation. In addition, it is<br />
possible that the reduction of one word of memory for the CORE area could<br />
cause equivalent records to be ordered differently.<br />
1.7.2. SORT Level 22R2A Compatibility<br />
The following describes the incompatibilities introduced in <strong>Sort</strong>/<strong>Merge</strong> level 22R2A since<br />
level 22R2.<br />
Compatibility<br />
ID Description<br />
C1650 Enhancement E1650 modified one of the SORT subroutines LOG messages<br />
by moving the location of the TOURNAMENT and CORE fields and inserting<br />
the ORIGINAL RUNID and RUNID fields. If a program at a site reads or<br />
analyzes the LOG file and processes or examines the LOG for this SORT LOG<br />
entry, the movement of these fields and the insertion of the new fields might<br />
cause the LOG analysis program to either no longer find this message or pick<br />
up the fields incorrectly. The LOG analysis program must be modified to<br />
handle the new format of this message. SORT 22R2A will issue the new<br />
format of the message; however, both forms of the message can be issued<br />
on a system. If a program or product is collected with the SORT subroutines<br />
included as a relocatable library, the level of SORT used to collect the<br />
program or product will determine the format of the message issued<br />
regardless of the installed SORT level.<br />
7831 0687–010 1–15
Getting Started<br />
1.7.3. SORT Level 22R2 Compatibility<br />
The following describes the incompatibilities introduced in <strong>Sort</strong>/<strong>Merge</strong> level 22R2 since<br />
level 22R1.<br />
Compatibility<br />
ID<br />
Description<br />
C1625 The SORT configuration parameter DEFCTYPE is removed as the default codetype<br />
was always associated with either the locale in force or the CCS<br />
associated with the input data. The removal of this configuration parameter is<br />
not expected to cause any problem and in fact the removal was necessary to<br />
fix a problem related to the specification of a code-type / locale and Fieldata<br />
data. If an attempt is made to use a previous version of the SORT configuration<br />
element as the SORT 22R2 configuration element and the DEFCTYPE variable<br />
is not removed, then the SORT processor will issue error 83 for all operations.<br />
C1630 Some sorts may change from a memory only to a disk sort or from a basic<br />
mode sort to an extended mode sort when performing a sort with a small<br />
volume and variable length records. The change of a sort from a basic mode<br />
sort to an extended mode sort can cause the output file to be created with a<br />
different block size which could cause other programs that read that file to<br />
encounter an error. For instances where this difference occurs, the same<br />
difference could have occurred without any change to SORT if the input data<br />
volume had increased such that the sort changed from basic mode to<br />
extended mode.<br />
C1634 The SORT processor will now create output MSAM files with the correct<br />
maximum record size when a SELECT parameter is specified and the input<br />
file(s) do not contain any records. In prior levels, the SORT processor may have<br />
set the wrong information in the bits in the last word field of the MSAM file<br />
label.<br />
C1643 As with other extremely large tape volumes, the SORT processor assumes that<br />
any LTO, T9840D, and T10000 tape volumes only contain a data volume of 2<br />
GB. If input volume on a LTOx, T9840D, or T10000 tape volume is greater than<br />
2 GB, either the scratch files must be assigned prior to invoking the SORT<br />
processor or another data volume parameter (e.g., RECORD or NUMBER) must<br />
be specified. Failure to provide this information might result in an error<br />
termination of the SORT processor after considerable processing has occurred.<br />
If the input file is a multi-volume tape file, the above restriction applies only to<br />
the last volume of the multi-volume set. All volumes other than the last volume<br />
of a multi-volume tape file set are assumed to be full volumes.<br />
1–16 7831 0687–010
1.7.4. SORT Level 22R1 Compatibility<br />
Getting Started<br />
The following describes the incompatibilities introduced in <strong>Sort</strong>/<strong>Merge</strong> level 22R1 since<br />
level 21R1F.<br />
Compatibility<br />
ID<br />
Description<br />
C1597 In prior levels, the SORT processor or SORT subroutines may have executed<br />
successfully despite a scratch file having two different names, if the scratch<br />
file assignments and sort volume were such that usage overlap did not occur<br />
for the files. Since SORT has now eliminated the duplicate file entry, it is<br />
possible that the SORT processor / SORT subroutines could fail and issue an<br />
error due to insufficient resources (in other words, number of scratch files,<br />
total size of the scratch file, and so on.). It is also possible that the type of sort<br />
could change, thus causing changes to the remaining scratch files (for<br />
example, size of a scratch file reduced or scratch file ignored). The chance of<br />
this incompatibility occurring should be extremely remote. The resolution of<br />
this incompatibility is to correct the ECL assignment of the scratch files so that<br />
each scratch file name passed to SORT is assigned to a distinct physical file.<br />
C1600 The SORT processor for levels 21R1D through 21R1F could have created files<br />
with an incorrect record size if the first input file was a sequential SDF file, no<br />
RSZ parameter was specified, and the record length was less than 132<br />
characters. The SORT processor now creates the file with the correct record<br />
size, assuming that the input file was not created with an incorrect record size.<br />
An input file with the incorrect record size could cause unexpected errors to<br />
exist in other runstreams that reference the file. Some runstreams could fail if<br />
they were created or updated based upon the incorrect size. These<br />
runstreams could be other SORT processor calls, COBOL programs, and so on<br />
that reference the file created by SORT.<br />
C1603 The SORT subroutines have introduced a new error status, K0. This error<br />
status is issued if a basic mode sort is being performed and the CORE area<br />
cannot be allocated due to addressing limitations. This situation occurs only<br />
when the file R$CORE is used to define the size of the CORE area and a CORE<br />
parameter is not specified.<br />
C1606 The SORT processor and SORT subroutines may detect errors previously<br />
ignored or not detected. These errors are primarily associated with files (input<br />
files, output files, or tape scratch files) assigned to a tape device. It is more<br />
likely for additional errors to be detected if tape mark buffering (BUFFIL or<br />
BUFTAP) is specified.<br />
C1614 Previously, the SORT processor may have aborted with an I/O or ER<br />
contingency instead of issuing a processor or subroutine error. The SORT<br />
processor will now issue a subroutine I/O error message (for example, D5 or<br />
X4) whenever an error occurs while accessing a scratch file. In addition, SORT<br />
processor error 3 will be issued instead of an ER contingency when a FILEOUT<br />
parameter is specified with the dynamic file assignment syntax that contains<br />
invalid @ASG syntax.<br />
1.7.5. SORT Level 21R1F Compatibility<br />
No incompatibilities were introduced in <strong>Sort</strong>/<strong>Merge</strong> level 21R1F.<br />
7831 0687–010 1–17
Getting Started<br />
1.7.6. SORT Level 21R1E Compatibility<br />
The following describes the incompatibilities introduced in <strong>Sort</strong>/<strong>Merge</strong> level 21R1E since<br />
level 21R1D.<br />
Compatibility<br />
ID<br />
Description<br />
C1585 The level 21R1D SORT processor may have processed the wrong input SDF<br />
file if the file resided on a tape device and the MOVE parameter was specified.<br />
SORT 21R1E now processes the correct file.<br />
C1586 Prior to installing RDMS 14R1 in any application group, SORT 21R1E must be<br />
installed. The SORT/RDMS interface has changed due to RDMS introducing<br />
character columns associated with the UCS-2 character set. Having an<br />
incorrect level of SORT installed will cause a 33840 (B0) or 34361 (C9) error to<br />
be returned to RDMS level 14R1 or higher for all RDMS functions that call the<br />
SORT subroutines. SORT 21R1E interfaces properly with RDMS levels prior to<br />
14R1.<br />
C1588 For some small volume sorts, the SORT processor may now choose an<br />
Extended Mode sort instead of a Basic Mode sort. This decision has always<br />
been internal unless an explicit direction was indicated via parameter<br />
specification or scratch file assignment.<br />
If the SORT processor now performs an Extended Mode sort instead of a Basic<br />
Mode sort, the output file block size may be different from the previous levels<br />
of SORT. This happens primarily when the output file has a MODE=SDF. This<br />
difference in sizes is not a new incompatibility but a side effect of the SORT<br />
processor choosing an Extended Mode sort. If the input volume had been<br />
slightly larger, the SORT processor would have chosen an Extended Mode sort<br />
and the same output block size issue would have also existed. A Basic Mode<br />
sort is still performed if the only input is from the default symbiont file<br />
(FILEIN=CARDS MODE=CARDS).<br />
1.7.7. SORT Level 21R1D Compatibility<br />
The following describes the incompatibilities introduced in <strong>Sort</strong>/<strong>Merge</strong> level 21R1D since<br />
level 21R1C.<br />
Compatibility<br />
ID<br />
Description<br />
C1580 The SORT processor now correctly sorts data for a SELECT or TAG sort<br />
when a Fieldata key type (A, D, G, L, or P) or a binary key type (B, J, M, or U)<br />
is specified. The level 21R1C SORT processor may have incorrectly sorted<br />
the records but did not cause any data corruption. Prior to SORT 21R1C, the<br />
data was correctly sorted.<br />
1–18 7831 0687–010
Compatibility<br />
ID<br />
Description<br />
Getting Started<br />
C1582 As with other extremely large tape volumes, the SORT processor assumes<br />
that CTC9840 (U9840C) tape volumes only contain a data volume of 2 GB. If<br />
the input volume on a CTC9840 (U9840C) tape volume is greater than 2 GB,<br />
either scratch files must be assigned prior to invoking the SORT processor or<br />
another data volume parameter (for example, RECORD or NUMREC) must be<br />
specified. Failure to provide this information may result in an error<br />
termination of the SORT processor after considerable processing has<br />
occurred.<br />
1.7.8. SORT Level 21R1C Compatibility<br />
The following describes the incompatibilities introduced in <strong>Sort</strong>/<strong>Merge</strong> level 21R1C since<br />
level 21R1B.<br />
Compatibility<br />
ID<br />
Description<br />
C1556 MSAM files created by the SORT processor may cause other programs to<br />
receive errors due to slight changes in the size of the record in the MSAM file.<br />
An RSZ parameter that specifies a nonword multiple size must be specified.<br />
C1561 Warning message 165 is now issued when an input record is truncated by the<br />
SORT processor.<br />
C1563 The SORT processor now space-fills output record fields when the length of<br />
the input record is shorter than the specified SELECT field. Previously, the<br />
content of the SELECT field character positions beyond the end of the input<br />
record were unpredictable. This unpredictability could cause problems for<br />
programs that relied upon this incorrect data.<br />
C1565 The level 21R1C SORT processor creates MODE=SDF file with a different<br />
record size than in level 21R1, 21R1A, or 21R1B for a COPY operation, when<br />
multiple input files are specified with different record sizes.<br />
C1567 As with other extremely large tape volumes, the SORT processor assumes that<br />
CTS9940B tape volumes only contain a data volume of 2 GB. If the input<br />
volume on a CTS9940B tape volume is greater than 2 GB, either scratch files<br />
must be assigned prior to invoking the SORT processor or another data<br />
volume parameter (for example, RECORD or NUMREC) must be specified.<br />
Failure to provide this information may result in an error termination of the<br />
SORT processor after considerable processing has occurred.<br />
C1568 The SORT processor now properly handles a MOVE parameter with a value<br />
greater than 63. Prior to level 21R1C, the SORT processor would truncate any<br />
MOVE parameter value greater than 63. This change causes the proper file to<br />
be processed, while previously an incorrect file was processed.<br />
C1569 The level 21R1A and 21R1B SORT processor could create MSAM files with an<br />
incorrect maximum record length if a SELECT parameter is specified and a RSZ<br />
parameter is specified. The incorrect maximum record size occurs if the size of<br />
the SELECT parameter is smaller than the RSZ parameter. This error could<br />
cause other programs to be unable to read the MSAM file and/or to receive an<br />
error.<br />
7831 0687–010 1–19
Getting Started<br />
Compatibility<br />
ID<br />
Description<br />
C1571 ANSI files created by the SORT processor for a COPY or MERGE operation<br />
may have a different size than ANSI files created by SORT processor levels<br />
21R1, 21R1A, or 21R1B. This may cause another program or processor to<br />
encounter an error, if the program or runstream information was based on an<br />
incorrect size produced by one of these SORT processor levels.<br />
1.7.9. SORT Level 21R1B Compatibility<br />
No incompatibilities were introduced in <strong>Sort</strong>/<strong>Merge</strong> level 21R1B.<br />
1.7.10. SORT Level 21R1A Compatibility<br />
The following describes the incompatibilities introduced in <strong>Sort</strong>/<strong>Merge</strong> level 21R1A since<br />
level 21R1.<br />
Compatibility<br />
ID<br />
Description<br />
C1521 The SORT processor may create the output file with a different record size and<br />
block size when a SELECT parameter is specified and the record size of the<br />
input file is not the same as the SELECT parameter. The record size now used<br />
is documented in subsection 3.3.54, Table 3-3. The change in the block and<br />
record size may cause problems or errors for other programs or processors<br />
attempting to process a SORT-created file.<br />
1.7.11. SORT Level 21R1 Compatibility<br />
The following describes the incompatibilities introduced in <strong>Sort</strong>/<strong>Merge</strong> level 21R1 since<br />
level 20R2A.<br />
Compatibility<br />
ID<br />
Description<br />
C1468 Incompatibilities will exist if invocations to existing <strong>Sort</strong> or <strong>Merge</strong> interfaces<br />
have nonzero garbage values contained in the new length granularity fields.<br />
In SORT levels prior to level 21R1, some of these fields were reserved while<br />
others were undefined, and the SORT subroutines did not enforce that these<br />
fields contain a zero value. If these fields contain garbage values, a SORT<br />
error or record truncation/corruption could now occur. In particular, the<br />
Record Information Packet of the SORT subroutines C linkages should be<br />
cleared prior to setting values in the individual fields of the packet.<br />
1–20 7831 0687–010
Compatibility<br />
ID<br />
Description<br />
Getting Started<br />
If you create a relocatable, object module, or absolute on a system using the<br />
common banked MASM linkages or the C linkages with SORT level 21R1 or<br />
higher installed, and then execute the program on a different system where<br />
an earlier level of SORT is installed, an undetected backward incompatibility<br />
problem may exist. Normally, this is not an issue because an unrecognized<br />
parameter specification is diagnosed by the SORT processor or an assembly<br />
or compilation error is issued when an undefined field is referenced.<br />
However, in this case it is possible that the subroutine errors may not be<br />
detected. If an error is not detected by the SORT subroutines, the potential<br />
side effects of this situation include record truncation or a Storage<br />
Limits/Write Protection Violation.<br />
<strong>Sort</strong>/<strong>Merge</strong> now creates PCIOS system data format (SDF) files containing a<br />
processor code value of 04 instead of 05. This change occurs whether or not<br />
enhancement E1468 is enabled or used and should cause few (if any)<br />
incompatibilities.<br />
The SORT processor now correctly sets the significant bits in the last word<br />
field when creating PCIOS SSDF and DSDF files.<br />
As a result of enhancement E1468, the record size used by the SORT<br />
processor to create MODE=ANSI, MODE=DSDF, MODE=MSAM, and<br />
MODE=SDF files may differ from previous SORT levels. A change in the<br />
record size or block size can cause problems or errors when these files are<br />
subsequently processed by the SORT processor or other programs or<br />
processors. In most cases, the setting of the significant bits in the last word<br />
of MODE=SDF and MODE=DSDF files is not sufficient to cause<br />
incompatibility problems.<br />
Compatibility issues with record size changes are most likely to be seen<br />
when creating one of the above four file types along with any or all of the<br />
following conditions:<br />
• A COPY or MERGE operation being performed.<br />
• An inaccurate RSZ parameter or no RSZ parameter.<br />
• Multiple input files with different record sizes, usually when the first<br />
input file does not contain the longest records.<br />
• A PCIOS SSDF or DSDF input file containing bit length information (file<br />
originator equals 2, 3, or 4).<br />
• An RSZ parameter with a record size that is within the last word of the<br />
actual record size but less than a complete last word. Note that this<br />
condition is most likely to affect the record size of MSAM and ANSI<br />
output files.<br />
The record size used by the SORT processor to create the output file should<br />
be as documented in 3.3.54, Table 3-3. Most of the information in this table<br />
is unchanged, except that record sizes now apply to the bit length level as<br />
opposed to word length. Under some of the above circumstances, previous<br />
levels of the SORT processor did not always follow these rules.<br />
7831 0687–010 1–21
Getting Started<br />
1.7.12. SORT Level 20R2A Compatibility<br />
The following describes the incompatibilities introduced in <strong>Sort</strong>/<strong>Merge</strong> level 20R2A since<br />
level 20R2.<br />
Compatibility<br />
ID<br />
Description<br />
C1454 The SORT processor now correctly accepts or rejects records via the ACCEPT<br />
and STOP parameter when<br />
• The data type is ASC and the test-value field of the ACCEPT or STOP<br />
parameter contains a character represented by the encoding values 0100,<br />
0133-0140, or 0173-0177.<br />
• The data type field is ASC and the record contains data with encoding<br />
values 0100, 0133-0140, or 0173-0177 in the character positions<br />
associated with the ACCEPT or STOP parameter.<br />
This difference could result in different records being accepted via the ACCEPT<br />
parameter and a different input termination point be determined for the STOP<br />
parameter.<br />
Enhancement E1454 could also cause the SORT processor to issue error 7, 86,<br />
or 130 when the ACCEPT or STOP parameter has a data type field of ASC or<br />
CAS and the first character of the value field is an apostrophe (') or a quotation<br />
mark (").<br />
1.7.13. SORT Level 20R2 Compatibility<br />
The following describes the incompatibilities introduced in <strong>Sort</strong>/<strong>Merge</strong> level 20R2 since<br />
level 20R1D.<br />
Compatibility<br />
ID<br />
Description<br />
C1447 The SORT processor now creates the output file with a record length as<br />
documented in this guide. As a result, the record size and the block size used<br />
by the SORT processor to create the output file may be different than previous<br />
levels. The change in the record size and/or block size may cause programs<br />
that read the output file to issue errors. The difference in the record size will<br />
most likely occur when two or more input files are specified and the record<br />
length of the first input file is not the longest. It is also possible that important<br />
data could now be truncated due to the use of the smaller record size.<br />
C1453 The UCS C SORT linkages will no longer corrupt the last word of every record<br />
when a PRESERVE parameter is specified and a fixed length record sort is<br />
requested.<br />
1–22 7831 0687–010
1.7.14. SORT Level 20R1D Compatibility<br />
Getting Started<br />
The following describes the incompatibilities introduced in <strong>Sort</strong>/<strong>Merge</strong> level 20R1D since<br />
level 20R1C.<br />
Compatibility<br />
ID<br />
Description<br />
C1432 The SORT UCS C macro sm_start_char_to_start_word will now produce the<br />
correct value. As the key is now defined in the correct but different location,<br />
different results or various errors may be encountered depending upon the<br />
data in the records and how the sorted records were subsequently used.<br />
C1433 The SORT subroutines will now correctly sort an RDMS I18N column when the<br />
SORT subroutines are called from RDMS and the RDMS I18N column is<br />
specified in an ORDERED BY or DISTINCT phrase.<br />
1.7.15. SORT Level 20R1C Compatibility<br />
The following describes the incompatibilities introduced in <strong>Sort</strong>/<strong>Merge</strong> level 20R1C since<br />
level 20R1B.<br />
Compatibility<br />
ID<br />
Description<br />
C1385 The SORT processor may allow different records to be processed when a<br />
ACCEPT, ALLOW, REJECT, or STOP parameter is specified. If an input record<br />
is shorter than the field location specified the SORT processor allows the<br />
condition specified by the parameter to fail. For the ACCEPT and ALLOW<br />
parameters, some records may not be processed, even though they were<br />
processed previously. For the REJECT parameter, some records may be<br />
processed, even if previously they were rejected. For the STOP parameter, the<br />
input termination condition may not be encountered in the same location and<br />
results in additional records from an individual file or all files to be processed.<br />
C1403 The SORT processor now creates a correct tape label on the second and later<br />
tape volumes of the output file. Previous levels of <strong>Sort</strong>/<strong>Merge</strong> may have<br />
created these volumes of the tape output file with incorrect FILE–ID, expiration<br />
date, etc. information.<br />
C1411 As a result of enhancement E1411, input files residing on CTS5236 tape<br />
devices will be assumed to reside on an EE tape. Since the SORT processor<br />
has no method to determine the actual type of tape mounted, when the<br />
volume mounted is not an EE tape the enhancement will cause larger scratch<br />
facilities to be requested which may cause excessively sized scratch files to be<br />
assigned. This increase in the scratch facilities may also cause some runs to<br />
abort due to quota limits.<br />
7831 0687–010 1–23
Getting Started<br />
Compatibility<br />
ID<br />
Description<br />
C1416 The SORT processor previously had always assumed that any input tape<br />
volume was a completely full tape volume. With the extremely large tape<br />
volumes associated with the CTS9840 tape system, the SORT processor will<br />
assume these tape volumes only contain a data volume of 2 GB. If the input<br />
volume on a CTS9840 tape volume is greater than 2 GB, either scratch files<br />
MUST be assigned prior to invoking the SORT processor or another data<br />
volume parameter (for example, RECORD or NUMREC) must be specified.<br />
Failure to provide this information may result in an error termination of the<br />
SORT processor after considerable processing has occurred.<br />
1.7.16. SORT Level 20R1B Compatibility<br />
The following describes the incompatibilities introduced in <strong>Sort</strong>/<strong>Merge</strong> level 20R1B since<br />
level 20R1A.<br />
Compatibility<br />
ID<br />
Description<br />
C1376 The SORT processor incorrectly underestimated or overestimated the size of<br />
most tape files. This defect has been corrected and all tape files, except those<br />
noted in C1380, will be assumed to be full tape volumes. This may cause large<br />
scratch files to be assigned by the SORT processor. In some circumstances,<br />
the SORT processor may be unable to assign these larger files, which causes<br />
various error messages to be issued.<br />
C1380 The SORT processor previously has always assumed that any input tape<br />
volume was a complete full tape volume. With the introduction of the<br />
extremely large tape volumes associated with the DLT7000 tape system, the<br />
SORT processor assumes that these tape volumes only contain a data volume<br />
of 2 GB. If the input data volume on these tape volumes is greater that 2 GB,<br />
either scratch files MUST be assigned prior to invoking the SORT processor or<br />
another data volume indicator (for example, RECORD or NUMERC parameter)<br />
must be specified. Failure to provide this information may result in an error<br />
termination of the SORT processor after considerable processing has occurred.<br />
1–24 7831 0687–010
1.7.17. SORT Level 20R1A Compatibility<br />
Getting Started<br />
The following describes the incompatibilities introduced in <strong>Sort</strong>/<strong>Merge</strong> level 20R1A since<br />
level 20R1.<br />
Compatibility<br />
ID<br />
Description<br />
C1365 The SORT processor in level 20R1 at times underestimated the size of a virtual<br />
tape file (VTH). The maximum size of a VTH file will now be correctly<br />
estimated which may cause larger scratch files to be assigned. In some<br />
circumstances, the SORT processor may be unable to assign these larger files,<br />
which causes various error messages to be issued.<br />
C1372 The SORT subroutines <strong>Sort</strong> Close and <strong>Merge</strong> Close linkages now will always<br />
release all data areas allocated by the extended mode SORT subroutines. This<br />
was the intent in previous levels, but under certain circumstances some areas<br />
were not released.<br />
1.7.18. SORT Level 20R1 Compatibility<br />
The following describes the incompatibilities introduced in <strong>Sort</strong>/<strong>Merge</strong> level 20R1 since<br />
level 19R1.<br />
Compatibility<br />
ID<br />
Description<br />
C1334 As a result of enhancement E1284, the SORT subroutines UCS C Release<br />
Linkage now requires that the record length field of the record information<br />
packet parameter be set for a fixed length sort operation. Previously, the<br />
length of the record was assumed to be equal to the RSZ parameter. As a<br />
result, some existing sort operations may receive an unexpected result status.<br />
C1316 If the UFTN FSORT or FMERGE statements are used to call the SORT<br />
subroutines and a COMP or DROC routine is specified, URTS level 9R1A or<br />
higher is required.<br />
C1309 The SORT subroutines may allocate an additional bank when performing an<br />
extended mode sort. This causes an increase in the total amount of memory<br />
used but should eliminate many X0 or X8 errors while improving the<br />
performance of most large sorts.<br />
C1286 As a result of enhancement E1284, some calls to the UCS C sort release and<br />
UCS C sort return linkages that previously failed may now return with a<br />
nonfailure result status. Thus, the UCS C program can be written to recover<br />
from the error and continue the operation. In addition, record padding and<br />
record truncation capabilities have been implemented for the UCS C sort<br />
release and UCS C sort return linkages. Releasing a record via the UCS C sort<br />
release linkage with a length longer than the RSZ parameter will now cause a<br />
record truncation result status to be returned (a nonfailure condition) instead of<br />
a failure result status.<br />
7831 0687–010 1–25
Getting Started<br />
Compatibility<br />
ID<br />
Description<br />
C1280 If the value assigned to the DEFBMCORE configuration parameter is reduced<br />
from the default value of 210000, some sorts will be changed from a basic<br />
mode sort to an extended mode sort while preventing many 79 errors. In a<br />
few instances, it might be possible that a sort that previously completed may<br />
now fail if the AUTOMATIC configuration parameter is set to NO.<br />
1.7.19. SORT Level 19R1 Compatibility<br />
The following describes the incompatibilities introduced in <strong>Sort</strong>/<strong>Merge</strong> level 19R1 since<br />
level 18R3.<br />
Compatibility<br />
ID<br />
Description<br />
C1290 A new format to the SORT subroutines KEY and KEYW parameter exists. This<br />
new format exists when a second continuation entry is specified. If existing<br />
KEY parameters contained two continuation entries, the new definition is<br />
assumed. Previously, the second continuation entry was ignored. As a result<br />
of this change, the maximum word offset where a key can begin within a<br />
record has been increased.<br />
C1201 As part of enhancement E1105, the SORT subroutines MASM merge common<br />
banked linkages and the UCS C merge linkages are directed to an extended<br />
mode merge operation. An early termination of the merge operation may<br />
cause banks to remain allocated unless a merge close linkage is called.<br />
C1153 If the SORT processor is assigning the scratch files, the processor may<br />
overestimate the scratch file size when a significant number of records remain<br />
after the STOP condition has been met.<br />
C1149 If you specify the OWN processor parameter with exit numbers 14 or 21 or the<br />
COMP subroutine parameter, any key translation as a result of specifying the<br />
KEY parameters no longer occurs. This may affect SORT runstreams where a<br />
user data reduction routine is specified with a user compare routine and a key<br />
parameter. It can also affect the user compare routine because the key<br />
translation will no longer occur.<br />
C1140 As a result of enhancement E1140, <strong>Sort</strong>/<strong>Merge</strong> can no longer be installed with<br />
COMUS.<br />
C1105 As part of enhancement E1105, SDF, DSDF, and PRINT files may be created<br />
with a code type other than 0 or 1. This should not be a problem for <strong>Unisys</strong><br />
products, but user programs/products that expect a code type of 0 or 1 could<br />
encounter problems.<br />
Enhancement E1105 also causes <strong>Sort</strong>/<strong>Merge</strong> to require URTS level 9R1 or<br />
higher if any UCS sort or merge interface is requested.<br />
1–26 7831 0687–010
1.7.20. SORT Level 18R3 Compatibility<br />
Getting Started<br />
The following describes the incompatibilities introduced in <strong>Sort</strong>/<strong>Merge</strong> level 18R3 since<br />
level 18R2.<br />
Compatibility<br />
ID<br />
Description<br />
C1106 SORT processor runstreams where the file-identifier of the FILEID parameter<br />
begins with an apostrophe or a quotation mark will fail because the SORT<br />
processor now considers that as a nonnumeric literal.<br />
1.7.21. SORT Level 17R4 Compatibility<br />
The following describes the incompatibilities introduced in <strong>Sort</strong>/<strong>Merge</strong> level 17R4 since<br />
level 17R2A.<br />
Compatibility<br />
ID<br />
Description<br />
C1133 The SORT processor now uses ER SYMB$ to create PRINT and CARD files.<br />
Records that end with trailing spaces no longer have these spaces implicitly<br />
truncated. Thus, the records written to the file may be longer than in previous<br />
levels and the file sizes may expand. Trailing spaces can be explicitly truncated<br />
via the SORT processor T option.<br />
C1106 SORT processor runstreams where the file-identifier of the FILEID parameter<br />
begins with an apostrophe or a quotation mark will fail because the SORT<br />
processor now considers that as a nonnumeric literal.<br />
1.7.22. SORT Level 18R2 Compatibility<br />
The following describes the incompatibilities introduced in <strong>Sort</strong>/<strong>Merge</strong> level 18R2 since<br />
level 18R1A.<br />
Compatibility<br />
ID<br />
Description<br />
C1133 The SORT processor now uses ER SYMB$ to create PRINT and CARD files.<br />
Records that end with trailing spaces will no longer have these spaces<br />
implicitly truncated. Thus, the records written to the file may be longer than in<br />
previous levels and the size of files may expand. Trailing spaces can be<br />
explicitly truncated with the SORT processor T option.<br />
1.7.23. SORT Level 18R1A Compatibility<br />
No incompatibilities were introduced in <strong>Sort</strong>/<strong>Merge</strong> level 18R1A.<br />
1.7.24. SORT Level 18R1 Compatibility<br />
No incompatibilities were introduced in <strong>Sort</strong>/<strong>Merge</strong> level 18R1.<br />
7831 0687–010 1–27
Getting Started<br />
1.7.25. SORT Level 17R2A Compatibility<br />
No incompatibilities were introduced in <strong>Sort</strong>/<strong>Merge</strong> level 17R2A.<br />
1.7.26. SORT Level 17R2 Compatibility<br />
The following describes the incompatibilities introduced in <strong>Sort</strong>/<strong>Merge</strong> level 17R2 since<br />
level 17R1.<br />
Compatibility<br />
ID<br />
Description<br />
C1024 As part of enhancement E1024, the SORT processor now recognizes<br />
compression when determining the volume of data on a cartridge tape. This<br />
changes the size of scratch files assigned by the SORT processor, which could<br />
cause the quota limits to be exceeded as well as change the information<br />
provided by the ESTIMATE operation.<br />
C999 The minimum D-bank size increased from 0200 words to 0500 words for calls<br />
to the merge linkages in the SORT subroutines. This change was necessary to<br />
provide additional workspace for the merge operation as well as provide room<br />
for future enhancements.<br />
C995 The format of the <strong>Sort</strong>/<strong>Merge</strong> release tape has changed as a result of<br />
enhancement E995.<br />
1–28 7831 0687–010
Section 2<br />
Basic Mode versus Extended Mode<br />
Selection<br />
This section discusses the selection of basic mode and extended mode as the<br />
environment for using either the SORT processor or the SORT subroutines.<br />
2.1. OS 2200 Environments<br />
<strong>Unisys</strong> supports two environments on OS 2200 systems:<br />
• The basic mode environment<br />
• The extended mode environment<br />
You can direct the SORT processor or the SORT subroutines to perform the sort<br />
operation you desire in either of the two environments, as shown in Table 2–1.<br />
Table 2–1. <strong>Sort</strong>/<strong>Merge</strong> Environment Operations<br />
Environment <strong>Sort</strong> Operation Description<br />
Basic mode Basic mode sort The SORT processor and the SORT subroutines perform<br />
a memory, disk, one-level mass storage, two-level mass<br />
storage, or tape sort using a basic mode memory area of<br />
up to 262K words.<br />
Extended mode Extended mode<br />
sort<br />
For large sorts, the SORT processor and the SORT<br />
subroutines are unable to access the extended memory<br />
capacity of current OS 2200 systems.<br />
The SORT processor and the SORT subroutines perform<br />
a memory or disk sort using an extended memory area<br />
of up to 16 megawords (16,777,216 words). The actual<br />
memory that can be used is based on the configuration<br />
of the <strong>Sort</strong>/<strong>Merge</strong> product at your site.<br />
For large sorts, significant performance gains result from<br />
using extended memory.<br />
7831 0687–010 2–1
Basic Mode versus Extended Mode Selection<br />
2.2. Using the SORT Processor in Extended Mode<br />
To cause the SORT processor to unconditionally perform an extended mode sort, use<br />
the ESORT parameter (see 3.3.21) or I key type (see 3.3.31).<br />
Do not specify the ESORT parameter or I key type when one of the following conditions<br />
exists, since these conditions prevent the selection of an extended mode sort:<br />
• The X option is specified on the SORT processor call statement (see 3.1).<br />
• The DRUM, FAST, or TAPE parameter is present.<br />
• A one-level (M1) or a two-level (M1–M2) mass storage sort is requested.<br />
• A sort scratch file (XA, XB, ..., XZ) is assigned to a tape device.<br />
Table 2–2 and Table 2–3 summarize the extended mode sort versus basic mode sort<br />
selection process when none of the above conditions exist and the Y option is not<br />
specified on the SORT processor call statement.<br />
When the Y option is specified on the SORT processor call statement a basic mode core<br />
sort or an extended mode core sort is performed. If the ESORT parameter or an I key is<br />
specified, an extended mode sort is always performed. Table 2–4 summarizes the<br />
extended mode sort versus basic mode sort selection process when the Y option is<br />
specified on the SORT processor call statement.<br />
Note: Use the terms and their equivalents below with the following tables:<br />
• MAXIMUM – MAXIMUM configuration parameter value<br />
• MINIMUM – MINIMUM configuration parameter value<br />
• DEFBMCORE – DEFBMCORE configuration parameter value<br />
2–2 7831 0687–010
Basic Mode versus Extended Mode Selection<br />
Table 2–2. SORT Processor Extended Mode Selection, AUTOMATIC Set to YES<br />
Scratch<br />
Files<br />
Specified<br />
CORE Parameter Size (CS)<br />
Data Volume (DV)<br />
<strong>Sort</strong> Type<br />
Actual <strong>Sort</strong><br />
Core Size<br />
None None DV < MINIMUM EM, Core MINIMUM<br />
None MINIMUM < DV < MAXIMUM EM, Core DV<br />
None DV > MAXIMUM EM, Disk MAXIMUM<br />
CS < 10000 DV < 10000 BM, Core 10000<br />
CS < 10000 DV >10000 BM, Disk 10000<br />
10000 < CS < 210000 DV < CS BM, Core CS<br />
10000 < CS < 210000 DV >CS BM, Disk CS<br />
210000 < CS < MINIMUM DV < MINIMUM EM, Core MINIMUM<br />
210000 < CS < MINIMUM DV > MINIMUM EM, Disk MINIMUM<br />
MINIMUM < CS <<br />
MAXIMUM<br />
MINIMUM < CS <<br />
MAXIMUM<br />
DV < CS EM, Core CS<br />
DV >CS EM, Disk CS<br />
CS > MAXIMUM DV < MAXIMUM EM, Core MAXIMUM<br />
CS > MAXIMUM DV > MAXIMUM EM, Disk MAXIMUM<br />
Yes None DV < MINIMUM EM, Disk MINIMUM<br />
None MINIMUM < DV < MAXIMUM EM, Disk DV<br />
None DV > MAXIMUM EM, Disk MAXIMUM<br />
CS < 10000 – – – BM, Disk 10000<br />
10000 < CS < 210000 – – – BM, Disk CS<br />
210000 < CS < MINIMUM – – – EM, Disk MINIMUM<br />
MINIMUM < CS <<br />
MAXIMUM<br />
– – – EM, Disk CS<br />
CS > MAXIMUM – – – EM, Disk MAXIMUM<br />
7831 0687–010 2–3
Basic Mode versus Extended Mode Selection<br />
Table 2–3. SORT Processor Extended Mode Selection, AUTOMATIC Set to NO<br />
Scratch<br />
Files<br />
Specified<br />
CORE Parameter Size (CS)<br />
Data Volume (DV)<br />
<strong>Sort</strong> Type<br />
None None DV < 10000 BM, Core 10000<br />
None 10000 < DV < DEFBMCORE BM, Core DV<br />
Actual <strong>Sort</strong><br />
Core Size<br />
None DV >DEFBMCORE BM, Disk DEFBMCORE<br />
CS < 10000 DV < 10000 BM, Core 10000<br />
CS < 10000 DV >10000 BM, Disk 10000<br />
10000 < CS < 210000 DV < CS BM, Core CS<br />
10000 < CS < 210000 DV >CS BM, Disk CS<br />
210000 < CS < MINIMUM DV < MINIMUM EM, Core MINIMUM<br />
210000 < CS < MINIMUM DV > MINIMUM EM, Disk MINIMUM<br />
MINIMUM < CS <<br />
MAXIMUM<br />
MINIMUM < CS <<br />
MAXIMUM<br />
DV < CS EM, Core CS<br />
DV >CS EM, Disk CS<br />
CS > MAXIMUM DV < MAXIMUM EM, Core MAXIMUM<br />
CS > MAXIMUM DV > MAXIMUM EM, Disk MAXIMUM<br />
Yes None DV < 10000 BM, Disk 10000<br />
None 10000 < DV < DEFBMCORE BM, Disk DV<br />
None DV >DEFBMCORE BM, Disk DEFBMCORE<br />
CS < 10000 – – – BM, Disk 10000<br />
10000 < CS < 210000 – – – BM, Disk CS<br />
210000 < CS < MINIMUM – – – EM, Disk MINIMUM<br />
MINIMUM < CS <<br />
MAXIMUM<br />
– – – EM, Disk CS<br />
CS > MAXIMUM – – – EM, Disk MAXIMUM<br />
2–4 7831 0687–010
Basic Mode versus Extended Mode Selection<br />
Table 2–4. SORT Processor Extended Mode Selection, Y Option Specified<br />
AUTOMATIC<br />
Configuration<br />
Parameter<br />
CORE Parameter Size (CS)<br />
Data Volume (DV)<br />
<strong>Sort</strong> Type<br />
Actual <strong>Sort</strong><br />
Core Size<br />
Yes None DV < MINIMUM EM, Core MINIMUM<br />
None MINIMUM < DV < MAXIMUM EM, Core DV<br />
None DV > MAXIMUM ERROR<br />
CS < 10000 DV < CS BM, Core 10000<br />
CS < 10000 DV >CS ERROR<br />
10000 < CS < 210000 DV < CS BM, Core CS<br />
10000 < CS < 210000 DV >CS ERROR<br />
210000 < CS < MINIMUM DV < MINIMUM EM, Core MINIMUM<br />
210000 < CS < MINIMUM DV > MINIMUM ERROR<br />
MINIMUM < CS <<br />
MAXIMUM<br />
MINIMUM < CS <<br />
MAXIMUM<br />
DV < CS EM, Core CS<br />
DV >CS ERROR<br />
CS > MAXIMUM DV < MAXIMUM EM, Core MAXIMUM<br />
CS > MAXIMUM DV > MAXIMUM ERROR<br />
No None DV < 10000 BM, Core 10000<br />
None 10000 < DV < DEFBMCORE BM, Core DV<br />
None DV >DEFBMCORE ERROR<br />
CS < 10000 DV < CS BM, Core 10000<br />
CS < 10000 DV >CS ERROR<br />
10000 < CS < 210000 DV < CS BM, Core CS<br />
10000 < CS < 210000 DV >CS ERROR<br />
210000 < CS < MINIMUM DV < MINIMUM EM, Core MINIMUM<br />
210000 < CS < MINIMUM DV > MINIMUM ERROR<br />
MINIMUM < CS <<br />
MAXIMUM<br />
MINIMUM < CS <<br />
MAXIMUM<br />
DV < CS EM, Core CS<br />
DV >CS ERROR<br />
CS > MAXIMUM DV < MAXIMUM EM, Core MAXIMUM<br />
CS > MAXIMUM DV > MAXIMUM ERROR<br />
7831 0687–010 2–5
Basic Mode versus Extended Mode Selection<br />
2.3. Using the SORT Subroutines in Extended Mode<br />
Like the SORT processor, the SORT subroutines can also perform an extended mode<br />
sort. You direct the SORT subroutines to perform an extended mode sort in either of<br />
two ways:<br />
• By passing a CORE parameter table entry specifying a core size greater than 210,000<br />
words<br />
• By assigning an R$CORE file with a maximum granularity exceeding 210<br />
If you do not specify the CORE parameter table entry, an R$CORE file must be assigned<br />
before you execute the sort open call. If neither a CORE parameter table nor an<br />
R$CORE file is specified, the SORT subroutines terminate the sort with an error.<br />
The SORT subroutines use a set of factors to select an extended mode sort, as shown in<br />
Table 2–5.<br />
Table 2–5. SORT Subroutines Extended Mode Selection<br />
Core Parameter Table Entry R$CORE<br />
Specified Core Size Size SORT Chosen Memory Size Allocated<br />
Yes (no 77 entries) < 210000<br />
>210000<br />
Yes (one 77 entry) < 262143<br />
>262143<br />
Yes (two 77 entries) < 210000<br />
>210000<br />
No Not specified<br />
Not specified<br />
Ignored<br />
Ignored<br />
Ignored<br />
Ignored<br />
Ignored<br />
Ignored<br />
< 210000<br />
>210000<br />
Extended mode<br />
Extended mode<br />
Basic mode<br />
Error *<br />
Error *<br />
Extended mode<br />
Basic mode<br />
Extended mode<br />
* See A.2 for a listing of the SORT subroutines diagnostic messages.<br />
Notes:<br />
CORE parameter size<br />
CORE parameter size<br />
CORE parameter<br />
Not applicable<br />
Not applicable<br />
CORE parameter size<br />
(no MINIMUM or<br />
MAXIMUM checks)<br />
R$CORE size<br />
R$CORE size<br />
• When extended mode is selected, the core size allocated is never less than<br />
MINIMUM configuration parameter or greater than MAXIMUM configuration<br />
parameter, except where noted.<br />
• The R$CORE size is 1,000 times the maximum granularity specified on the R$CORE<br />
assignment statement.<br />
2–6 7831 0687–010
Section 3<br />
The SORT Processor<br />
This section describes the SORT processor in detail, including<br />
• How to call the SORT processor<br />
• Which SORT processor options are available to you<br />
• How to specify SORT processor parameters to control the sort operations you<br />
perform<br />
• What the SORT processor parameters are, notably<br />
− When to use them<br />
− What considerations apply to them<br />
− The exact format of the parameter specifications<br />
3.1. Activating the SORT Processor<br />
Activate the SORT processor with Executive Control Language (ECL) using one of the<br />
following processor calls:<br />
SORT processor call for reentrant sort<br />
@SORT [,options]<br />
SORT processor call for nonreentrant sort<br />
@SORTNR [,options]<br />
where options is one or more of the following values.<br />
Option Description<br />
A All files are ACOB data files with ASCII character data. You can override this<br />
option on individual files with the MODE parameter (see MODE in 3.3.40). This<br />
is the default SORT processor option.<br />
C All files are COBOL File Handler (CFH) data files with Fieldata character data.<br />
You can override this option on individual files with the MODE parameter (see<br />
MODE in 3.3.40).<br />
E Print the sort input parameters after reading them. This is the default in batch<br />
mode.<br />
I All input ACOB or CFH files are single buffered. The default is double buffering.<br />
7831 0687–010 3–1
The SORT Processor<br />
Option Description<br />
K This option indicates that the only output you want is a printed listing of the<br />
sorted records. However, if the K option is specified for a TAG operation, a<br />
TAGFILE is created. Prints any size record with no truncation.<br />
L Print a listing of the sorted output records. Prints any size record with no<br />
truncation.<br />
M All data is in Fieldata characters. If you use the M option with the A or S option,<br />
the character type is equivalent to DATA=FIELDATA (see DATA in 3.3.13).<br />
O The output file is a single buffered ACOB or CFH file. The default is double<br />
buffering.<br />
S All files are system data format (SDF) files with ASCII character data. Do not<br />
use this option for files produced by symbionts (PRINT$ and SYMB$). You can<br />
override this option with the MODE parameter (see MODE in 3.3.40).<br />
T Truncate trailing spaces in records after a sort. Does not preserve spaces that<br />
were originally in the input records.<br />
X Perform a one-level mass storage (M1) sort with an internally or externally<br />
assigned file called XA. All other externally assigned scratch files are ignored.<br />
Y Perform a memory-only sort; no scratch files are used. All externally assigned<br />
scratch files are ignored.<br />
Z Open all input files simultaneously during a sort or copy operation. Normally all<br />
records from one input file are read before the next file is opened. You must<br />
assign all input files before calling the SORT processor. Do not use this option<br />
for a merge operation.<br />
3.2. Using Parameter Specifications<br />
After you call the SORT processor, you supply the parameters that control its operation<br />
by defining the following:<br />
• Type of operation to perform<br />
• Format of the input files and the output file<br />
• Character type of the records to be processed<br />
• Number of records to process<br />
• Key field definitions<br />
3–2 7831 0687–010
3.2.1. Types of Parameters<br />
There are two types of SORT processor parameters:<br />
• Global parameters<br />
The SORT Processor<br />
You can use these parameters anywhere within the parameter specifications to<br />
define the following:<br />
− The working environment in which the operation takes place.<br />
− The attributes of the input files and the output file. The attributes of the input<br />
and output files are always the same unless you change an attribute using the<br />
local parameters.<br />
• Local parameters<br />
These parameters define the attributes of the input file or files or the output file and<br />
can override global parameters. You can only use these parameters with the<br />
following three file identification parameters (see 3.2.6):<br />
− FILEIN<br />
Specifies an input file to the SORT processor; required for all operations<br />
(see 3.3.25)<br />
− FILESIN<br />
Specifies one or more input files to the SORT processor (see 3.3.27)<br />
− FILEOUT<br />
Specifies the output file for the SORT processor (see 3.3.26)<br />
Table 3–1 defines the global and local parameters and indicates the subsection where<br />
you can find the particular SORT processor parameter.<br />
Parameter<br />
Table 3–1. SORT Processor Global/Local Parameters<br />
Local FILEIN Local<br />
FILESIN<br />
Local<br />
FILEOUT<br />
Global<br />
Reference<br />
ACCEPT X 3.3.1<br />
ALLOW X 3.3.2<br />
BIAS X 3.3.3<br />
BLOCK X X X X 3.3.4<br />
BMBLOCK X 3.3.5<br />
CHECK X 3.3.6<br />
CHECKSUM X 3.3.7<br />
CKPT X 3.3.8<br />
CODE–TYPE X 3.3.9<br />
7831 0687–010 3–3
The SORT Processor<br />
Parameter<br />
Table 3–1. SORT Processor Global/Local Parameters<br />
Local FILEIN Local<br />
FILESIN<br />
Local<br />
FILEOUT<br />
Global<br />
Reference<br />
CONSOLE X 3.3.10<br />
COPY X 3.3.11<br />
CORE X 3.3.12<br />
DATA X 3.3.13<br />
DEFYEAR X 3.3.14<br />
DELCON X 3.3.15<br />
DELDUPS X 3.3.16<br />
DELLOG X 3.3.17<br />
DISKS X 3.3.18<br />
DRUM X 3.3.19<br />
EQUIP X X X X 3.3.20<br />
ESORT X 3.3.21<br />
ESTIMATE X 3.3.22<br />
FAST X 3.3.23<br />
FILEID X X X 3.3.24<br />
ISKEY X 3.3.28<br />
ISKEYW X 3.3.29<br />
JOIN X X 3.3.30<br />
KEY X 3.3.31<br />
KEYW X 3.3.32<br />
LABEL X X X X 3.3.33<br />
LIMDRM X 3.3.34<br />
LIMFST X 3.3.35<br />
LINKSZ X 3.3.36<br />
LOCALE X 3.3.37<br />
LOG X 3.3.38<br />
MERGE X 3.3.39<br />
MODE X X X X 3.3.40<br />
MOVE X X X 3.3.41<br />
MSKEY X 3.3.42<br />
MSKEYW X 3.3.43<br />
3–4 7831 0687–010
Parameter<br />
Table 3–1. SORT Processor Global/Local Parameters<br />
Local FILEIN Local<br />
FILESIN<br />
Local<br />
FILEOUT<br />
The SORT Processor<br />
Global<br />
Reference<br />
NUMREC X X X 3.3.44<br />
OWN X 3.3.45<br />
PREP X X X X 3.3.46<br />
PRESERVE X 3.3.47<br />
PROCESSING X 3.3.48<br />
RECORD X 3.3.49<br />
REELS X X 3.3.50<br />
REJECT X 3.3.51<br />
RETRIEVE X 3.3.52<br />
REVMSAMBLK X 3.3.53<br />
RSZ X 3.3.54<br />
SELECT X X X 3.3.55<br />
SEQ X 3.3.56<br />
SEQA X 3.3.57<br />
SEQC X 3.3.58<br />
SEQX X 3.3.59<br />
SKIPL X X 3.3.60<br />
SORT X 3.3.61<br />
SPLIT X 3.3.62<br />
STOP X 3.3.63<br />
STOPAPP X X 3.3.64<br />
TAG X 3.3.65<br />
TAGFILE X 3.3.66<br />
TAPES X 3.3.67<br />
VOLUME X 3.3.68<br />
7831 0687–010 3–5
The SORT Processor<br />
3.2.2. SORT Processor Program Structure<br />
The general structure of a SORT processor program execution includes global, local, and<br />
file parameters, as follows:<br />
@SORT,options<br />
global-parameter-a1 global-parameter-a2 ... global-parameter-an<br />
.<br />
.<br />
.<br />
FILEIN=filename local-parameter-a1 local-parameter-a2 ;<br />
local-parameter-a3 ... local-parameter-an<br />
global-parameter-b1 ... global-parameter-bn<br />
global-parameter-c1<br />
global-parameter-d1<br />
FILESIN=filename2,filename3 ... filename4 local-parameter-b1 ;<br />
local-parameter-b2 local-parameter-b3 ... local-parameter-bn<br />
global-parameter-e1<br />
FILEOUT=outfile local-parameter-c1 local-parameter-c2 ;<br />
local-parameter-c3 ... local-parameter-cn<br />
global-parameter-f1<br />
global-parameter-g1<br />
.<br />
.<br />
.<br />
@EOF<br />
As you can see from the preceding structure, you can insert global parameters anywhere<br />
between the processor call line (@SORT,options) and the @EOF. However, local<br />
parameters are only allowed following a FILEIN (see 3.3.25), FILESIN (see 3.3.27), or<br />
FILEOUT (see 3.3.26) parameter.<br />
See 3.2.1 for the definitions of the global and local parameters. See Appendix B for<br />
more examples using SORT processor parameters and options.<br />
3.2.3. Syntax Rules for SORT Processor Parameter<br />
Specifications<br />
The SORT processor parameter specification is described in this subsection.<br />
Format<br />
parameter-name [ = field-1 [,field-2] ... ]<br />
where<br />
parameter-name<br />
is a parameter recognized by the SORT processor.<br />
3–6 7831 0687–010
field-n<br />
The SORT Processor<br />
is either an integer, a decimal, a Fieldata character string, an ASCII character string,<br />
or a nonnumeric literal, as defined by the individual parameter descriptions. All<br />
character strings are recognized as Fieldata character strings except for those<br />
parameters that have fields that allow ASCII character strings and provide a way to<br />
specify it as such. Nonnumeric literals are not limited to the Fieldata or ASCII<br />
character sets. A nonnumeric literal can contain any character in the computer’s<br />
character set.<br />
The following syntax rules apply to all SORT processor parameter specifications:<br />
• You must separate parameters on a single input line by one or more spaces. No<br />
spaces are allowed within a parameter specification. One or more spaces can<br />
appear before the first parameter on an input line.<br />
• You must use a semicolon ( ; ) to continue a parameter specification onto the next<br />
input line. You can begin the continuation line with spaces if the parameter<br />
specification that began on the previous line ends with a comma directly followed by<br />
a semicolon ( ,; ), otherwise, no spaces are allowed within a continued parameter<br />
specification.<br />
Example<br />
The following example shows a parameter that continues on a second line, with a<br />
comment on the first line:<br />
FILEIN=TAPE3 BLOCK=30,RECORDS MODE=ANSI ; .Input file definition<br />
LABEL=STANDARD<br />
• A period ( . ) with at least one preceding space terminates syntax scanning;<br />
therefore, you can add comments after the period.<br />
• A nonnumeric literal is described by the following:<br />
General Format<br />
{ ’ } {character-1} ... { ’ }<br />
or<br />
{ ” } {character-1} ... { ” }<br />
Syntax Rules<br />
1. Character-1 can be any character in the computer character set.<br />
2. If character-1 is to represent a quotation mark (042), and the literal is delimited<br />
by a quotation mark, you must use two contiguous quotation mark characters to<br />
represent a single occurrence of that character.<br />
3. If character-1 is to represent an apostrophe (047), and the literal is delimited by<br />
an apostrophe, you must use two contiguous apostrophe characters to<br />
represent a single occurrence of that character.<br />
7831 0687–010 3–7
The SORT Processor<br />
General Rules<br />
1. A nonnumeric literal can be 1 through 82 characters in length.<br />
2. The value of a nonnumeric literal in the processor runstream is the value<br />
represented by character-1 or the combination thereof.<br />
3. The apostrophe or quotation mark that delimits the nonnumeric literal is not part<br />
of the value of the literal string.<br />
4. The space, comma, and semicolon are treated as part of the nonnumeric literal<br />
and do not have their normal syntactical meanings when embedded within the<br />
delimiters of the nonnumeric literal.<br />
3.2.4. Syntax Rules for Local Parameter Specifications<br />
The following syntax rules apply only to local parameter specifications:<br />
• The format for a local parameter specification is:<br />
file-identification-parameter local-parameter-1 ...local-parameter-a;<br />
local-parameter-b local-parameter-c.<br />
where file-identification-parameter is FILEIN, FILESIN, or FILEOUT.<br />
• Specify local parameters on the same logical input line as you specify a FILEIN,<br />
FILESIN, or FILEOUT parameter.<br />
• Local parameters can follow a FILEIN, FILESIN, or FILEOUT input line. Use a<br />
semicolon (;) to link the local parameter input lines together. If a semicolon appears<br />
anywhere on a parameter input line except within a comment, the next input line is<br />
considered to be a continuation of the previous line.<br />
• A period (.) with at least one preceding space terminates syntax scanning; therefore,<br />
you can add comments after the period.<br />
• If you do not specify required file attributes with local parameters, the corresponding<br />
global parameter specifications or defaults are assumed except where otherwise<br />
noted.<br />
Example<br />
The following example illustrates the syntax rules for the local SORT processor<br />
parameter specifications:<br />
FILEIN=TAPE1 BLOCK=15,RECORDS MODE=ANSI ; .Input file definition<br />
LABEL=STANDARD<br />
3–8 7831 0687–010
3.2.5. SORT Processor Runstream Example<br />
The SORT Processor<br />
The following example shows a SORT processor runstream that contains several SORT<br />
processor parameters. The parameters included are those that identify<br />
• The type of operation to perform<br />
• The format of the input files and the output file<br />
• The character type of the records<br />
• The key field definitions<br />
The runstream also contains<br />
• Comments<br />
• Global and local parameter types<br />
• A continued parameter specification<br />
Example<br />
@SORT,E . line 1<br />
RECORD=200 . line 2<br />
KEY=1,4,S,D:17,10,S,A . line 3<br />
RSZ=80,CHARACTERS LINKSZ=40,CHARACTERS . line 4<br />
MODE=PRINT . line 5<br />
FILEIN=DATA1 BLOCK=1792,WORDS MODE=SDF ; . line 6<br />
LABEL=OMITTED . line 7<br />
DATA=ASCII . line 8<br />
BIAS=AVG . line 9<br />
. FILEIN=DATA6 MODE=SDF . line 10<br />
FILEOUT=OUTFILE . line 11<br />
SORT . line 12<br />
@EOF . line 13<br />
Explanation<br />
Line 1 Call the reentrant SORT processor.<br />
Line 2 Specify the global RECORD (see 3.3.49) parameter.<br />
Line 3 Specify the global KEY (see 3.3.31) parameter.<br />
Line 4 Specify the RSZ (see 3.3.54) and LINKSZ (see 3.3.36) global parameters. Notice that<br />
you can specify multiple global parameters on the same input line.<br />
Line 5 Specify a global MODE (see 3.3.40) parameter.<br />
Lines 6–7 Specify an input file with the FILEIN parameter (see 3.3.25). Also specify the local<br />
parameters BLOCK (see 3.3.4), MODE, and LABEL (see 3.3.33). The local MODE<br />
parameter overrides the global MODE parameter specified in line 5. Notice the use<br />
of the continuation character on the input line. This continuation causes the LABEL<br />
parameter on line 7 to become a local parameter to the file DATA1.<br />
Line 8 Specify a global DATA (see 3.3.13) parameter.<br />
Line 9 Specify a global BIAS (see 3.3.3) parameter.<br />
Line 10 The period (.) makes this line a comment.<br />
7831 0687–010 3–9
The SORT Processor<br />
Line 11 Specify the output file with the FILEOUT parameter (see 3.3.26). This output file’s<br />
mode is PRINT because the global MODE parameter is specified in line 5.<br />
Line 12 Specify the global SORT parameter (see 3.3.60). This is the default SORT processor<br />
operation.<br />
Line 13 End the input of the parameter specification runstreams by the user and start the<br />
sort operation.<br />
See Appendix B for additional SORT processor examples.<br />
3.2.6. SORT Processor Parameter Groups<br />
The SORT processor operates through a number of parameters, which are discussed in<br />
3.3. Two groups of these parameters have special purposes for the SORT processor.<br />
• Operation control parameters<br />
These parameters tell the SORT processor what kind of function to perform. The<br />
default operation control parameter is SORT. These parameters are the following:<br />
− COPY (see 3.3.11)<br />
− ESTIMATE (see 3.3.22)<br />
− MERGE (see 3.3.39)<br />
− RETRIEVE (see 3.3.52)<br />
− SORT (see 3.3.61)<br />
− TAG (see 3.3.65)<br />
When requesting either a SORT or a TAG operation, you can direct the SORT<br />
processor to perform the operation either in a basic mode environment with a basic<br />
mode sort or in an extended mode environment with an extended mode sort. An<br />
extended mode sort takes advantage of the large memory available with the<br />
extended mode environment.<br />
• File identification parameters<br />
Use file identification parameters to define the files used by the SORT processor for<br />
input and output operations. Each parameter has a set of corresponding local<br />
parameters (see 3.2). The file identification parameters are the following:<br />
− FILEIN (see 3.3.25)<br />
− FILEOUT (see 3.3.26)<br />
− FILESIN (see 3.3.27)<br />
3–10 7831 0687–010
3.3. SORT Processor Parameters<br />
The SORT Processor<br />
The following subsections contain an alphabetical listing of the SORT processor<br />
parameters with descriptions.<br />
3.3.1. ACCEPT Parameter<br />
This parameter performs a test to determine which records are processed by the SORT<br />
processor. You can specify up to 200 ACCEPT parameters, but you must list them<br />
consecutively.<br />
Type<br />
Global<br />
Format<br />
ACCEPT=sc,nc,type,test-operation,value[,logical-operation]<br />
where<br />
sc<br />
nc<br />
type<br />
is an integer that indicates at which character position within the data record the<br />
ACCEPT parameter test is to begin. The first character position of a record is<br />
number one (1).<br />
is an integer that specifies the number of characters to be tested.<br />
specifies the kind of data the value field contains. The valid type field specifications<br />
are the following:<br />
ASC<br />
CAS<br />
DEC<br />
The value field is specified in ASCII in the range 0000-0377 and that the sb and<br />
nb fields represent 9-bit characters. This data type is not case sensitive. For<br />
data comparison purposes, lowercase alphabetic characters a-z (0141-0172) will<br />
be folded to uppercase. Thus, characters 0133-0140 will be considered to be<br />
greater than either an uppercase Z or a lowercase z.<br />
The value field is specified in ASCII in the range 0000-0377 and that the sb and<br />
nb fields represent 9-bit characters. For data comparison purposes, uppercase<br />
(0101-0132) and lowercase (0141-0172) letters are treated as unequal.<br />
The value field is specified in decimal and that the sb and nb fields represent<br />
9-bit characters.<br />
7831 0687–010 3–11
The SORT Processor<br />
DECFD<br />
FD<br />
OCT<br />
The value field is specified in decimal and that the sb and nb fields represent<br />
6-bit characters.<br />
The value field is specified in Fieldata and that the sb and nb fields represent<br />
6-bit characters.<br />
The value field is specified in octal and that the sb and nb fields represent 9-bit<br />
characters.<br />
OCTFD<br />
test-operation<br />
The value field is specified in octal and that the sb and nb fields represent 6-bit<br />
characters.<br />
specifies how the test data is compared to the data in the area you are testing. The<br />
valid test-operation field specifications are the following:<br />
E<br />
G<br />
GE<br />
L<br />
value<br />
LE<br />
NE<br />
specifies a test equal operation.<br />
specifies a test greater operation.<br />
specifies a test greater or equal operation.<br />
specifies a test less operation.<br />
specifies a test less or equal operation.<br />
specifies a test not equal operation.<br />
contains the test data to be compared with the part of the record you specify in the<br />
sc and nc fields. If the test data is decimal, it cannot exceed 36 bits and its value<br />
cannot be greater than 68,719,476,734 (0777777777776 octal). If the type field is<br />
ASC or CAS, the test value may be entered as a character string or as a nonnumeric<br />
literal. The literal must not exceed 60 characters (excluding the delimiters). For all<br />
other types of data, this field can be up to 60 characters in length.<br />
3–12 7831 0687–010
The SORT Processor<br />
Note: You can specify a character string containing an embedded space, comma,<br />
or semicolon in one of three ways:<br />
• Use the nonnumeric literal syntax. (Valid only for ASC and CAS data types).<br />
• Specify the entire string as an octal value.<br />
• Specify the characters preceding the space, comma, or semicolon using one<br />
ACCEPT parameter; specify the space, comma, or semicolon character as an octal<br />
value using another ACCEPT parameter; and specify the remaining characters using<br />
a third ACCEPT parameter.<br />
logical-operation<br />
controls the acceptance of records with more than one ACCEPT parameter. The test<br />
operations and the logical operations you specify with the ACCEPT parameters form<br />
a logical expression that determines whether a record is processed by the SORT<br />
processor. If the logical expression is true, the record is accepted and processed.<br />
The valid logical-operation field specifications are the following:<br />
AND<br />
OR<br />
Notes:<br />
consecutive ACCEPT parameters are connected with the logical AND operation.<br />
consecutive ACCEPT parameters are connected with the logical OR operation.<br />
This is the default field specification.<br />
If you omit this field, the OR operation is used for consecutive ACCEPT parameters.<br />
• You cannot specify the ALLOW and REJECT parameters in the same parameter list<br />
with the ACCEPT parameter.<br />
• The ACCEPT parameter replaces the ALLOW and REJECT parameters and offers<br />
you greater capability and flexibility.<br />
3.3.2. ALLOW Parameter<br />
This parameter performs a test that determines which records are processed through<br />
the SORT processor. Records that fail the specified test conditions are ignored and,<br />
therefore, are not sent to the output file. This parameter has been replaced by the<br />
ACCEPT parameter (see 3.3.1).<br />
Type<br />
Global<br />
Format<br />
ALLOW=test-word,test-operation,value,type[,partial-word]<br />
where<br />
7831 0687–010 3–13
The SORT Processor<br />
test-word<br />
is an integer that specifies the word within each record to be tested. The first word<br />
of a record is number 1.<br />
test-operation<br />
specifies how the test data is compared to the data in the area you are testing. The<br />
valid test-operation field specifications are the following values:<br />
E<br />
G<br />
value<br />
type<br />
LE<br />
NE<br />
specifies a test equal operation<br />
specifies a test greater operation<br />
specifies a test less or equal operation<br />
specifies a test not equal operation<br />
is an octal number, a decimal number, or a character string. If it is a character string<br />
that is less than a full word, the string is right-justified and space-filled.<br />
specifies the kind of data the value field contains. The valid type field specifications<br />
are the following:<br />
ASC<br />
CAS<br />
The value field is specified in ASCII (uppercase and lowercase letters will match)<br />
The value field is specified in ASCII (case sensitive; uppercase and lowercase<br />
letters will not match)<br />
DEC or D<br />
FD or C<br />
The value field is specified in decimal<br />
The value field is specified in Fieldata<br />
OCT or O<br />
The value field is specified in octal<br />
3–14 7831 0687–010
partial-word<br />
The SORT Processor<br />
is used to test a specific portion of test-word. The partial-word field is optional; the<br />
valid partial-word specifications are the following:<br />
H1<br />
H2<br />
Q1<br />
Q2<br />
Q3<br />
Q4<br />
S1<br />
S2<br />
S3<br />
S4<br />
S5<br />
S6<br />
Notes:<br />
tests H1 of test-word<br />
tests H2 of test-word<br />
tests Q1 of test-word<br />
tests Q2 of test-word<br />
tests Q3 of test-word<br />
tests Q4 of test-word<br />
tests S1 of test-word<br />
tests S2 of test-word<br />
tests S3 of test-word<br />
tests S4 of test-word<br />
tests S5 of test-word<br />
tests S6 of test-word<br />
• Do not specify more than one ALLOW parameter. If you do specify more than one,<br />
the processor defaults to the last ALLOW parameter you specified.<br />
• To specify a character string containing an embedded space, comma, or semicolon,<br />
you must specify the entire string as an octal value.<br />
• Use the ACCEPT parameter for greater capability and flexibility.<br />
7831 0687–010 3–15
The SORT Processor<br />
3.3.3. BIAS Parameter<br />
This parameter tells the SORT processor how the input data is ordered. The bias of the<br />
data is the volume of data divided by the number of ordered sequences within the data.<br />
Type<br />
Global<br />
Format<br />
BIAS=input-bias<br />
where input-bias is the value that specifies the bias of the data. The variable input-bias<br />
can be either an integer that equals the bias of the data multiplied by 10 or one of the<br />
following field specifications:<br />
AVG<br />
INV<br />
RND<br />
SEQ<br />
the input data is almost in random order, but it has a few ordered sequences. Bias<br />
equals 15. This is the default field specification.<br />
the input data is in approximately reverse order from the way it must be sorted. Bias<br />
equals 10.<br />
the input data is in random order. Bias equals 20.<br />
most records in the input data are in the ordered sequence desired for output. Bias<br />
equals 30.<br />
3.3.4. BLOCK Parameter<br />
This parameter defines the blocking characteristics of the input and output files.<br />
If you do not specify the BLOCK parameter, the block size of the input file is used for the<br />
output file whenever possible. When this is not possible, standard defaults for each file<br />
type are used. The default values are multiples of the prep size of the output file mode<br />
(see PREP in 3.3.46).<br />
Type<br />
Global or local<br />
Format<br />
BLOCK=blocking-factor[,block-granularity]<br />
where<br />
blocking-factor<br />
is an integer that specifies the number of granules within a block.<br />
3–16 7831 0687–010
lock-granularity<br />
The SORT Processor<br />
is used to specify the blocking-factor. This field is optional. The valid blockgranularity<br />
field specifications are the following:<br />
CHARACTERS<br />
specifies that the blocking-factor is characters per block. The A, C, or M SORT<br />
processor options, as well as the DATA parameter, determine whether the<br />
characters are ASCII or Fieldata.<br />
RECORDS<br />
specifies that the blocking-factor is records per block. This is the default field<br />
specification.<br />
WORDS<br />
specifies that the blocking-factor is in words per block.<br />
When an extended mode sort is performed and a Processor Common Input/Output<br />
System (PCIOS) sequential system data format (SDF) mass storage file is used as an<br />
input or output file (see MODE in 3.3.40), the blocking-factor can be increased for<br />
efficiency. No increase occurs if this file resides on tape or the BMBLOCK parameter<br />
(see 3.3.5) is specified as a local parameter with the FILEOUT parameter.<br />
3.3.5. BMBLOCK Parameter<br />
This parameter tells the processor to use the same block size if<br />
• An extended mode or basic mode sort is performed<br />
• The output file is a Processor Common Input/Output System (PCIOS) sequential data<br />
format (SDF) file<br />
Type<br />
Local (FILEOUT parameter only)<br />
Format<br />
BMBLOCK<br />
Description<br />
This parameter is a local parameter to the FILEOUT parameter and is meaningful only<br />
when<br />
• An extended mode sort is performed<br />
• A mass-storage sequential SDF file is created<br />
If an extended mode sort is performed and the BMBLOCK parameter is specified, the<br />
processor uses the same block size that would be used if a basic mode sort were<br />
performed.<br />
7831 0687–010 3–17
The SORT Processor<br />
If you do not specify this parameter and an extended mode sort is performed that results<br />
in a mass-storage sequential SDF file as the output file<br />
• The block size may be increased<br />
• A different block size may be written to the block size field in the label record<br />
3.3.6. CHECK Parameter<br />
This parameter eliminates the checksum operations normally done by the SORT<br />
subroutines modules specified with the CHECKSUM parameter.<br />
Type<br />
Global<br />
Format<br />
CHECK=mod-1[,mod-2][,mod-3][,mod-4]<br />
where mod-1, mod-2, mod-3, and mod-4 are specific portions of the module or level of<br />
mass storage. The valid mod-n field specifications are the following:<br />
D<br />
F<br />
K<br />
T<br />
eliminates the checksum operations for the one-level mass-storage (M1) module.<br />
eliminates the checksum operations for the two-level mass-storage (M2) module.<br />
eliminates the checksum operations for the basic mode disk module. The<br />
CHECKSUM operation is not implemented for the extended mode disk module.<br />
eliminates the checksum operations for the tape module.<br />
3.3.7. CHECKSUM Parameter<br />
This parameter sets a mesh number that tells the SORT processor how often to perform<br />
checksum calculations. The default mesh number is 1, which causes the SORT<br />
processor to sum every word of input or output in the module you specify.<br />
Type<br />
Global<br />
Format<br />
CHECKSUM=mod-1:mesh-1[,mod-2:mesh-2]...[,mod-4:mesh-4]<br />
where<br />
3–18 7831 0687–010
mod-1, mod-2, ..., mod-4<br />
indicates which module the mesh field refers to. The valid mode-n field<br />
specifications are the following:<br />
D<br />
F<br />
K<br />
T<br />
for the one-level mass storage (M1) module.<br />
for the two-level mass storage (M2) module.<br />
The SORT Processor<br />
for the basic mode disk module. The CHECKSUM operation is not performed for<br />
an extended mode disk sort.<br />
for all tape modules.<br />
mesh-1, mesh-2, ..., mesh-4<br />
is an integer that specifies the mesh or interval at which checksum operations are<br />
computed. The normal mesh number is 1, which means that every word in the<br />
module you specify is summed before being written and after being read. By setting<br />
a larger mesh number, you can save time during computation by doing fewer<br />
CHECKSUM operations.<br />
3.3.8. CKPT Parameter<br />
This parameter tells the SORT processor to write a checkpoint of all temporary sort files.<br />
Type<br />
Global<br />
Format<br />
CKPT=ckpt-file[,repeat]<br />
where<br />
ckpt-file<br />
repeat<br />
is the name of a cataloged public file used to write the checkpoint. You must assign<br />
this file before calling the SORT processor.<br />
is an integer that indicates how many checkpoints you want to write. If you omit<br />
repeat, checkpoints are written at the following places:<br />
• At the end of every reel of input for file types ACOB and COBOL File Handler (CFH)<br />
• At the end of every file on mass storage<br />
• After all input files are read but before records are returned<br />
• After the sort is completed<br />
7831 0687–010 3–19
The SORT Processor<br />
3.3.9. CODE-TYPE Parameter<br />
This parameter tells the SORT processor what character set to write in the header of an<br />
SDF, DSDF, or mass storage alternate symbiont file created by the SORT processor.<br />
This parameter is local to the FILEOUT parameter and has meaning for all operations<br />
(that is, COPY, MERGE, SORT, TAG, RETRIEVE, and TAG/RETRIEVE).<br />
Type<br />
Local (FILEOUT parameter only)<br />
Format<br />
CODE-TYPE=code-type<br />
where code-type is an integer value. If the leftmost digit is zero, the SORT processor<br />
assumes that it is an octal number. If the leftmost digit is nonzero, the SORT processor<br />
assumes that a decimal number is being entered. The minimum value that can be<br />
entered is zero; the maximum value is 077. For a list of valid code types, see the ER<br />
<strong>Programming</strong> Reference Manual.<br />
Description<br />
This parameter is a local parameter to the FILEOUT parameter and is meaningful only<br />
when the mode of the output file is CARDS, DSDF, PRINT, or mass storage SDF. This<br />
parameter overrides the DATA parameter (see 3.3.13).<br />
The code type written in the header of an SDF, DSDF, or alternate symbiont file created<br />
by the SORT processor is determined by the following rules:<br />
1. If the CODE-TYPE parameter is specified, the CODE-TYPE parameter value is<br />
written.<br />
2. If the CODE-TYPE parameter is not specified but an I key or LOCALE parameter is<br />
specified, the code type associated with the locale currently in force or the locale<br />
specified by the LOCALE parameter is written. This applies even if the operation is<br />
not a sort or merge.<br />
3. If neither the CODE-TYPE nor LOCALE parameter is specified and the I key type is<br />
not specified, the following rules apply:<br />
a. If the CCSLOCNUM configuration parameter is PREI18N, a value of 0 or 1 is<br />
written depending on the data type (0 if Fieldata, 1 if ASCII).<br />
b. If the CCSLOCNUM configuration parameter is DEFAULT, the code type<br />
associated with the locale specified by the DEFLOCALE configuration parameter<br />
value is written.<br />
c. If the CCSLOCNUM configuration parameter is INPUTDATA, the value of the<br />
input file’s code type is written. If the input files are multi-indexed sequential<br />
access method (MSAM) files, the code type associated with the locale in the<br />
input MSAM file header block is written.<br />
3–20 7831 0687–010
3.3.10. CONSOLE Parameter<br />
The SORT Processor<br />
This parameter tells the SORT processor to issue all operator console messages during<br />
the sort run. This parameter is the opposite of the DELCON parameter (see 3.3.15) and<br />
overrides the CONSOLE configuration parameter (see 9.4).<br />
Type<br />
Global<br />
Format<br />
CONSOLE<br />
3.3.11. COPY Parameter<br />
This parameter tells the SORT processor to perform a COPY operation.<br />
Type<br />
Global<br />
Format<br />
COPY<br />
Description<br />
Allows you to copy up to 24 input files to a single output file. The input files can be<br />
recorded in any of the modes (see 3.3.40) recognized by the SORT processor.<br />
3.3.12. CORE Parameter<br />
This parameter tells the SORT processor how much main storage can be used for the<br />
sorting algorithm. This parameter is used by the SORT processor when determining<br />
whether a basic mode or an extended mode sort will be performed. See Section 2 for a<br />
detailed description of the selection process.<br />
Type<br />
Global<br />
Format<br />
CORE=sort-core-amount[granularity]<br />
where<br />
sort-core-amount<br />
is a decimal number specifying the amount of main storage you want.<br />
7831 0687–010 3–21
The SORT Processor<br />
granularity<br />
specifies what sort-core-amount must be multiplied by. The valid granularity field<br />
specifications are the following:<br />
K<br />
M<br />
the sort-core-amount is multiplied by 1000.<br />
the sort-core-amount is multiplied by 1048576 (or octal 04000000).<br />
If sort-core-amount is immediately followed by a K or M, it can contain a decimal point<br />
and up to two decimal digits. All excess decimal digits are ignored. If a K or M is not<br />
specified, the decimal point is not allowed.<br />
3.3.13. DATA Parameter<br />
This parameter determines the character type of the data processed by the SORT<br />
processor. No conversion of data is done by the SORT processor.<br />
Type<br />
Global<br />
Format<br />
DATA=character-type<br />
where character-type is the character type of the data. The valid field specifications are<br />
the following:<br />
ASCII<br />
9BIT<br />
specifies that all character data is ASCII. This is the default character type if you do<br />
not specify the C or M option on the SORT processor call (see 3.1).<br />
specifies that all character data is 9-bit character data. It does not mean that the<br />
character data is ASCII.<br />
FIELDATA or 6BIT<br />
specifies that all character data is Fieldata. This is the default character type if you<br />
specify the C or M option on the SORT processor call.<br />
Description<br />
The DATA parameter is used to determine the number of characters per word and the<br />
mode to use (Fieldata versus 9-bit) when reading and writing MODE=CARDS and<br />
MODE=PRINT files.<br />
3–22 7831 0687–010
3.3.14. DEFYEAR Parameter<br />
The SORT Processor<br />
This parameter tells the SORT processor which year is the first year of a 100-year<br />
interval to use when ordering a DATE key field (see KEY in 3.3.31 or KEYW in 3.3.32).<br />
Type<br />
Global<br />
Format<br />
DEFYEAR=defyear-value<br />
where defyear-value is an integer in the range 0 to 99 that specifies the first year of a<br />
100-year interval used to order a DATE key field.<br />
Description<br />
If the defyear-value is zero, a DATE key field is ordered from 0 to 99. If the defyear-value<br />
is nonzero, a DATE key field is ordered from defyear-value, defyear-value+1,<br />
defyear-value+2, ... , 99, 00, ... , defyear-value–1. If no DEFYEAR parameter is<br />
specified, a default defyear-value of 28 is used when a DATE key field is ordered.<br />
3.3.15. DELCON Parameter<br />
This parameter tells the SORT processor to delete all operator console messages during<br />
the sort run. This parameter is the opposite of the CONSOLE parameter (see 3.3.10)<br />
and overrides the CONSOLE configuration parameter (see 9.4).<br />
Type<br />
Global<br />
Format<br />
DELCON<br />
3.3.16. DELDUPS Parameter<br />
This parameter tells the SORT processor to delete duplicate records.<br />
Type<br />
Global<br />
Format<br />
DELDUPS<br />
7831 0687–010 3–23
The SORT Processor<br />
Description<br />
The DELDUPS parameter causes a record to be deleted each time records with equal<br />
keys are encountered when comparing records. This parameter is valid only for a sort<br />
operation (see 3.3.60) or a tag operation (see 3.3.64) and is ignored by all other<br />
operations. It is also ignored if a PRESERVE parameter (see 3.3.47) or an OWN<br />
parameter with exit number 32 or 42 (see 3.3.45 and 4.3.9) is specified.<br />
3.3.17. DELLOG Parameter<br />
This parameter tells the SORT processor to delete all normal sort completion messages<br />
from the run log. This parameter is the opposite of the LOG parameter (see 3.3.38) and<br />
overrides the LOG configuration parameter (see 9.11).<br />
Type<br />
Global<br />
Format<br />
DELLOG<br />
3.3.18. DISKS Parameter<br />
This parameter tells the SORT processor that mass storage files are to be used as<br />
scratch files and that a disk sort (see 10.2.2) will be performed.<br />
Type<br />
Global<br />
Format<br />
DISKS=number-of-files[(min-number,max-number)]<br />
[,equipment-type,granularity,file-size[(min-size,max-size, est-number)]]<br />
where<br />
number-of-files<br />
is an integer between 3 and 26, inclusive, which causes a disk sort to be performed.<br />
The disk files are assigned with the names XA, XB, ..., XZ. The first file assigned is<br />
named XC if the number-of-files is 3 through 24; the first file is named XB if the<br />
number-of-files is 25; and the first file is named XA if the number-of-files is 26. If you<br />
assign these names to any disk files before calling the SORT processor, they are<br />
used as scratch files.<br />
min-number and max-number<br />
identify the range of the number of disk files that can be used to perform the sort.<br />
These fields are only used with the ESTIMATE operation (see 3.3.22).<br />
3–24 7831 0687–010
equipment-type<br />
The SORT Processor<br />
specifies any valid sector-formatted mass storage @ASG equipment type. If you<br />
omit this field, the DEFDK configuration parameter (see 9.6) is assumed.<br />
granularity<br />
specifies granularity, with the following valid field specifications:<br />
POS<br />
TRK<br />
file-size<br />
specifies position granularity.<br />
specifies track granularity; this is the default field specification.<br />
is an integer specifying the number of granules to be assigned.<br />
The maximum value allowed for this field is 262,143. If a value greater than 262,143<br />
is specified and the granularity field is not specified or specifies TRK, the granularity<br />
will be changed to positions and the file size converted to the position equivalent. If<br />
a value greater than 262,143 is specified and the granularity field specifies POS, a<br />
value of 262,143 will be used.<br />
min-size and max-size<br />
are integers referring to the size of the disk files and are expressed as a range of the<br />
number of granules per file. These fields are optional and used only with the<br />
ESTIMATE operation (see 3.3.22).<br />
The maximum value allowed for this field is 262,143. If a value greater than 262,143<br />
is specified and the granularity field is not specified or specifies TRK, the granularity<br />
will be changed to positions and the file size converted to the position equivalent. If<br />
a value greater than 262,143 is specified and the granularity field specifies POS, a<br />
value of 262,143 will be used.<br />
est-number<br />
refers to the number of estimates you want within the file size range you specify.<br />
This field is used only with the ESTIMATE operation (see 3.3.22).<br />
3.3.19. DRUM Parameter<br />
This parameter tells the SORT processor about the file that is to be used as a scratch file<br />
for the one-level mass storage (M1) module (see 10.2.3).<br />
Type<br />
Global<br />
Format<br />
DRUM=equipment-type[,granularity[,file-size[(min-size,max-size,est-number)]]]<br />
where<br />
7831 0687–010 3–25
The SORT Processor<br />
equipment-type<br />
specifies an @ASG value for sector-formatted mass storage, high-speed disk, or<br />
word-addressable drum equipment types. If you specify a word-addressable drum,<br />
the specified file size is treated as words regardless of the granularity specified. If<br />
you omit this field, the DEFXA configuration parameter (see 9.9) is assumed.<br />
granularity<br />
specifies granularity, with the following valid field specifications:<br />
POS<br />
TRK<br />
file-size<br />
specifies position granularity.<br />
specifies track granularity; this is the default field specification.<br />
is an integer specifying the number of granules to be assigned.<br />
For a sector-formatted mass storage file, the maximum value for this field is<br />
262,143. If a value greater than 262,143 is specified and the granularity field is not<br />
specified or specifies TRK, the granularity will be changed to positions and the file<br />
size converted to the position equivalent. If a value greater than 262,143 is specified<br />
and the granularity field specifies POS, a value of 262,143 will be used.<br />
For a word-addressable drum file where the granularity field is not specified or<br />
specifies TRK, the maximum value for this field is 469,760,256. If a value greater<br />
than 469,760,256 is specified, the granularity will be changed to positions. If the<br />
granularity field specifies POS, the maximum value for this field is 30,064,656,384.<br />
If a value greater than 30,064,656,384 is specified, a value of 30,064,656,384 will be<br />
used.<br />
min-size and max-size<br />
are integers referring to the size of the disk files and are expressed as a range of the<br />
number of granules per file. These fields are optional and only used with the<br />
ESTIMATE operation (see 3.3.22).<br />
For a sector-formatted mass storage file, the maximum value for this field is<br />
262,143. If a value greater than 262,143 is specified and the granularity field is not<br />
specified or specifies TRK, the granularity will be changed to positions and the file<br />
size converted to the position equivalent. If a value greater than 262,143 is specified<br />
and the granularity field specifies POS, a value of 262,143 will be used.<br />
For a word-addressable drum file where the granularity field is not specified or<br />
specifies TRK, the maximum value for this field is 469,760,256. If a value greater<br />
than 469,760,256 is specified, the granularity will be changed to positions. If the<br />
granularity field specifies POS, the maximum value for this field is 30,064,656,384.<br />
If a value greater than 30,064,656,384 is specified, a value of 30,064,656,384 will be<br />
used.<br />
3–26 7831 0687–010
est-number<br />
The SORT Processor<br />
is an integer referring to the number of estimates you want within the file size range<br />
you specify. This field is used only with the ESTIMATE operation (see 3.3.22).<br />
3.3.20. EQUIP Parameter<br />
This parameter tells the SORT processor what type of equipment FILEIN, FILESIN, and<br />
the FILEOUT files are assigned to. The EQUIP parameter is only used by the ESTIMATE<br />
parameter (see 3.3.22) and is ignored by all other operations.<br />
Type<br />
Global or local<br />
Format<br />
EQUIP=equipment-type<br />
where equipment-type can be any of the valid @ASG values for mass storage (see the<br />
ER <strong>Programming</strong> Reference Manual) or tape assignments.<br />
3.3.21. ESORT Parameter<br />
This parameter tells the SORT processor to unconditionally perform an extended mode<br />
memory or disk sort.<br />
Type<br />
Global<br />
Format<br />
ESORT<br />
Description<br />
The ESORT parameter cannot be specified in the following cases:<br />
• The DRUM (see 3.3.19) , FAST (see 3.3.23), or TAPES (see 3.3.66) parameter is<br />
specified<br />
• The X option is used on the SORT processor call statement<br />
• A sort scratch file is assigned to a tape device or a one-level (M1) or a two-level (M2)<br />
mass storage sort is requested by scratch file assignment prior to the SORT<br />
processor call.<br />
Note: This parameter is ignored when requesting a MERGE, COPY, or RETRIEVE<br />
operation without the TAG operation.<br />
7831 0687–010 3–27
The SORT Processor<br />
3.3.22. ESTIMATE Parameter<br />
This parameter tells the SORT processor to perform a time estimate for the operation.<br />
The ESTIMATE operation can be performed in conjunction with a SORT or TAG<br />
operation.<br />
Type<br />
Global<br />
Format<br />
ESTIMATE[=estimate-option]<br />
where estimate-option is optional. It controls the amount of estimate information that is<br />
printed by the SORT processor and can be one of the following values:<br />
L<br />
N<br />
S<br />
Description<br />
provides a complete listing of the information generated by the ESTIMATE<br />
operation.<br />
provides a time estimate only. This is the default option.<br />
provides a short listing of the information generated by the ESTIMATE operation.<br />
The ESTIMATE operation does not assign scratch files. If you do not assign scratch files,<br />
and none are specified using the DISKS (see 3.3.18), DRUM (see 3.3.19), FAST (see<br />
3.3.23), or TAPES (see 3.3.66) parameters, the SORT processor determines the files that<br />
are needed and bases its estimate on those values.<br />
Estimates for sorts using tape scratch files must use the TAPES parameter to show the<br />
number and type of tapes assigned. Other sort types can use the appropriate parameter<br />
or can assign the actual scratch files.<br />
The SORT (see 3.3.60) or TAG (see 3.3.64) operation you specify is not actually<br />
performed until you remove the ESTIMATE parameter from the parameter list.<br />
Notes:<br />
• If you use the ESTIMATE parameter, you do not have to assign the input files or the<br />
output file before calling the SORT processor.<br />
• When you use the ESTIMATE parameter, you must specify the record size with the<br />
RSZ parameter (see 3.3.54) and the block size for the input and output files with the<br />
BLOCK parameter (see 3.3.4).<br />
3–28 7831 0687–010
3.3.23. FAST Parameter<br />
The SORT Processor<br />
This parameter tells the SORT processor about the file to be used as the scratch file for<br />
the two-level mass storage (M2) module (see 10.2.3).<br />
Type<br />
Global<br />
Format<br />
FAST=equipment-type[,granularity[,file-size[(min-size,max-size,est-number)]]]<br />
where<br />
equipment-type<br />
specifies an @ASG value for a sector-formatted mass storage equipment type. If<br />
you omit this field, the DEFXB configuration parameter (see 9.10) is assumed.<br />
granularity<br />
specifies granularity, with the following valid field specifications:<br />
POS<br />
TRK<br />
file-size<br />
specifies position granularity.<br />
specifies track granularity; this is the default field specification.<br />
is an integer specifying the number of granules to be assigned.<br />
The maximum value allowed for this field is 262,143. If a value greater than 262,143<br />
is specified and the granularity field is not specified or specifies TRK, the granularity<br />
will be changed to positions and the file size converted to the position equivalent. If<br />
a value greater than 262,143 is specified and the granularity field specifies POS, a<br />
value of 262,143 will be used.<br />
min-size and max-size<br />
are integers specifying the size of the disk files and are expressed as a range of the<br />
number of granules per file. These fields are optional and only used with the<br />
ESTIMATE operation (see 3.3.22).<br />
If a value greater than 262,143 is specified and the granularity field is not specified or<br />
specifies TRK, the granularity will be changed to positions and the file size converted<br />
to the position equivalent. If a value greater than 262,143 is specified and the<br />
granularity field specifies POS, a value of 262,143 will be used.<br />
est-number<br />
is an integer specifying the number of estimates you want within the file size range.<br />
This field is optional and is only used with the ESTIMATE operation (see 3.3.22).<br />
7831 0687–010 3–29
The SORT Processor<br />
3.3.24. FILEID Parameter<br />
This parameter tells the SORT processor that the identifier for the file should be set or<br />
reset to file-id. This parameter is used for files with a mode of ACOB, ANSI, DSDF,<br />
MSAM, or SDF.<br />
Type<br />
Local<br />
Format<br />
FILEID=file-id<br />
where file-id is the name of the file identifier with the maximum size of 17 characters. It<br />
can be specified as either a character string or nonnumeric literal.<br />
The FILEID parameter values are ignored for files with a mode other than ACOB, ANSI,<br />
DSDF, MSAM, or SDF.<br />
3.3.25. FILEIN Parameter<br />
This parameter specifies an input file to the SORT processor and is required for all<br />
operations. This is one of the parameters referred to as a file identification parameter.<br />
Format<br />
FILEIN=input-file-name[,input-option]<br />
where<br />
input-file-name<br />
is a 1- to 12-character internal file name.<br />
input-option<br />
can be one of the following specifications:<br />
F or FREE<br />
HOLD<br />
releases the input file from the run after the input has been read from the file.<br />
You cannot use this option if a RETRIEVE operation is specified because the<br />
input file is needed for output processing.<br />
used in conjunction with the SAVE option to specify the tape files to read or<br />
write through the same tape unit. The HOLD option must appear on all FILEIN<br />
parameters that use the same tape unit that the FILEIN parameter with the<br />
SAVE option uses. The REELS parameter is ignored unless the HOLD option<br />
appears on the FILEIN parameter.<br />
3–30 7831 0687–010
The SORT Processor<br />
The SORT processor assigns the specified tape file when it is needed for an<br />
input operation. The SORT processor uses the same assignment options used<br />
to assign the original tape file. If the tape file is not cataloged, use the REELS<br />
parameter to specify the reel numbers of the tapes to be mounted. HOLD<br />
cannot be used with the MERGE parameter (see 3.3.39) or with the Z processor<br />
call option.<br />
NORWD<br />
specifies that no rewind operation is to take place before beginning any input<br />
operations.<br />
NORWDX<br />
RWD<br />
RWDI<br />
SAVE<br />
UNLD<br />
Description<br />
specifies that no rewind operation is to take place before beginning any input<br />
operation or after completing all input operations.<br />
specifies that the input tape is to be rewound before any input operations occur.<br />
This is the default operation before starting any input operations from tape.<br />
is the same as RWD except that the tape is rewound with interlock, meaning<br />
that operator intervention is needed to allow further access to the tape.<br />
saves the tape unit for future input or output operations. You must assign the<br />
specified tape file to the run before calling the SORT processor.<br />
You can assign a single tape unit to handle all tape I/O. All tapes must be<br />
compatible. The SAVE option can appear on only one FILEIN parameter.<br />
is the same as the F or FREE options.<br />
The following conditions apply to all input files:<br />
• You must assign to the run any mass storage file you specify before you call the<br />
SORT processor.<br />
• If you specify a mass storage file with a maximum granule value greater than 4095<br />
positions, the MODE of the file must be either CARDS, DSDF, PRINT, or SDF.<br />
• You must assign to the run any tape file you specify before you call the SORT<br />
processor, unless HOLD appears in the input-option field.<br />
7831 0687–010 3–31
The SORT Processor<br />
3.3.26. FILEOUT Parameter<br />
This parameter specifies the file used for output operations. This is one of the<br />
parameters referred to as a file identification parameter.<br />
Format<br />
FILEOUT=output-file-name[,[output-option],[asg-options],[type],<br />
[packid-reels],[expiration-date if tape]]<br />
where<br />
output-file-name<br />
is a 1- to 12-character internal file name.<br />
output-option<br />
can be one of the following specifications:<br />
F or FREE<br />
HOLD<br />
releases the output file from the run after output completion.<br />
specifies that a tape unit is being held for tape output. To use this option, a<br />
FILEIN parameter must specify the SAVE option. The SORT processor assigns<br />
the tape file at the proper time. It uses the options that were specified when<br />
the tape unit was initially assigned to the run.<br />
If the tape is not cataloged, the REELS parameter must be used to specify the<br />
reel numbers of the output tape file. HOLD is ignored if the syntax for dynamic<br />
assignment is given.<br />
NORWD<br />
RWD<br />
RWDI<br />
UNLD<br />
specifies that the output tape is not rewound after output completion.<br />
specifies that the tape file is rewound after output operations are completed.<br />
This is the default operation for a tape file.<br />
is the same as RWD except that the tape is rewound with interlock, meaning<br />
that operator intervention is required to allow further access to the tape.<br />
specifies that the tape drive is released after output completion. This is the<br />
same as the F or FREE option.<br />
3–32 7831 0687–010
Description<br />
The SORT Processor<br />
The assign syntax fields (asg-options, type, packid-reels, and expiration-date) should<br />
appear as they would for any valid ASG statement (see the ER <strong>Programming</strong> Reference<br />
Manual). The total length of these four fields is limited to 216 characters. When you<br />
specify any of these fields, the SORT processor assigns the file just before returning the<br />
records.<br />
Use the REELS parameter when a HOLD option and no assign syntax appear on the<br />
FILEOUT parameter.<br />
The following conditions apply to the output files:<br />
• If you specify a mass storage file, you must assign it to the run before calling the<br />
SORT processor, unless you specify the assign syntax to dynamically assign the file<br />
or the ESTIMATE operation is specified (see 3.3.22).<br />
• If you specify a mass storage file with a maximum granule value greater than 4095<br />
positions, the MODE of the file must be either CARDS, DSDF, PRINT, or SDF.<br />
• If you provided a tape file, you must assign it to the run before calling the SORT<br />
processor unless HOLD appears in the output-option field or the syntax for dynamic<br />
assignment is provided, or the ESTIMATE operation is specified (see 3.3.22).<br />
3.3.27. FILESIN Parameter<br />
This parameter specifies the files used for input operations. This is one of the<br />
parameters referred to as a file identification parameter.<br />
Format<br />
FILESIN=input-file-name-1[,input-file-name-2,...,input-file-name-24]<br />
where input-file-name-1, input-file-name-2, ..., input-file-name-24 specify one to 24 input<br />
files that have equal record lengths.<br />
Description<br />
You must assign the input files prior to calling the SORT processor unless the ESTIMATE<br />
operation is specified (see 3.3.22). If you specify a mass storage file with a maximum<br />
granule value of greater than 4095 positions, the MODE of the file must be CARDS,<br />
DSDF, PRINT, or SDF.<br />
3.3.28. ISKEY Parameter<br />
This parameter specifies an ascending index key for an indexed sequential-access<br />
method (ISAM) output file. You must specify the ISKEY or the ISKEYW parameter for an<br />
ISAM output file.<br />
Type<br />
Global<br />
7831 0687–010 3–33
The SORT Processor<br />
Format<br />
ISKEY=sc,nc<br />
where<br />
sc<br />
nc<br />
is an integer specifying the start character of the index key within the ISAM file. The<br />
first character position of a record is number one (1).<br />
is an integer specifying the number of characters of the index key within the ISAM<br />
file. The SORT processor determines whether the characters are ASCII or Fieldata<br />
using the DATA parameter or the A, C, or M SORT processor call options.<br />
Note: This parameter is related to ISAM files. Use of this type of file is no longer<br />
recommended. <strong>Support</strong> of this parameter and ISAM files may be dropped in a future<br />
release. MSAM files are the recommended replacement for ISAM files. No<br />
enhancement will be made for ISAM files.<br />
3.3.29. ISKEYW Parameter<br />
This parameter specifies an ascending index key for an ISAM output file. You must<br />
specify the ISKEY or ISKEYW parameter for an ISAM output file.<br />
Type<br />
Global<br />
Format<br />
ISKEYW=sw,sb,nb<br />
where<br />
sw<br />
sb<br />
nb<br />
is an integer specifying the start word of the index key within the ISAM file. The first<br />
word within a record is number one (1).<br />
is an integer specifying the start bit of the index key within the ISAM file. The most<br />
significant, or leftmost bit of a word is number 35; the least significant, or rightmost<br />
bit is number 0.<br />
is an integer specifying the length, in bits, of the index key in the ISAM file.<br />
Note: This parameter is related to ISAM files. Use of this type of file is no longer<br />
recommended. <strong>Support</strong> of this parameter and ISAM files may be dropped in a future<br />
release. MSAM files are the recommended replacement for ISAM files. No<br />
enhancement will be made for ISAM files.<br />
3–34 7831 0687–010
3.3.30. JOIN Parameter<br />
The SORT Processor<br />
This parameter combines index keys with their corresponding ISAM input records.<br />
Type<br />
Local (FILEIN or FILESIN only)<br />
Format<br />
JOIN<br />
Description<br />
Use the JOIN parameter with ISAM input files whose index key data does not reside in<br />
the records. If the index key data resides in both the records and the index key area, the<br />
use of this parameter is redundant.<br />
JOIN places the key and the record one right after the other within the record, leaving no<br />
slack bits. Therefore, if the key size is not a multiple of a whole character, the data to<br />
the right of the key in the record is misaligned with the character boundaries. Once you<br />
use JOIN, any further parameters apply to the combined form of the record.<br />
Note: This parameter is related to ISAM files. Use of this type of file is no longer<br />
recommended. <strong>Support</strong> of this parameter and ISAM files may be dropped in a future<br />
release. MSAM files are the recommended replacement for ISAM files. No<br />
enhancement will be made for ISAM files.<br />
3.3.31. KEY Parameter<br />
This parameter tells the SORT processor that a certain part of each record is to be<br />
treated as a key field. The KEY parameter has no effect when the OWN parameter with<br />
exit codes 14 or 21 is also specified.<br />
Type<br />
Global<br />
Format<br />
KEY=sc1,nc1,type1[(subtype1)],ad1[,fldn1]:...:sc64,nc64,type64[(subtype64)],<br />
ad64[,fldn64]<br />
where<br />
sc1, ..., sc64<br />
are integers indicating the starting character of the key field. The first character<br />
position of a record is number one (1).<br />
nc1, ..., nc64<br />
are integers indicating the length, in characters, of the key field. The SORT<br />
processor determines whether the characters are ASCII or Fieldata using the DATA<br />
parameter or the A, C, or M SORT processor call options. If a DATE key type is<br />
specified, the length of the key field must be at least 2.<br />
7831 0687–010 3–35
The SORT Processor<br />
type1, ..., type64<br />
specifies the key type. The valid type field specifications are the following:<br />
A<br />
B<br />
CH<br />
D<br />
DATE<br />
G<br />
I<br />
J<br />
L<br />
M<br />
P<br />
Q<br />
R<br />
S<br />
specifies that the key is Fieldata alphanumeric.<br />
specifies that the key is signed binary.<br />
specifies that the key is type A or S, depending upon the character type of the<br />
records.<br />
specifies that the key is Fieldata sign-leading separate decimal.<br />
specifies that the key is ASCII alphanumeric containing a date where the first 18<br />
bits represent a year.<br />
specifies that the key is Fieldata sign-trailing separate decimal.<br />
specifies that the key contains 9-bit data and that an international sort or merge<br />
should be performed. The data will be ordered according to the rules of the<br />
locale.<br />
specifies that the key is signed packed decimal.<br />
specifies that the key is Fieldata sign-leading overpunched decimal.<br />
specifies that the key is IBM fixed-point binary.<br />
specifies that the key is Fieldata sign-trailing overpunched decimal.<br />
specifies that the key is ASCII sign-trailing overpunched decimal.<br />
specifies that the key is ASCII sign-leading separate decimal.<br />
specifies that the key is ASCII alphanumeric.<br />
3–36 7831 0687–010
T<br />
U<br />
V<br />
specifies that the key is ASCII sign-trailing separate decimal.<br />
specifies that the key is unsigned binary.<br />
specifies that the key is ASCII sign-leading overpunched decimal.<br />
subtype1, ..., subtype64<br />
The SORT Processor<br />
specifies additional information about the type of the key. The optional subtype field<br />
specification is only valid when the type field specifies I. The valid subtype field<br />
specifications for I keys are the following:<br />
IGNORETSP<br />
specifies that trailing spaces within the I key field should be ignored when<br />
ordering the records.<br />
INCLUDETSP<br />
ad1, ..., ad64<br />
specifies that trailing spaces within the I key field should be included when<br />
ordering the records. If the subtype field is not specified for an I key type, this is<br />
the default specification.<br />
specifies the sort or merge sequence. The valid ad field specifications are the<br />
following:<br />
A<br />
D<br />
fldn1, ..., fldn64<br />
specifies an ascending sort or merge sequence<br />
specifies a descending sort or merge sequence<br />
are integers specifying the significance of the key fields from 1 to 64, or major to<br />
minor. If you use this field on one key field definition, you must use it on all key field<br />
definitions.<br />
If you do not specify fldn fields, the first key field defined is considered the major<br />
key, and any subsequent key fields defined are minor keys.<br />
Description<br />
Key fields specified by the KEY or KEYW parameters are required for all merge and sort<br />
operations unless an OWN parameter with an exit number 14 or 21 is specified. The<br />
KEY parameter is used to define key fields based on a start character within the record<br />
and a character length. Whereas, the KEYW parameter defines key fields based on a<br />
start word and bit within the record and a bit length.<br />
7831 0687–010 3–37
The SORT Processor<br />
Key fields can overlap. If they do, you must observe the rules for overlapping key types<br />
as shown in Table 3–2.<br />
Table 3–2. Overlapping Types<br />
If the major key is ... Then the overlapping minor key types can be only ...<br />
A, D, G, L, or P A* or U<br />
B, J, M, or U U<br />
I B, I, Q, R, S, T, U, or V<br />
DATE, Q, R, S, T, or V S** or U<br />
* The overlapping minor key type can be A only if an alternate Fieldata collating sequence is<br />
not specified.<br />
** The overlapping key type can be S only if a 128-character or 256-character collating sequence<br />
is not specified.<br />
3.3.32. KEYW Parameter<br />
This parameter tells the SORT processor that a certain part of each record is to be<br />
treated as a key field. The KEYW parameter has no effect when the OWN parameter<br />
with exit codes 14 or 21 is specified.<br />
Type<br />
Global<br />
Format<br />
KEYW=sw1,sb1,nb1,type1[(subtype1)],ad1[,fldn1]:...:sw64,sb64,nb64,<br />
type64[(subtype64)],ad64[,fldn64]<br />
where<br />
sw1, ..., sw64<br />
are integers indicating the starting word number of the key field. The first word of<br />
the record is number one (1).<br />
sb1, ..., sb64<br />
are integers indicating the starting bit number within the start word of the key field.<br />
The leftmost or most significant bit number is 35 and the least significant bit number<br />
is zero (0).<br />
nb1, ..., nb64<br />
is an integer that specifies the number of bits in the key field. If a DATE key type is<br />
specified, the length of the key field must be at least 18.<br />
3–38 7831 0687–010
type1, ..., type64<br />
The SORT Processor<br />
specifies the key type. The valid type field specifications are the following:<br />
A<br />
B<br />
CH<br />
D<br />
DATE<br />
G<br />
I<br />
J<br />
L<br />
M<br />
P<br />
Q<br />
R<br />
S<br />
specifies that the key is Fieldata alphanumeric.<br />
specifies that the key is signed binary.<br />
specifies that the key is type A or S, depending upon the character type of the<br />
records.<br />
specifies that the key is Fieldata sign-leading separate decimal.<br />
specifies that the key is ASCII alphanumeric containing a date where the first 18<br />
bits represent a year.<br />
specifies that the key is Fieldata sign-trailing separate decimal.<br />
specifies that the key contains 9-bit data and that an international sort or merge<br />
should be performed. The data will be ordered according to the rules of the<br />
locale.<br />
specifies that the key is signed packed decimal.<br />
specifies that the key is Fieldata sign-leading overpunched decimal.<br />
specifies that the key is IBM fixed-point binary.<br />
specifies that the key is Fieldata sign-trailing overpunched decimal.<br />
specifies that the key is ASCII sign-trailing overpunched decimal.<br />
specifies that the key is ASCII sign-leading separate decimal.<br />
specifies that the key is ASCII alphanumeric.<br />
7831 0687–010 3–39
The SORT Processor<br />
T<br />
U<br />
V<br />
specifies that the key is ASCII sign-trailing separate decimal.<br />
specifies that the key is unsigned binary.<br />
specifies that the key is ASCII sign-leading overpunched decimal.<br />
subtype1, ..., subtype64<br />
specifies additional information about the type of the key. The optional subtype field<br />
specification is only valid when the type field specifies I. The valid subtype field<br />
specifications for I keys are the following:<br />
IGNORETSP<br />
specifies that trailing spaces within the I key field should be ignored when<br />
ordering the records.<br />
INCLUDETSP<br />
ad1, ..., ad64,<br />
specifies that trailing spaces within the I key field should be included when<br />
ordering the records. If the subtype field is not specified for I key type, this is<br />
the default specification.<br />
specifies the sort or merge sequence. The valid ad field specifications are the<br />
following:<br />
A<br />
D<br />
fldn1, ..., fldn64<br />
specifies an ascending sort or merge sequence<br />
specifies a descending sort or merge sequence<br />
are integers specifying the significance of the key fields from 1 to 64, or major to<br />
minor. If you use this field on one key field definition, you must use it on all key field<br />
definitions.<br />
If you do not specify fldn fields, the first key field defined is considered the major<br />
key, and any subsequent key fields defined are minor keys.<br />
Description<br />
Key fields specified by the KEY or KEYW parameters are required for all merge and sort<br />
operations unless an OWN parameter with an exit number 14 or 21 is specified. The<br />
KEYW parameter defines key fields based on a start word and bit within the record and a<br />
bit length. Whereas, the KEY parameter is used to define key fields based on a start<br />
character within the record and a character length.<br />
Key fields can overlap. If they do, you must observe the rules for overlapping key types<br />
as shown in Table 3–2.<br />
3–40 7831 0687–010
3.3.33. LABEL Parameter<br />
The SORT Processor<br />
This parameter tells the SORT processor what type of label is present or required.<br />
Type<br />
Local or global<br />
Format<br />
LABEL=label-type<br />
where label-type is the type of the label. The valid field specifications are the following:<br />
FORM01<br />
NONE<br />
specifies that the labels are FORM01 type as created by ASCII COBOL<br />
specifies that no labels are present<br />
OMITTED<br />
specifies that the labels have been omitted<br />
STANDARD<br />
specifies that standard labels are present or required; this is the default field<br />
specification<br />
Description<br />
The LABEL parameter specifies whether a file contains or requires a label. If labels are<br />
present, the LABEL parameter specifies the type of label present or required.<br />
3.3.34. LIMDRM Parameter<br />
This parameter provides the SORT processor with the minimum acceptable block size<br />
for the one-level mass storage (M1) module.<br />
Type<br />
Global<br />
Format<br />
LIMDRM=minimum-M1<br />
where minimum–M1 is an integer that specifies the minimum block size in words. If the<br />
SORT processor calculates a block size that is smaller than this value, it prints an error<br />
message and terminates the sort.<br />
7831 0687–010 3–41
The SORT Processor<br />
3.3.35. LIMFST Parameter<br />
This parameter provides the SORT processor with the minimum acceptable block size<br />
for the two-level mass storage (M2) module.<br />
Type<br />
Global<br />
Format<br />
LIMFST=minimum-M2<br />
where minimum-M2 is an integer that specifies the minimum block size in words. If the<br />
SORT processor calculates a block size that is smaller than this value, it prints an error<br />
message and terminates the sort.<br />
3.3.36. LINKSZ Parameter<br />
This parameter tells the SORT processor how much of any variable length record is<br />
significant to the sort operation being performed.<br />
Type<br />
Global<br />
Format<br />
LINKSZ=link-size[,link-granularity]<br />
where<br />
link-size<br />
is an integer that is at least large enough to include all key fields you defined. Link<br />
size is important in determining the efficiency of the memory sort.<br />
link-granularity<br />
specifies the granularity of the link-size field. The following field specification values<br />
are valid:<br />
CHARACTERS<br />
specifies that the link-size field is in characters. The SORT processor determines<br />
whether the characters are ASCII or Fieldata by checking the DATA parameter or<br />
by the A, C, or M SORT processor call options. This is the default field<br />
specification.<br />
WORDS<br />
specifies that the link-size field is in words.<br />
3–42 7831 0687–010
Description<br />
Specify the LINKSZ parameter for all files with variable-length records.<br />
The SORT Processor<br />
Note: For more information on sorting variable-length records, see Section 10.<br />
3.3.37. LOCALE Parameter<br />
This parameter tells the SORT processor which locale to use for an international sort or<br />
merge.<br />
Type<br />
Global<br />
Format<br />
LOCALE=locale-name<br />
where locale-name is the name of the locale. The locale name can consist of 1 to 16<br />
characters from the ISO 8859.1 code set. You can specify it as either a character string<br />
or a nonnumeric literal. No verification is made to determine whether this is the code<br />
set being used to enter the parameter.<br />
The locale name can also be _QUERY or _DEFAULT (case sensitive). When the locale<br />
name is _QUERY the locale currently in force is used in the international sort or merge.<br />
When the locale name is _DEFAULT the default locale in the system is used in the<br />
international sort or merge.<br />
Description<br />
The LOCALE parameter specifies the desired locale for the sort or merge operation.<br />
Only one LOCALE parameter should be specified. In the <strong>Unisys</strong> implementation of<br />
internationalization, each locale name has a locale number associated with it. This locale<br />
number will be written in the header block of an MSAM file for any SORT processor<br />
operations including COPY.<br />
The locale number written in the header of an MSAM file created by the SORT processor<br />
is determined by the following rules:<br />
1. If the LOCALE parameter is specified, the locale number associated with the<br />
LOCALE parameter is written.<br />
2. If the LOCALE parameter is not specified, but an I key is specified, the locale<br />
number associated with the DEFLOCALE configuration parameter is written.<br />
3. If neither the LOCALE parameter nor an I key is specified<br />
a. If the CCSLOCNUM configuration parameter is PREI18N, 0 is written.<br />
b. If the CCSLOCNUM configuration parameter is DEFAULT, the locale number<br />
associated with the DEFLOCALE configuration parameter is written.<br />
c. If the CCSLOCNUM configuration parameter is INPUTDATA, the input files<br />
locale number is written or, if the input files are not MSAM files, 0 is written.<br />
7831 0687–010 3–43
The SORT Processor<br />
3.3.38. LOG Parameter<br />
This parameter tells the SORT processor to issue all normal sort completion messages<br />
to the run log. This parameter is the opposite of the DELLOG parameter (see 3.3.17)<br />
and overrides the LOG configuration parameter (see 9.11).<br />
Type<br />
Global<br />
Format<br />
LOG<br />
3.3.39. MERGE Parameter<br />
This parameter tells the SORT processor to perform a MERGE operation. This is one of<br />
the parameters referred to as an operation control parameter.<br />
Type<br />
Global<br />
Format<br />
MERGE<br />
Description<br />
The MERGE operation informs the SORT processor that up to 24 sorted input files are<br />
being merged into one output file. This operation is based on the KEY or KEYW<br />
parameters (see 3.3.31 and 3.3.32) specified or a user compare routine (the OWN<br />
parameter in 3.3.45 with exit numbers 14 or 21). This parameter requires the<br />
specification of the KEY parameter, the KEYW parameter, or the OWN parameter with<br />
exit number 14 or 21.<br />
3.3.40. MODE Parameter<br />
This parameter tells the SORT processor the file type of the files with which the SORT<br />
processor is working. This parameter applies to both the input and output files.<br />
Type<br />
Global or local<br />
Format<br />
MODE=recording-mode<br />
where recording-mode is the file type. The valid field specifications are the following:<br />
ACOB<br />
specifies ASCII COBOL internal file format on tape or mass storage as defined by<br />
the American National Standard COBOL X3.23-1968. This is the default field<br />
specification.<br />
3–44 7831 0687–010
The SORT Processor<br />
You can create and process ACOB files with the SORT processor or with the ASCII<br />
COBOL processor. Other processors, such as UCS COBOL, cannot process this file<br />
format nor is it supported by the Processor Common Input/Output System (PCIOS).<br />
For more information about ACOB file structure, refer to the OS 1100 ASCII COBOL<br />
Supplementary Reference (UP-8584).<br />
ANSI [,rf]<br />
specifies American National Standard tape format as supported by PCIOS.<br />
The rf field is the ANSI record format. This field is used to determine the block size<br />
for I/O operations on ANSI tape. The valid rf specifications are as follows:<br />
F<br />
S<br />
U<br />
V<br />
specifies fixed record format. In this format, no control information is appended<br />
to the record when it is written. A fixed record format can be either fixed<br />
unblocked or fixed blocked. For fixed unblocked, each data block contains only<br />
one fixed length record. For fixed blocked, each data block holds one or more<br />
fixed-length records with each block having the same number of records. An<br />
exception is the last data block which is smaller if it does not contain the full<br />
number of records.<br />
specifies a segmented record format. A segmented record format can be either<br />
variable unblocked segmented or variable blocked segmented. For a variable<br />
unblocked segmented format, the record is segmented at the block boundary.<br />
Five characters of control information are appended to each record segment.<br />
The first character is the record segment indicator. The remaining four<br />
characters specify the segment length. The data block holds only one segment<br />
of the record. Variable blocked segmented records are similar to variable<br />
unblocked segmented records, however, each block may hold more than one<br />
record segment. It never holds more than one segment of the same record.<br />
specifies undefined record format. No control information is appended to the<br />
record when it is written. Each data block contains only one record and the<br />
records may be variable in length.<br />
specifies variable record format. In this format, four ASCII characters of control<br />
information are appended to each record to indicate its length. A variable record<br />
format can be either variable unblocked or variable blocked. For variable<br />
unblocked, each data block contains only one variable length record. For variable<br />
blocked, each data block contains as many complete records as possible. This is<br />
the default record format field.<br />
Whether the record format is blocked or unblocked is determined by the presence or<br />
absence of the BLOCK parameter (see 3.3.4). If you omit the rf field, the record<br />
format is defined by the presence or absence of the blocking factor.<br />
7831 0687–010 3–45
The SORT Processor<br />
You can produce ANSI files as output from the SORT processor or from another<br />
processor (that is, ASCII COBOL or UCS COBOL). If you create the ANSI tape file<br />
with a processor other than the SORT processor, you should know which default file<br />
characteristics your processor assumes (for example, if the records are variablelength<br />
or fixed-length). You should also know how the particular processor sets up<br />
the records in the file you create.<br />
CARDS<br />
CFH<br />
DSDF<br />
specifies symbiont or alternate symbiont card file format.<br />
specifies COBOL File Handler (CFH) file format on tape or mass storage. This is the<br />
default field specification if the SORT processor call option is C (see 3.1).<br />
specifies direct system data format SDF (DSDF) format as defined by PCIOS, which<br />
is used to read and write DSDF files. DSDF files must be on mass storage.<br />
MSAM[,am,[additional buffers]]<br />
specifies MSAM file format as defined by PCIOS, which is used to read and write<br />
MSAM files. MSAM files must be on mass storage.<br />
The variable am indicates the access mode for the output file. The valid am field<br />
specifications are the following:<br />
D<br />
R<br />
S<br />
specifies dynamic access.<br />
specifies random access. This is the default field specification for COPY<br />
operations.<br />
specifies sequential access. This is the default field specification for all<br />
operations except COPY.<br />
Since records must be in ascending order on the primary key for sequential output,<br />
the sequential access mode automatically changes to random access when one of<br />
the following occurs:<br />
• A descending order sort or an alternative collating sequence is specified on the first<br />
KEY/KEYW parameter.<br />
• The start position of the primary MSKEY/MSKEYW parameter is not equal to the<br />
start position of the first KEY/KEYW.<br />
• The length of the primary MSKEY/MSKEYW is greater than the length of the first<br />
KEY/KEYW.<br />
• A KEY parameter is used with an MSKEYW parameter or a KEYW parameter is used<br />
with an MSKEY parameter.<br />
• A SELECT parameter is specified.<br />
3–46 7831 0687–010
• A user compare routine is specified.<br />
• The type of the first key is not A, CH, S, or U.<br />
PRINT<br />
SDF<br />
The SORT Processor<br />
The am field can be used with either a global or local MODE parameter. However, if<br />
the am field is specified with a local MODE parameter for the FILEIN or FILESIN<br />
parameter, the am option is ignored. If the MODE parameter is global, the am<br />
option is applied to the output file only. If the output file has a mode of MSAM, you<br />
must specify an MSKEY or MSKEYW parameter.<br />
The number of additional buffers is only meaningful for an MSAM output file. The<br />
total number of buffers used is<br />
4 + number of MSKEYS + additional buffers<br />
Zero is used for additional buffers if none are specified. The maximum number of<br />
buffers that can be used is 63.<br />
specifies symbiont or alternate symbiont print file format. The spacing<br />
characteristics are not preserved when symbiont print files are sorted, merged, or<br />
copied.<br />
specifies system data format (SDF) as defined by PCIOS, which is used to read and<br />
write SDF files. SDF files can be on tape or mass storage. Do not specify files<br />
produced by the symbionts as SDF files; specify CARDS or PRINT instead. SDF files<br />
produced by processors such as @DATA, @ED, @CTS, or ExPipe files must be<br />
specified as MODE=SDF. This is the default field specification if the SORT<br />
processor call option is S (see 3.1).<br />
Description<br />
Specify the MODE parameter when you specify SORT processor call options other than<br />
A, C, or S (see 3.1).<br />
See Appendix B for examples using these various file types.<br />
Note: If the MODE specified is either CARDS or PRINT, and the associated file name is<br />
CARDS or PRINT, then standard symbiont input or output is indicated. Input cards must<br />
directly follow the @EOF ending parameter input.<br />
3.3.41. MOVE Parameter<br />
This parameter specifies the number of tape marks that the SORT processor must<br />
bypass before it performs any input operations.<br />
Type<br />
Local (FILEIN or FILESIN only) and global<br />
7831 0687–010 3–47
The SORT Processor<br />
Format<br />
MOVE=move-number<br />
where move-number is an integer that specifies the number of tape marks to bypass.<br />
If you use the MOVE parameter as a global parameter, all input tapes are moved.<br />
3.3.42. MSKEY Parameter<br />
This parameter defines the index keys of a MSAM output file. You must specify either<br />
the MSKEY or MSKEYW parameter for MSAM output files.<br />
Type<br />
Global<br />
Format<br />
MSKEY=sc1,nc1:sc2,nc2[,akt2]:...:sc40,nc40[,akt40]<br />
where<br />
sc1, sc2, ..., sc40<br />
are integers specifying the start character of the index keys in the MSAM file. The<br />
first character position of a record is number one (1).<br />
nc1, nc2, ..., nc40<br />
are integers specifying the length, in characters, of the index key in the MSAM file.<br />
The SORT processor determines whether the characters are ASCII or Fieldata using<br />
the DATA parameter or the A, C, or M SORT processor call options.<br />
akt2, ..., akt40<br />
indicates whether alternate MSAM keys can have duplicates. The valid field<br />
specifications are the following:<br />
D<br />
N<br />
Duplicate keys are allowed; this is the default field specification.<br />
Duplicate keys are not allowed.<br />
If you specify the akt field on the primary key, the field is ignored and a warning<br />
message is issued. The primary key must not have duplicates.<br />
Description<br />
The first MSKEY or MSKEYW definition is the primary index key. The remaining MSKEY<br />
definitions are alternate keys in the order that they appear in the parameter list. You can<br />
define up to 40 index keys with this parameter.<br />
3–48 7831 0687–010
3.3.43. MSKEYW Parameter<br />
The SORT Processor<br />
This parameter defines the index keys of a MSAM output file. You must specify either<br />
the MSKEY or MSKEYW for MSAM output files.<br />
Type<br />
Global<br />
Format<br />
MSKEYW=sw1,sb1,nb1:sw2,sb2,nb2[,akt2]:...:sw40,sb40,nb40[,akt40]<br />
where<br />
sw1, sw2, ..., sw40<br />
are integers specifying the start word of the index keys in the MSAM file. The first<br />
word within a record is number one (1).<br />
sb1, sb2, ..., sb40<br />
are integers specifying the start bit within the start word of the index keys in the<br />
MSAM files. The most significant, or leftmost bit of a word is number 35; the least<br />
significant, or rightmost bit is number 0.<br />
nb1, nb2, ..., nb40<br />
are integers specifying the length, in bits, of the index keys in the MSAM file.<br />
akt2, ..., akt40<br />
indicates whether alternate MSAM keys can have duplicates. The valid field<br />
specifications are the following:<br />
D<br />
N<br />
duplicate keys are allowed; this is default field specification.<br />
duplicate keys are not allowed.<br />
If you specify the akt field on the primary key, the field is ignored and a warning<br />
message is issued. The primary key must not have duplicates.<br />
Description<br />
The first MSKEY or MSKEYW definition is the primary index key. The remaining<br />
MSKEYW definitions are alternate keys in the order in which they appear in the<br />
parameter list. You can define up to 40 index keys with this parameter.<br />
7831 0687–010 3–49
The SORT Processor<br />
3.3.44. NUMREC Parameter<br />
This parameter specifies the number of records to process.<br />
Type<br />
Local (FILEIN or FILESIN only) and global<br />
Format<br />
NUMREC=record-count<br />
where record-count is an integer between 1 and 34,359,738,367 that specifies the<br />
number of records to be processed.<br />
If you use the NUMREC parameter as a local parameter, the number specified applies to<br />
each file on a FILESIN parameter. When the number of records specified has been<br />
processed and more records exist in the input file controlled by the local NUMREC<br />
parameter, a warning will be issued if the NUMRECWARN configuration parameter is set<br />
to ALL or LOCAL (see 9.15).<br />
If you use the NUMREC parameter as a global parameter, the number specified is used<br />
to count the total records processed, not the number of records processed from each<br />
input file. If the number of records specified has been processed and more records exist<br />
in the input file currently being processed or in an unopened input file, a warning will be<br />
issued if the NUMRECWARN configuration parameter is set to ALL or GLOBAL (see<br />
9.15).<br />
3.3.45. OWN Parameter<br />
This parameter causes your routines to be executed instead of certain standard SORT<br />
processor routines. If you use the OWN parameter, you must regenerate the SORT<br />
processor so that it includes your routines (see 4.4). When exit number 32 or 42 is<br />
specified, this parameter overrides the DELDUPS parameter (see 3.3.16). When exit<br />
number 14 or 21 is specified, this parameter overrides the KEY and KEYW parameters.<br />
Type<br />
Global<br />
Format<br />
OWN=exit-1,entry-1:exit-2,entry-2:...:exit-n,entry-n<br />
where<br />
exit-1, exit-2, ..., and exit-n<br />
are integers that specify the exit numbers (see Section 4).<br />
entry-1, entry-2, ..., and entry-n<br />
are the corresponding entry point names for your routines.<br />
3–50 7831 0687–010
3.3.46. PREP Parameter<br />
The SORT Processor<br />
This parameter tells the SORT processor that the mass storage device where the file<br />
resides has a prepping factor requirement that is different from the default prepping<br />
factors.<br />
Type<br />
Global or local<br />
Format<br />
PREP=prepping-factor<br />
where prepping-factor is a prepping factor different from the default factors. This<br />
parameter must be expressed in words and be a multiple of 28.<br />
The default prepping factors, according to file type, are the following.<br />
File Type Prepping Factor in Words<br />
ACOB Equal to the PREPDEFAULT configuration parameter (see 9.18)<br />
ANSI Ignored<br />
ISAM 28 words<br />
MSAM 448 words<br />
SDF, DSDF 112 words<br />
3.3.47. PRESERVE Parameter<br />
This parameter preserves the order of input records that have equal keys.<br />
Type<br />
Global<br />
Format<br />
PRESERVE<br />
Description<br />
The MERGE operation automatically preserves the order of all input records within one<br />
input file, so you do not need to specify the PRESERVE parameter with the MERGE<br />
parameter. If you perform a SORT operation without PRESERVE, input records having<br />
equal keys may not remain in the order they were input to the SORT processor. This<br />
parameter overrides the DELDUPS parameter (see 3.3.16).<br />
7831 0687–010 3–51
The SORT Processor<br />
3.3.48. PROCESSING Parameter<br />
This parameter tells the SORT processor to process (that is, release and return) records<br />
according to a word or bit length.<br />
Type<br />
Global<br />
Format<br />
PROCESSING=value<br />
where the valid value field specifications are the following:<br />
WORD<br />
indicates that SORT will process (that is, release and return) records on a word<br />
oriented basis.<br />
NONWORD<br />
indicates that SORT will process (that is, release and return) records on a nonword<br />
oriented basis. This is the default field specification.<br />
Description<br />
This parameter overrides the value specified in the PROCESSING configuration<br />
parameter (see 9.17). If SORT is processing records on a nonword-oriented basis<br />
and creating a PCIOS SSDF or PCIOS DSDF file, the significant bits in the last word<br />
field will contain a value in the octal range 01 to 044. If SORT is processing records<br />
on a word-oriented basis and creating a PCIOS SSDF or PCIOS DSDF file, the<br />
significant bits in the last word field will always contain a value of octal 044.<br />
The effects of the PROCESSING parameter are undefined when you are creating a<br />
MODE ANSI or MSAM file. The PROCESSING parameter has no meaning when you<br />
are creating a file with a MODE of ACOB, CARDS, CFH, or PRINT, as these files are<br />
word oriented.<br />
3.3.49. RECORD Parameter<br />
This parameter tells the SORT processor approximately how many input records there<br />
are to be sorted.<br />
Type<br />
Global<br />
Format<br />
RECORD=sort-record-count<br />
3–52 7831 0687–010
The SORT Processor<br />
where sort-record-count is an integer between 1 and 1,073,741,823 that specifies the<br />
approximate number of records in thousands of records. For example, if you define sortrecord-count<br />
as 100, the number of input records to be sorted equals approximately<br />
100,000.<br />
If you specify this parameter, scratch files are used more efficiently.<br />
Note: If the number of records specified is too small, the sort operation may not<br />
successfully complete. If the number of records specified is significantly too large,<br />
inefficient or unused scratch files will be assigned.<br />
3.3.50. REELS Parameter<br />
This parameter specifies the tape reel numbers of noncataloged tape files when the<br />
HOLD option is specified.<br />
Type<br />
Local (FILEIN or FILEOUT only)<br />
Format<br />
REELS=reel-number-1,reel-number-2,...,reel-number-20<br />
where reel-number-1, reel-number-2, ..., reel-number-20 are the reel numbers of<br />
noncataloged tape files. You can specify a maximum of 20 reel numbers. You can use<br />
REELS=SCRTCH with the FILEOUT parameter if you are using scratch tapes for output<br />
operations. Do not use REELS=SCRTCH with the FILEIN parameter.<br />
Note: If both the HOLD option and the assign syntax appear on the FILEOUT<br />
parameter, the REELS parameter is ignored (see HOLD in the FILEOUT parameter in<br />
3.3.26).<br />
3.3.51. REJECT Parameter<br />
This parameter performs a test that selectively rejects records from processing by the<br />
SORT processor. The records that are rejected are ignored and are not included in the<br />
output file. This parameter has been replaced by the ACCEPT parameter (see 3.3.1).<br />
Type<br />
Global<br />
Format<br />
REJECT=test-word,test-operation,value,type[, partial-word]<br />
where<br />
test-word<br />
is an integer that specifies the word within each record to be tested. The first word<br />
of a record is number one (1).<br />
7831 0687–010 3–53
The SORT Processor<br />
test-operation<br />
specifies how the test data is compared to the data in the area you are testing. The<br />
valid test-operation field specifications are the following:<br />
E<br />
G<br />
value<br />
type<br />
LE<br />
NE<br />
specifies a test-equal operation.<br />
specifies a test-greater operation.<br />
specifies a test-less-or-equal operation.<br />
specifies a test-not-equal operation.<br />
can be an octal number, a decimal number, or a character string. If it is a character<br />
string that is less than a full word, the string is right-justified and space-filled.<br />
is used to define the type of the value specified. The valid type field specifications<br />
are the following:<br />
ASC<br />
CAS<br />
The value field is specified in ASCII (uppercase and lowercase letters will match).<br />
The value field is specified in ASCII (case sensitive—uppercase and lowercase<br />
letters will not match).<br />
DEC or D<br />
FD or C<br />
The value field is specified in decimal.<br />
The value field is specified in Fieldata.<br />
OCT or O<br />
partial-word<br />
The value field is specified in octal.<br />
is used to test a specific portion of test-word. The partial-word field is optional; the<br />
valid partial-word specifications are the following:<br />
H1<br />
H2<br />
tests H1 of test-word.<br />
tests H2 of test-word.<br />
3–54 7831 0687–010
Q1<br />
Q2<br />
Q3<br />
Q4<br />
S1<br />
S2<br />
S3<br />
S4<br />
S5<br />
S6<br />
Notes:<br />
tests Q1 of test-word.<br />
tests Q2 of test-word.<br />
tests Q3 of test-word.<br />
tests Q4 of test-word.<br />
tests S1 of test-word.<br />
tests S2 of test-word.<br />
tests S3 of test-word.<br />
tests S4 of test-word.<br />
tests S5 of test-word.<br />
tests S6 of test-word.<br />
The SORT Processor<br />
• You can specify only one REJECT parameter. If you specify more than one, the<br />
processor defaults to the last REJECT parameter you specify.<br />
• To specify a character string containing an embedded space comma, or semicolon,<br />
you must specify the entire string as an octal value.<br />
• Use the ACCEPT parameter if you require greater capability and flexibility.<br />
3.3.52. RETRIEVE Parameter<br />
This parameter tells the SORT processor to perform a RETRIEVE operation. This is one<br />
of the parameters referred to as an operation control parameter.<br />
Type<br />
Global<br />
7831 0687–010 3–55
The SORT Processor<br />
Format<br />
RETRIEVE<br />
Description<br />
Use the RETRIEVE parameter in conjunction with the TAG operation (but not necessarily<br />
in the same @SORT call). The SORT processor uses the tag file created during a TAG<br />
operation and defined by the TAGFILE parameter (see 3.3.65) to read records randomly<br />
from the file specified on the FILEIN parameter. The SORT processor then writes these<br />
records to the file specified on the FILEOUT parameter.<br />
You can specify only a single mass storage file with a MODE of ACOB, CFH, DSDF,<br />
ISAM, or MSAM as input for the RETRIEVE and TAG parameters. This file must not be<br />
changed between the time that the TAG operation completes and the time that the<br />
RETRIEVE operation starts.<br />
The RETRIEVE parameter is particularly useful for sorts of very large records with small<br />
key fields. Using the TAG and RETRIEVE parameters, you read the input records twice:<br />
once sequentially and once randomly. You write the output record only once. This may<br />
be faster and more efficient than passing entire records through all phases of the sort.<br />
See Section 10 for more details about efficient sorting.<br />
3.3.53. REVMSAMBLK Parameter<br />
This parameter informs the SORT processor to reverse the meaning of the<br />
MSAMBLOCK configuration parameter (see 9.14) and causes the SORT processor to<br />
create the MSAM file with the appropriate block size.<br />
Type<br />
Local (FILEOUT parameter only)<br />
Format<br />
REVMSAMBLK<br />
Description<br />
This parameter is a FILEOUT local parameter and is meaningful only when the MODE of<br />
the FILEOUT file is MSAM. This parameter affects the block size used to create the<br />
MSAM file by reversing the meaning of the MSAMBLOCK configuration parameter. If<br />
this parameter is specified and the MSAMBLOCK configuration parameter is set to<br />
DEFAULTCALC, the MSAM file is created with the block size specified by the BLOCK<br />
parameter associated with this file rounded to the next prep size. If this parameter is<br />
specified and the MSAMBLOCK configuration parameter is set to BLOCKPARAM, the<br />
MSAM file is created with the greater of the block size specified by the BLOCK<br />
parameter associated with this file rounded to the next prep size or a default minimum<br />
block size calculated by the SORT processor rounded to the next prep size. <strong>Sort</strong> uses<br />
the greater of the following formulas as the calculation of the minimum block size:<br />
or<br />
10 * (maximum record word length + number of MSKEYs with duplicates + 2) + 6<br />
3–56 7831 0687–010
200 * (maximum MSKEY word length + number of alternate MSKEYs + 1) + 8<br />
The SORT Processor<br />
If a BLOCK parameter is not applicable to the FILEOUT parameter, the block size used to<br />
read the first input file is substituted for the block size specified by the BLOCK<br />
parameter associated with this file.<br />
If this parameter is not specified and the MODE of the FILEOUT file is MSAM, the<br />
MSAMBLOCK configuration parameter setting determines the block size used to create<br />
the MSAM file.<br />
3.3.54. RSZ Parameter<br />
This parameter tells the SORT processor the length of the records that it processes.<br />
Type<br />
Global<br />
Format<br />
RSZ=record-size[, record-granularity]<br />
where<br />
record-size<br />
must be an integer that states the number of words, characters, or bits per record.<br />
For fixed-length records, specify the exact record size. For variable length records,<br />
specify the maximum record size.<br />
For ANSI files, the record size you specify on the RSZ parameter must match the<br />
record size that appears in the record control word of the file (see MODE in 3.3.40).<br />
record-granularity<br />
specifies the granularity of the record-size field. The valid record-granularity<br />
specification fields are as follows:<br />
CHARACTERS<br />
specifies that the record-size field is in characters. The SORT processor<br />
determines whether the characters are ASCII or Fieldata by the DATA parameter<br />
or by the A, C, or M SORT processor call options. This is the default field<br />
specification.<br />
WORDS<br />
BITS<br />
specifies that the record-size field is in words.<br />
specifies that the record-size field is in bits.<br />
7831 0687–010 3–57
The SORT Processor<br />
Description<br />
The RSZ parameter is required when the first input file is one of the following:<br />
• Unlabeled<br />
• An index sequential-access method (ISAM) or MSAM file<br />
• An ACOB file and a LINKSZ parameter is given<br />
The SORT processor will determine the record size as indicated in Table 3–3.<br />
Table 3–3. Determining Processor Record Size<br />
Operation Z Option Not Specified Z Option Specified<br />
COPY SELECT The record size is the record size<br />
resulting from the SELECT<br />
parameter.<br />
NO SELECT The word record size is either the<br />
record size of the RSZ parameter<br />
or the record size of the FIRST<br />
input file, whichever is larger. The<br />
number of bits in the last word is<br />
further determined by the longest<br />
record in any input file.<br />
MERGE SELECT The record size is the record size<br />
resulting from the SELECT<br />
parameter.<br />
NO SELECT The record size is either the record<br />
size of the RSZ parameter or the<br />
input file with the largest record<br />
size.<br />
SORT SELECT The record size is the record size<br />
resulting from the SELECT<br />
parameter.<br />
NO SELECT The word record size is either the<br />
record size of the RSZ parameter<br />
or the record size of the FIRST<br />
input file, whichever is larger. The<br />
number of bits in the last word is<br />
further determined by the longest<br />
record in any input file.<br />
The record size is the<br />
record size resulting<br />
from the SELECT<br />
parameter.<br />
The record size is either<br />
the record size of the<br />
RSZ parameter or the<br />
input file with the<br />
largest record size.<br />
The record size is the<br />
record size resulting<br />
from the SELECT<br />
parameter.<br />
The record size is either<br />
the record size of the<br />
RSZ parameter or the<br />
input file with the<br />
largest record size.<br />
The record size is the<br />
record size resulting<br />
from the SELECT<br />
parameter.<br />
The record size is either<br />
the record size of the<br />
RSZ parameter or the<br />
input file with the<br />
largest record size.<br />
3–58 7831 0687–010
3.3.55. SELECT Parameter<br />
This parameter tells the SORT processor how to reformat data records.<br />
Type<br />
Local (FILEIN or FILESIN only) or global<br />
Format<br />
SELECT=sc1,nc1[[, ocp1]:...:sc40,nc40[, ocp40]]<br />
where<br />
sc1, ..., sc40<br />
The SORT Processor<br />
are integers specifying the starting character positions of the select fields within the<br />
input record. The first character position in the record is number one (1).<br />
nc1, ..., nc40<br />
are integers specifying the number of characters in each select field.<br />
ocp1, ..., ocp40<br />
are integers specifying the output character positions that the select fields occupy in<br />
the new record. You can omit the ocp specifications. If you omit an ocp for a<br />
selected field, that field begins immediately after the last character of the previous<br />
field you selected. The resulting record consists of only those fields that you select.<br />
Description<br />
The SELECT parameter tells the SORT processor how to reformat data records by<br />
specifying 1 to 40 fields from the input records to be used to create the output record.<br />
Notes:<br />
• The KEY parameter refers to the fields in the input record before the record is<br />
reformatted according to the specifications of the SELECT parameter.<br />
• You can use the SELECT parameter with the SORT, MERGE, COPY, and TAG<br />
parameters.<br />
• Different SELECT parameters can create different record sizes; however, all records<br />
are space-filled to make them the same size.<br />
• If needed, the SORT processor generates a default global SELECT with one field,<br />
using the RSZ parameter or SELECT record size, whichever is larger.<br />
• Do not use the LINKSZ and SELECT parameters together because SELECT<br />
parameter processing always creates fixed length records.<br />
7831 0687–010 3–59
The SORT Processor<br />
3.3.56. SEQ Parameter<br />
This parameter specifies an alternate collating sequence used with type A key fields (see<br />
3.3.31). This parameter cannot be used with the SEQX parameter with option SEQF<br />
(see SEQX in 3.3.59).<br />
Type<br />
Global<br />
Format<br />
SEQ=n1,n2,n3[,UPTO],ni,nj[,ALL]<br />
where<br />
n1, n2, n3, ni, and nj<br />
UPTO<br />
ALL<br />
are octal values that represent the new collating order for type A key fields. You can<br />
list all 64 values, if necessary. If you do not list them all, you must use the ALL<br />
option to fill in the collating table with the remainder of the values that you do not<br />
explicitly specify.<br />
can be used to specify a range of numbers that is to appear in sequence in the<br />
collating table.<br />
lists all octal values in the collating table that you do not explicitly specify in the n<br />
fields.<br />
3.3.57. SEQA Parameter<br />
This parameter specifies an alternate 128-character collating sequence used with type S<br />
key fields. You use the SEQA parameter just as you use the SEQC parameter, except<br />
that 128 characters are generated. This parameter cannot be used with the SEQC<br />
parameter or with the SEQX parameter with options SEQB, SEQD, SEQE, or SEQK.<br />
Type<br />
Global<br />
Format<br />
SEQA=n1,n2,n3[,UPTO],ni,nj[,ALL]<br />
where<br />
n1, n2, n3, ni, and nj<br />
are octal values that represent the new collating order for type S key fields. You can<br />
list all 128 values, if necessary. If you do not list them all, you must use the ALL<br />
option to fill in the collating table with the remainder of the values that you do not<br />
explicitly specify.<br />
3–60 7831 0687–010
UPTO<br />
ALL<br />
The SORT Processor<br />
can be used to specify a range of numbers that is to appear in sequence in the<br />
collating table.<br />
lists all octal values in the collating table that you do not explicitly specify in the n<br />
fields.<br />
3.3.58. SEQC Parameter<br />
This parameter specifies an alternate 256-character collating sequence used in type S<br />
key fields. You use the SEQC parameter just as you use the SEQA parameter except<br />
that 256 characters are generated. The SEQC parameter cannot appear in the same<br />
parameter list as the SEQA parameter or with the SEQX parameter with options SEQB,<br />
SEQD, SEQE, or SEQK.<br />
Type<br />
Global<br />
Format<br />
SEQC=n1,n2,n3[,UPTO],ni,nj[,ALL]<br />
where<br />
n1, n2, n3, ni, and nj<br />
UPTO<br />
ALL<br />
are octal values that represent the new collating order for type S key fields. You can<br />
list all 256 values, if necessary. If you do not list them all, you must use the ALL<br />
option to fill in the collating table with the remainder of the values that you do not<br />
explicitly specify.<br />
can be used to specify a range of numbers that is to appear in sequence in the<br />
collating table.<br />
lists all octal values in the collating table that you do not explicitly specify in the n<br />
fields.<br />
3.3.59. SEQX Parameter<br />
This parameter generates automatic character collating sequences of 64, 128, or 256<br />
characters. The generated collating sequence is defined by the seq-type.<br />
The SEQX parameter with the SEQF seq-type cannot appear in the same parameter list<br />
as the SEQ parameter. Also, the SEQX parameter with the SEQB, SEQD, SEQE, or<br />
SEQK seq-type cannot appear in the same parameter list as the SEQA or SEQC<br />
parameters.<br />
7831 0687–010 3–61
The SORT Processor<br />
Type<br />
Global<br />
Format<br />
SEQX=seq-type<br />
where seq-type defines the collating sequence generated. The collating sequence is<br />
defined with the following specifications:<br />
SEQB<br />
SEQD<br />
SEQE<br />
SEQF<br />
SEQK<br />
generates a 128-character table for use with all type S keys. The sequence<br />
generated is space, letters (A,a,B,b...Z,z), and numbers, followed by all special<br />
characters from 0 to 0177 octal.<br />
generates a 256-character sequence used with all type S keys. The sequence<br />
generated is the same as for the SEQB parameter except that the last character is<br />
0377 octal.<br />
generates a 256-character sequence used by all type S keys. The sequence<br />
generated follows the EBCDIC collating sequence.<br />
specifies a Fieldata collating sequence that is used with all type A keys. The<br />
sequence generated is space, letters, numbers, followed by all special characters<br />
starting with 0 and ending with 077 octal.<br />
generates a 256-character sequence used by all type S keys. The sequence<br />
generated is the normal katakana character sequence.<br />
Note: Two SEQX parameters can appear in the same parameter list only if one of the<br />
SEQX parameters specifies the seq-type SEQF while the other SEQX parameter<br />
specifies a SEQB, SEQD, SEQE, or SEQK seq-type.<br />
3.3.60. SKIPL Parameter<br />
This parameter tells the SORT processor to skip a certain number of logical records<br />
before taking records as sort input.<br />
Type<br />
Local (FILEIN or FILESIN only) or global<br />
Format<br />
SKIPL=logical-records<br />
3–62 7831 0687–010
The SORT Processor<br />
where logical-records is an integer between 1 and 34,359,738,367 that specifies the<br />
number of records to skip. Its value is unrelated to the record blocking factor. You can<br />
use the SKIPL parameter to skip both fixed and variable length records on input.<br />
If you use the SKIPL parameter as a global parameter, the number you specify refers to<br />
the total input skip count, not the skip count for each input file.<br />
3.3.61. SORT Parameter<br />
This parameter tells the SORT processor to perform a sort operation. This is one of the<br />
parameters referred to as an operation control parameter; it is the default operation<br />
control parameter.<br />
Type<br />
Global<br />
Format<br />
SORT<br />
Description<br />
When performing a SORT operation, you can supply additional information with other<br />
SORT processor parameters. If you do not specify an operation control parameter, the<br />
SORT processor assumes the operation is SORT. As many as 24 files can be used for<br />
input.<br />
This operation is based on the KEY or KEYW parameters (see 3.3.31 and 3.3.32)<br />
specified or a user compare routine (the OWN parameter in 3.3.45 with exit numbers 14<br />
or 21). This parameter requires the specification of the KEY parameter, the KEYW<br />
parameter, or the OWN parameter with exit number 14 or 21.<br />
3.3.62. SPLIT Parameter<br />
This parameter separates the index key from the record when the record is output to an<br />
ISAM file. This avoids duplication of the index key in the record and index areas of the<br />
ISAM file.<br />
Type<br />
Local (FILEOUT parameter only)<br />
Format<br />
SPLIT<br />
Description<br />
The SORT processor copies the index key from the part of the record defined by the<br />
ISKEY or ISKEYW parameters. It then moves the rest of the record into the area that<br />
formerly contained the index key. If the index key size is not a multiple of a whole<br />
character, the part of the record that is moved is misaligned with the character<br />
boundaries.<br />
7831 0687–010 3–63
The SORT Processor<br />
Any other parameters you specify (for example ALLOW, RSZ, and SELECT) apply to the<br />
original form of the record before the index key was separated.<br />
Note: This parameter is related to ISAM files. Use of this type of file is no longer<br />
recommended. <strong>Support</strong> of this parameter and ISAM files may be dropped in a future<br />
release. MSAM files are the recommended replacement for ISAM files. No<br />
enhancement will be made for ISAM files.<br />
3.3.63. STOP Parameter<br />
The STOP processor parameter allows you to conditionally stop the processing of input<br />
records when a specified condition is met.<br />
Type<br />
Global<br />
Format<br />
STOP=sc,nc,type,test-operation,value[, logical-operation]<br />
where<br />
sc<br />
nc<br />
type<br />
is an integer that indicates at which character position within the data record the<br />
STOP parameter test is to begin. The first character position of a record is number<br />
one (1).<br />
is an integer that specifies the number of characters to be tested.<br />
specifies the kind of data the value field contains. The valid type field specifications<br />
are the following:<br />
ASC<br />
CAS<br />
DEC<br />
The value field is specified in ASCII in the range 0000-0377 and that the sb and<br />
nb fields represent 9-bit characters. This data type is not case sensitive. For<br />
data comparison purposes, lowercase alphabetic characters a-z (0141-0172) will<br />
be folded to uppercase. Thus, characters 0133-0140 will be considered to be<br />
greater than either an uppercase Z or a lowercase z.<br />
The value field is specified in ASCII in the range 0000-0377 and that the sb and<br />
nb fields represent 9-bit characters. For data comparison purposes, uppercase<br />
(0101-0132) and lowercase (0141-0172) letters are treated as unequal.<br />
The value field is specified in decimal and that the sb and nb fields represent<br />
9-bit characters.<br />
3–64 7831 0687–010
DECFD<br />
FD<br />
OCT<br />
test-operation<br />
value<br />
The SORT Processor<br />
The value field is specified in decimal and that the sb and nb fields represent<br />
6-bit characters.<br />
The value field is specified in Fieldata and that the sb and nb fields represent<br />
6-bit characters.<br />
The value field is specified in octal and that the sb and nb fields represent 9-bit<br />
characters.<br />
specifies how the test data is compared to the data in the area you are testing.<br />
The valid test-operation field specifications are the following:<br />
E<br />
G<br />
GE<br />
L<br />
LE<br />
NE<br />
specifies a test equal operation.<br />
specifies a test greater operation.<br />
specifies a test greater or equal operation.<br />
specifies a test less operation.<br />
specifies a test less or equal operation.<br />
specifies a test not equal operation.<br />
contains the test data to be compared with the part of the record you specify in<br />
the sc and nc fields. If the test data is decimal, it cannot exceed 36 bits and its<br />
value cannot be greater than 68,719,476,734 (0777777777776 octal). For all<br />
other types of data, this field can be up to 60 characters in length. If the type<br />
field is ASC or CAS, the test value may be entered as a character string or as a<br />
nonnumeric literal. The literal must not exceed 60 characters (excluding the<br />
delimiters).<br />
7831 0687–010 3–65
The SORT Processor<br />
Note: You specify a character string containing an embedded space, comma or<br />
semicolon in one of three ways:<br />
• Use the nonnumeric literal syntax. (Valid only for ASC and CAS data types).<br />
• Specify the entire string as an octal value.<br />
• Specify the characters preceding the space, comma, or semicolon by using one<br />
STOP parameter; specify the space, comma, or semicolon character as an octal<br />
value by using another STOP parameter; and specify the remaining characters by<br />
using a third STOP parameter.<br />
logical-operation<br />
controls the conditional stop of records with more than one STOP parameter.<br />
The test operations and logical operations you specify with the STOP parameters<br />
form a logical expression that determines whether the SORT processor<br />
processes a record. If the logical expression is true, the SORT processor stops<br />
the processing of the following records. Valid field specifications for logical<br />
operation are the following:<br />
AND<br />
OR<br />
Description<br />
Consecutive STOP parameters are connected with the logical AND<br />
operation.<br />
Consecutive STOP parameters are connected with the logical OR operation.<br />
This is the default field specification.<br />
This parameter stops the processing of input records for all the input files when more<br />
than one input file is specified (using multiple FILEIN parameters or a single FILESIN<br />
parameter). See the STOPAPP parameter (see 3.3.64) to apply stop conditions on<br />
individual input files.<br />
The STOP parameter is independent from the specification of NUMREC (both local and<br />
global) and the SKIPL parameter. The conditions for SKIPL and NUMREC have higher<br />
precedence than those for STOP. If the maximum record count, specified by the<br />
NUMREC parameter, is met before the condition specified in the STOP parameter, then<br />
only the number of records specified using NUMREC are processed, and vice-versa.<br />
You can specify this parameter along with the ACCEPT, ALLOW and REJECT processor<br />
parameters to further reduce the number of input records to be processed. If both<br />
ACCEPT (or ALLOW or REJECT) and STOP conditions are satisfied on the same record,<br />
that record is not processed (that is, the STOP parameter has higher precedence than<br />
the ACCEPT parameter). You can specify multiple STOP parameters for multiple STOP<br />
conditions, but all STOP parameters must occur consecutively (as in the case of the<br />
ACCEPT processor parameter). Otherwise, the SORT processor issues an appropriate<br />
error and terminates. The maximum number of consecutive STOP parameters allowed<br />
is 50.<br />
You can specify this parameter for all operations.<br />
3–66 7831 0687–010
3.3.64. STOPAPP Parameter<br />
The SORT Processor<br />
This local FILEIN or FILESIN parameter indicates how the STOP parameter condition<br />
applies to a record from a particular input file. The STOPAPP parameter can accept three<br />
values: ALL, YES and NO. If the STOPAPP parameter is specified on a FILESIN<br />
parameter, its meaning applies to all files specified on the FILESIN parameter.<br />
If you do not specify the STOPAPP parameter and the STOP parameter is specified,<br />
when a record satisfies a STOP condition then<br />
• The record is not released.<br />
• The input file is closed.<br />
• No more records from any input file are released.<br />
• Any opened input file is closed.<br />
If the STOPAPP parameter is specified and a STOP parameter is not specified, the<br />
STOPAPP parameter is ignored and no error message is issued. It is illegal to specify<br />
the STOPAPP parameter as global or local to a FILEOUT parameter.<br />
Type<br />
Local (FILEIN or FILESIN only)<br />
Format<br />
STOPAPP=stop-condition-file-implication<br />
where stop-condition-file-implication can be one of the following values:<br />
ALL<br />
YES<br />
NO<br />
This stop-condition-file-implication value is the default value and means that if a<br />
record in this input file satisfies the conditions from the STOP parameter, no more<br />
records (including the current record) will be released from any input file.<br />
This stop-condition-file-implication value means that if a record in this input file<br />
satisfies the conditions from the STOP parameter, no more records (including the<br />
current record) are released from this input file. This input file will be closed and the<br />
next record released will come from another input file.<br />
This stop-condition-file-implication value means that if a record in this input file<br />
satisfies the conditions from the STOP parameter, the STOP parameter condition will<br />
be ignored and the current record will be released.<br />
7831 0687–010 3–67
The SORT Processor<br />
Example<br />
FILEIN=IN1 MODE=SDF STOPAPP=YES<br />
FILEIN=IN2 MODE=SDF STOPAPP=NO<br />
FILEIN=IN3 MODE=SDF STOPAPP=ALL<br />
FILEIN=IN4 MODE=SDF STOPAPP=NO<br />
.<br />
.<br />
.<br />
STOP=1,2,ASC,E,MN<br />
If a record from IN1 satisfies the STOP condition, no more records including the record<br />
that satisfies the condition are released from IN1. IN1 is closed and records are released<br />
from the other files.<br />
Since STOPAPP=NO for IN2 and IN4, the records in IN2 and IN4 are released without<br />
testing for the STOP condition.<br />
If a record from IN3 satisfies the STOP condition, no more records from IN3 or from any<br />
other input file are released because STOPAPP=ALL. Any opened input file is closed.<br />
3.3.65. TAG Parameter<br />
This parameter tells the SORT processor to perform a tag sort.<br />
Type<br />
Global<br />
Format<br />
TAG[=sc1,nc1[[,ocp1]:...:sc40,nc40[,ocp40]]]<br />
where<br />
sc1, ..., sc40<br />
are integers specifying the starting character positions of the select fields within the<br />
input record. The first character position in a record is number one (1).<br />
nc1, ..., nc40<br />
are integers specifying the length, in characters, of the select fields.<br />
ocp1, ..., ocp40<br />
are integers specifying the new character positions for the select fields in the output<br />
record. If they are present, the fields you specify appear in the TAG parameter file<br />
created by the SORT processor.<br />
3–68 7831 0687–010
Description<br />
The SORT Processor<br />
Use the TAG parameter in conjunction with the RETRIEVE operation (but not necessarily<br />
in the same @SORT call). The SORT processor uses the tag file defined by the TAGFILE<br />
parameter (see 3.3.65) to save the sorted records during the TAG operation. The SORT<br />
processor then uses the TAGFILE during the RETRIEVE operation to randomly read the<br />
records from the input file.<br />
You can specify only a single mass storage file with a MODE of ACOB, CFH, DSDF,<br />
ISAM or MSAM as input for the TAG and RETRIEVE parameters. This file must not be<br />
changed between the time that the TAG operation completes and the time that the<br />
RETRIEVE operation starts.<br />
The TAG and RETRIEVE parameter is particularly useful for sorts of very large records<br />
with small key fields. Using the TAG and RETRIEVE parameters, you read the input<br />
records twice: once sequentially and once randomly. You write the output record only<br />
once. This is faster and more efficient than passing entire records through all phases of<br />
the sort. See Section 10 for more details about efficient sorting.<br />
This operation is based on the KEY or KEYW parameters (see 3.3.31 and 3.3.32)<br />
specified or a user compare routine (the OWN parameter in 3.3.45 with exit numbers 14<br />
or 21). This parameter requires the specification of the KEY parameter, the KEYW<br />
parameter, or the OWN parameter with exit number 14 or 21.<br />
When you specify a TAG sort, always use the DISKS parameter (see 3.3.18) to cause a<br />
disk sort to be performed.<br />
3.3.66. TAGFILE Parameter<br />
This parameter specifies the name of the tag file to be used during a TAG or RETRIEVE<br />
operation.<br />
Type<br />
Global<br />
Format<br />
TAGFILE=tag-file-name<br />
where tag-file-name is the file created by the TAG parameter and used by the SORT<br />
processor operation with the RETRIEVE parameter. If the TAG and RETRIEVE<br />
parameters are specified in different processor invocations, the same TAGFILE must be<br />
used in both invocations. If you specify the TAG or RETRIEVE parameter without a<br />
TAGFILE parameter, the SORT processor uses a temporary file called TAG$FILE as the<br />
default file. The file you specify as tag-file-name must be assigned before you enter the<br />
SORT processor.<br />
7831 0687–010 3–69
The SORT Processor<br />
Tag File Record Structures<br />
The following record structures show the format of a tag file record for use in a TAG<br />
sort. If you are coding your own COMP or DROC routines (see 6.6), use the respective<br />
record structure for the tag file, as follows:<br />
+0<br />
+1<br />
+2<br />
3.3.67. TAPES Parameter<br />
This parameter tells the SORT processor about the tape files to be used as scratch files<br />
for the tape sort.<br />
Type<br />
Global<br />
Format<br />
TAPES[=number-of-tapes[(min-number,max-number)][, equipment-type]]<br />
where<br />
ACOB/CFH Input File DSDF Input File ISAM/MASM Input File<br />
number-of-tapes<br />
is an integer (3 to 24) specifying the number of tapes to be assigned. If this field is<br />
omitted or has a value of zero, the SORT processor determines the number of tapes<br />
it needs.<br />
The tape files are assigned with names from XC through XZ. If you assign these<br />
names to any tapes before calling the SORT processor, these tapes are used as<br />
scratch files.<br />
min-number and max-number<br />
are integers that specify the range of the number of tapes that can be used to<br />
perform the sort. This field is used only with the ESTIMATE parameter (see 3.3.22).<br />
The SORT processor prints the best combination of processing time and number of<br />
tapes in the range.<br />
equipment-type<br />
Mass Storage<br />
Address<br />
Mass Storage<br />
Offset<br />
+0<br />
+1<br />
+0<br />
Record Number Primary Index Key<br />
Select Fields Select Fields Select Fields<br />
is a valid @ASG equipment code for any tape assignment, except streaming tape or<br />
1/4-inch cartridge tape (see the ER <strong>Programming</strong> Reference Manual). If you do not<br />
specify equipment-type, the DEFTP configuration parameter (see 9.8) is assumed.<br />
3–70 7831 0687–010<br />
+n
3.3.68. VOLUME Parameter<br />
The SORT Processor<br />
This parameter tells the SORT processor the approximate volume of input to the sort so<br />
that it can determine the scratch facilities required.<br />
Type<br />
Global<br />
Format<br />
VOLUME=volume-range<br />
where volume-range is a value that identifies a range of approximate input volume, with<br />
the following valid field specifications:<br />
SMALL<br />
specifies less than 3 million words.<br />
MEDIUM<br />
LARGE<br />
Notes:<br />
specifies between 3 million words and 11 million words.<br />
specifies between 11 million words and 23 million words.<br />
• If you know the record count, use the RECORD parameter instead of VOLUME to<br />
provide the SORT processor with a more accurate volume indication.<br />
• Do not use the VOLUME parameter for input volumes over 23 million words.<br />
3.4. Operator Information<br />
The SORT processor uses operator information to determine what kind of sort to<br />
execute. There are two factors that affect the sort operation, as follows:<br />
• Estimations<br />
• Scratch facility assignment<br />
These two sort operation factors are discussed in the following subsections.<br />
3.4.1. Estimations<br />
If you specify the ESTIMATE parameter (see 3.3.22), the SORT processor does not<br />
assign any scratch facilities. If you assign scratch facilities, the information they provide<br />
is used to determine the type of sort (for example, main-storage-only, M1 only, M1–M2,<br />
disk, or tape) and the volume of the sort.<br />
7831 0687–010 3–71
The SORT Processor<br />
You can also specify this information with the SORT processor call options X or Y (see<br />
3.1), or with the CORE (see 3.3.12), DISKS (see 3.3.18), DRUM (see 3.3.19), FAST (see<br />
3.3.23), NUMREC (see 3.3.44), RECORD (see 3.3.49), TAPES (see 3.3.67), or VOLUME<br />
(see 3.3.68) parameters. If you provide facility information, the SORT processor<br />
determines the scratch facilities needed and bases its estimation on those values.<br />
To estimate SORT processor input and output time, information pertaining to the input<br />
and output files is used. The input files and output file do not have to be assigned to the<br />
run when an ESTIMATE parameter is present. The EQUIP parameter (see 3.3.20) can be<br />
used to specify information about these files if they are not assigned. The BLOCK<br />
parameter (see 3.3.4) must be present to supply block sizes for input and output files.<br />
After an estimation is completed, the ESTIMATE parameter can be removed from the<br />
parameter list and a new SORT processor call initiated to perform the sort operation.<br />
3.4.2. Scratch Facility Assignment<br />
You can assign scratch files before calling the SORT processor. If you assign scratch<br />
files before calling the SORT processor, the DISKS (see 3.3.18), DRUM (see 3.3.19),<br />
FAST (see 3.3.23), or TAPES (see 3.3.66) parameters, as well as the SORT processor call<br />
options X and Y can be affected (see 3.1).<br />
Name Assignment <strong>Guide</strong>lines<br />
The only valid internal file names for SORT processor scratch files are XA through XZ.<br />
If you assign the SORT processor scratch facilities before calling the SORT processor,<br />
the file names you use must be within the range of XA through XZ. In addition, you<br />
must follow these guidelines when you assign the scratch files:<br />
• If you want a one-level mass storage (M1) sort, the file name you assign should be<br />
XA. Any other file name can cause a different type of sort to be performed,<br />
depending on the parameters and options specified.<br />
• If you want a two-level mass storage (M2) sort, the file names you assign should be<br />
XA and XB. Any other file names can cause a different type of sort to be performed.<br />
You can use the SORT processor call option X to perform an M1 sort. This option can be<br />
used with the DRUM parameter but not with the FAST, TAPES, or DISKS parameters.<br />
If you do not assign scratch files, the SORT processor call option X is not specified, and<br />
the DRUM, FAST, TAPES, or DISKS parameters are not specified, the SORT processor<br />
assigns the scratch files and selects the type of sort to perform. This determination is<br />
based on the information available for input volume. See the RSZ (3.3.54) and LINKSZ<br />
parameters (3.3.36), the VOLUME parameter (3.3.68), and the RECORD parameter<br />
(3.3.49).<br />
3–72 7831 0687–010
Determining Input Volume<br />
The SORT Processor<br />
The SORT processor determines the input volume using the following order of<br />
precedence:<br />
• RECORD parameter, if the RSZ parameter is also specified<br />
• NUMREC parameter, if the RSZ parameter is also specified<br />
• VOLUME parameter<br />
• Input volume estimation<br />
The input volume estimation is determined automatically by adding all of the input file<br />
sizes. The SORT processor uses an ER FITEM$ input volume estimation to check the<br />
highest granule referenced for disk files and the highest word for word-addressable<br />
mass storage files. Tape files are assumed to be full volumes except for files assigned<br />
to the CTS9840, CTC9840 (U9840C), CTS9940, DLT7CT, LTO3, LTO4, UT10KA, and<br />
U9840D tape subsystems. For some file types, the SORT processor examines the input<br />
file label to determine the input volume. The SORT processor cannot estimate the input<br />
volume for an ExPipe input file.<br />
For files assigned to the CTS9840, CTC9840 (U9840C), CTS9940, DLT7CT, LTO3, LTO4,<br />
UT10KA, and U9840D tape subsystems, the input volume is estimated at 2 GB unless<br />
other parameters (for example, RECORD or NUMREC) are specified. If these<br />
parameters are not specified and the input volume is greater than 2 GB, the scratch files<br />
must be explicitly assigned prior to invoking the SORT processor. If the input file is a<br />
multi-volume tape file, only the last volume of the multi-volume set is assumed to have a<br />
2GB volume. All volumes, other than the last volume, are assumed to be full volumes.<br />
The following table describes the scratch facility assignment process.<br />
If ... Then the SORT processor ...<br />
You specify the X processor option or the<br />
DRUM parameter<br />
Tries to assign a temporary mass storage file named<br />
XA. If a mass storage file named XA is already<br />
assigned, that file is used instead.<br />
The FAST parameter is used Tries to assign temporary mass storage files named<br />
XA and XB. If mass storage files named XA and XB<br />
are already assigned, these files are used instead.<br />
The TAPES parameter is used Tries to assign temporary tape files starting with the<br />
name XC. If tape files with the same names are<br />
already assigned, these previously assigned tape<br />
files are used.<br />
The DISKS parameter is used Tries to assign temporary disk files starting with the<br />
name XC if 3 to 24 files are requested, XB if 25 files<br />
are requested, and XA if 26 files are requested. If<br />
disk files with the same names are already assigned,<br />
these previously assigned disk files are used.<br />
No scratch facilities were assigned before<br />
entering the SORT processor and no<br />
facility parameters were specified<br />
Determines the scratch facilities needed and assigns<br />
them to provide an efficient sort.<br />
7831 0687–010 3–73
The SORT Processor<br />
After the SORT processor performs the desired operation, all scratch files that it<br />
assigned are freed.<br />
3.5. SORT Processor Use of the Run-Condition<br />
Word<br />
The run-condition word is established by the Executive system. The SORT processor<br />
uses bits 7 and 8 (bit 0 on the left) of the run-condition word to indicate the termination<br />
status of an activation of the SORT processor as follows:<br />
• Bit 7 – If bit 8 is already set prior to initialization of the SORT processor, bit 7 is set to<br />
indicate that some previous task in this runstream has registered an error.<br />
• Bit 8 – During initialization of the SORT processor, bit 8 is set. If this task completes<br />
normally and does not issue a nonrecoverable error, bit 8 is cleared prior to<br />
termination. Otherwise, bit 8 remains set.<br />
After the call to the SORT processor, you can test the value of these bits with the ECL<br />
@TEST statement.<br />
For more information on the run-condition word, see the Executive Requests<br />
<strong>Programming</strong> Reference Manual.<br />
3–74 7831 0687–010
Section 4<br />
User Exit Coding Considerations<br />
This section explains how to gain control of a sort operation by accessing your own<br />
routines through the SORT processor. It describes the exit numbers you need to code<br />
as well as other coding you must do before returning to normal processing.<br />
4.1. Procedures for Using Your Own Routines<br />
Before deciding to include your own routines, check the ACCEPT parameter (see 3.3.1),<br />
as well as other SORT processor parameters (see 3.3), to see whether they include the<br />
capabilities you are trying to gain by using your own routine. If you choose to write your<br />
own routines, be aware of the following:<br />
1. You must write your code routines in basic mode.<br />
2. Re-collect the SORT processor so that your routines are incorporated into the SORT<br />
processor code.<br />
Note: If you plan to use your routines again, be sure to save the SORT absolute.<br />
3. Select the user exit number or numbers appropriate to your routines (see 4.2). Be<br />
aware of the entry conditions and return requirements for the routine (see 4.3).<br />
4.2. Using Exit Numbers<br />
You can call your routines by specifying an OWN parameter (see 3.3.45) when the SORT<br />
processor is executed. The exit numbers and the routine called by an exit number are<br />
determined by the OWN parameter. Each exit has a specific purpose, entry conditions,<br />
and return requirements.<br />
Table 4–1 contains the available user exit numbers, the purpose of the exit number when<br />
a routine associated with the exit number is called, and the subsection where you can<br />
locate the particular information about the exit number.<br />
Note: Not all exit numbers are available for all file types. These situations are noted<br />
within the related subsections.<br />
7831 0687–010 4–1
User Exit Coding Considerations<br />
Exit<br />
Number<br />
Table 4–1. SORT Processor User Exit Numbers<br />
Time of Access<br />
01 Immediately after the OWN<br />
parameter is processed.<br />
10 Before the I/O operation on each<br />
input label.<br />
11, 45 After the I/O operation on each<br />
input label<br />
12, 46 After each block of data is read<br />
by the SORT processor.<br />
13 Before each record is input to the<br />
SORT processor<br />
14, 21 Each time records are to be<br />
compared.<br />
15, 47 When an unrecoverable read<br />
error occurs.<br />
31, 41 Immediately before each output<br />
label is written.<br />
32, 42 Each time equal records are<br />
found on the compare.<br />
33, 43 Before each record is moved to<br />
the output buffer.<br />
34, 44 Before each block of output data<br />
is written.<br />
Purpose<br />
Lets your routine read any user control<br />
statements.<br />
Lets your routine do the I/O needed to<br />
process input label records.<br />
Lets your routine check nonstandard<br />
header and trailer labels on an input file<br />
Lets your routine alter or delete a block<br />
of data from an input file<br />
Lets your routine examine the records<br />
before they are processed by the SORT<br />
processor<br />
Lets your routine compare two records<br />
to see which is first in the sorting<br />
sequence.<br />
Reference<br />
4–2 7831 0687–010<br />
4.3.1<br />
4.3.2<br />
4.3.3<br />
4.3.4<br />
4.3.5<br />
4.3.6<br />
Lets your routine process the error. 4.3.7<br />
Lets your routine write nonstandard<br />
header and trailer labels on an output<br />
file.<br />
Lets your routine alter or delete records<br />
with equal keys.<br />
Lets your routine alter, add, or delete<br />
records.<br />
Lets your routine alter or eliminate the<br />
entire block.<br />
4.3.8<br />
4.3.9<br />
4.3.10<br />
4.3.11
4.3. User Exit Number Explanation<br />
User Exit Coding Considerations<br />
The following subsections describe the user exit numbers shown in Table 4–1 and define<br />
the return requirements.<br />
Note: On all user exits, you must either save and restore register X9 or not alter this<br />
register at all.<br />
4.3.1. User Exit 01<br />
Purpose<br />
This exit is activated immediately after the OWN parameter (see 3.3.45) statement is<br />
processed. This exit lets your routine read any user control statements.<br />
Control is transferred to your routine, which can read any user control statement. The<br />
control statements must directly follow the OWN parameter statement. Other SORT<br />
processor parameters can follow the user control statements.<br />
Return Requirements<br />
Your routine must return to the SORT processor with a J 0,X6 instruction.<br />
4.3.2. User Exit 10<br />
Purpose<br />
This exit is activated before the I/O operation on each input label occurs. This exit lets<br />
your routine do the I/O needed to process input label records.<br />
When this exit is activated, register A0 contains the address of a 28-word label buffer.<br />
Return Requirements<br />
Upon return, H1 of A0 must contain one of the following values:<br />
Fieldata F (013)<br />
End of file<br />
Fieldata V (033)<br />
End of volume<br />
Octal 1<br />
Ignore the label<br />
Octal 2<br />
Process the label<br />
In addition, A1 must contain the record size in words and A2 must contain the block size<br />
in words.<br />
7831 0687–010 4–3
User Exit Coding Considerations<br />
Your routine must return with a J 0,X6 instruction.<br />
Note: This exit is available for all file types except symbiont.<br />
4.3.3. User Exit 11 or 45<br />
Purpose<br />
These two exit numbers have identical meanings to the SORT processor. They are<br />
activated after the I/O operation on each input label occurs. These exit numbers let your<br />
routine check nonstandard header and trailer labels on an input file.<br />
When exit number 11 or 45 is activated, register A0 contains the address of the first<br />
word of the label.<br />
Return Requirements<br />
On return, H1 of register A0 must contain one of the following values:<br />
Fieldata F (013)<br />
End of file<br />
Fieldata V (033)<br />
End of volume<br />
Octal 1<br />
Ignore the label<br />
Octal 2<br />
Process the label<br />
In addition, H2 of register A0 must contain the address of the label area.<br />
Your routine must return with a J 0,X6 instruction.<br />
Note: This exit is available for all files except symbiont.<br />
4.3.4. User Exit 12 or 46<br />
Purpose<br />
These exits have identical meaning to the SORT processor. They are activated each<br />
time a block of input data is read by the SORT processor. These exit numbers let your<br />
routine alter or delete a block of data from an input file.<br />
When exit number 12 or 46 is activated, register A0 contains the address of the<br />
beginning of the block.<br />
Return Requirements<br />
On return, whether the block is altered or unaltered, H2 of register A0 must contain the<br />
block address. However, if the block is altered, the ending block address must be in H1<br />
of register A0.<br />
4–4 7831 0687–010
User Exit Coding Considerations<br />
The size of the block cannot be increased if altered and the data file structure of the<br />
block must be maintained. If the block is to be deleted, then register A0 must be<br />
returned as zero.<br />
Your routine must return with a J 0,X6 instruction.<br />
Note: This exit is only available for ACOB and COBOL file-handler (CFH) files.<br />
4.3.5. User Exit 13<br />
Purpose<br />
This exit is activated before each record is processed by the SORT processor. This exit<br />
lets your routine examine the records and alter, add, or delete them. If records are<br />
altered, they cannot exceed the original length of the record. This exit is not available for<br />
TAG (see 3.3.65) or SELECT sorts (see 3.3.55).<br />
When you activate exit number 13, H2 of register A0 contains the address of the first<br />
word of the record. If you are processing variable length records, H1 of register A0<br />
contains the word length of the record.<br />
Return Requirements<br />
If the record is to be deleted, register A0 must be set to zero.<br />
If a record is to be inserted, H1 of register A1 must be zero and H2 of register A1 must<br />
contain the address of the first word of the record to be inserted. If you are processing<br />
variable length records, H1 of register A0 contains the word length of the record to be<br />
inserted. The record to be inserted cannot be located at the address contained in<br />
register A0 prior to the beginning of the record insertion.<br />
If record insertion is completed or no record insertion is to occur, H1 of register A1 must<br />
contain a nonzero value or register A1 must be zero. The record at the address<br />
contained in register A0 prior to the beginning of record insertion will then be returned<br />
(altered or unaltered). If you are processing variable length records, H1 of register A0<br />
must contain the length of the record.<br />
Your routine must return with a J 0,X6 instruction.<br />
Note: This exit is available for all types of data.<br />
4.3.6. User Exit 14 or 21<br />
Purpose<br />
These exits have identical meanings to the SORT processor. They are activated each<br />
time a comparison is made between two records to see which is first in the sorting<br />
sequence. These exits let your routine compare two records to see which is first in the<br />
sorting sequence.<br />
Your routine must be consistent in that equal keys are always chosen in the same order.<br />
When you activate exit number 14 or 21, registers A0 and A1 contain the addresses of<br />
the first word of each record.<br />
7831 0687–010 4–5
User Exit Coding Considerations<br />
Return Requirements<br />
If the record addressed by register A0 is first in the sorting sequence, use a J 0,X11<br />
instruction to return to the SORT processor. If the record addressed by register A1 is<br />
first in the sorting sequence, use a J 1,X11 instruction to return to the SORT processor.<br />
If the two records have equal keys, use a J 2,X11 instruction to return to the SORT<br />
processor.<br />
Notes:<br />
• This exit is available for all types of files. For more information, see 6.6.<br />
• This exit overrides the KEY and KEYW parameter; that is, no key translation occurs.<br />
4.3.7. User Exit 15 or 47<br />
Purpose<br />
These exits have identical meanings to the SORT processor. They are activated when an<br />
unrecoverable error occurs while reading from an input file. These exits let your routine<br />
process the error.<br />
Return Requirements<br />
No return to the SORT processor is expected.<br />
4.3.8. User Exit 31 or 41<br />
Purpose<br />
These exits have identical meanings to the SORT processor. They are activated<br />
immediately before each output label is written. These exit numbers let your routine<br />
write nonstandard header and trailer labels on an output file.<br />
When exit number 31 or 41 is activated, register A0 contains the address of the first<br />
word of the buffer area.<br />
Return Requirements<br />
On return, H1 of register A0 must contain one of the following values:<br />
Fieldata F (013)<br />
End of file<br />
Fieldata V (033)<br />
Octal 1<br />
Octal 2<br />
End of volume<br />
Ignore the label<br />
Process the label<br />
H2 of register A0 should still contain the buffer address upon returning to the SORT<br />
processor.<br />
4–6 7831 0687–010
Your routine must return with a J 0,X6 instruction.<br />
Note: This exit is available for all files except symbiont.<br />
4.3.9. User Exit 32 or 42<br />
Purpose<br />
User Exit Coding Considerations<br />
These exits have identical meanings to the SORT processor. They are activated each<br />
time equal records are found on the compare. These exits let your routine leave the<br />
records as they are, modify the records, or delete one of the records. If the only purpose<br />
of your routine is to delete duplicate records, then use the DELDUPS parameter (see<br />
3.3.16) instead.<br />
If your routine modifies the records, only non-key portions of the records can be altered.<br />
For fixed-length records, all nonkey portions of the entire record can be altered. For<br />
variable-length records, only the nonkey portions of the first link of each record can be<br />
altered.<br />
When exit number 32 or 42 is activated, registers A0 and A1 contain the addresses of<br />
the first word of each record.<br />
Return Requirements<br />
If your routine returns both records, the two record addresses in registers A0 and A1<br />
must still be intact and you must use a J 0,X11 instruction to return to the SORT<br />
processor. If your routine deletes one of the records, the record returned must be<br />
addressed by register A0 and you must use a J 1,X11 instruction to return to the SORT<br />
processor.<br />
Note: This exit is available for all file formats and recording modes. For more<br />
information, see 6.6. This exit overrides the DELDUPS parameter.<br />
4.3.10. User Exit 33 or 43<br />
Purpose<br />
These exits have identical meanings to the SORT processor. They are activated before<br />
each record is written. This exit lets your routine alter, add, or delete records.<br />
The following are specific record handling requirements for this user exit:<br />
• If the record is to be deleted, you must set register A0 to zero.<br />
• If a record is to be inserted, you must put the address of the new record in H2 of<br />
register A1 with H1 of register A1 set to any value other than 1 or 2. To terminate<br />
record insertion, you must set H1 of register A1 to 1.<br />
• If your routine writes out the record, you must set H1 of register A1 to 2.<br />
• If this is a variable-record sort, H1 of register A0 contains the record length in words.<br />
If variable-length records are inserted, you must set in H1 of register A0 to the word<br />
size of the record whose address is in register A1. The length of the record is<br />
always passed in words regardless of whether the processing is in words or bits.<br />
7831 0687–010 4–7
User Exit Coding Considerations<br />
When exit number 33 or 43 is activated, register A0 contains the address of the first<br />
word of the record.<br />
Return Requirements<br />
On return, whether altered or unaltered, register A0 must contain the record address.<br />
Your routine must return with a J 0,X6 instruction.<br />
4.3.11. User Exit 34 or 44<br />
Purpose<br />
These exits have identical meanings to the SORT processor. They are activated each<br />
time a physical block of data is ready to be written by the SORT processor. These exits<br />
let your routine alter or eliminate the entire block.<br />
When exit number 34 or 44 is activated, register A0 contains the beginning address of<br />
the block.<br />
Return Requirements<br />
On return, whether altered or unaltered, H2 of register A0 must contain the block<br />
address. However, if the block is altered, you must set in H1 of register A0 to the end<br />
address of the block.<br />
The block can be shortened, but can never be expanded in length. If you delete the<br />
block, you must set register A0 to zero. If your routine writes out the block, you must<br />
set H1 of register A1 to any nonzero value.<br />
Your routine must return with a J 0,X6 instruction.<br />
Note: This exit is available only for ACOB and CFH files.<br />
4.4. SRTGEN<br />
SRTGEN is a Symbolic Stream Generator (SSG) skeleton provided in file 1 (CO$UTIL) of<br />
the <strong>Sort</strong>/<strong>Merge</strong> release tape. It facilitates the inclusion of user relocatables into a new<br />
<strong>Sort</strong>/<strong>Merge</strong> absolute.<br />
The only stream generation statement (SGS) recognized by SRTGEN is SRTMRG. The<br />
format of this SGS is as follows:<br />
Format<br />
SRTMRG NAME,a ELEMENT,b1,b2,... ENTRY,c1,c2,...<br />
4–8 7831 0687–010
Description<br />
where<br />
a<br />
is the name of the absolute element to be produced.<br />
b1,b2,...<br />
c1,c2,...<br />
User Exit Coding Considerations<br />
indicate names of user relocatable elements to be included in the collection.<br />
indicate the entry point names of the user subroutines contained in bn.<br />
All entries on the SRTMRG SGS are optional with the exception of the NAME entry (the<br />
absolute element to be produced).<br />
The SORT relocatables, as well as the user relocatables, are assumed to be in a file with<br />
the name REL$. You must copy file 15 (REL$) of the release tape and user relocatables<br />
into the REL$ file.<br />
Example<br />
The following sample runstream shows the use of the SGS SRTMRG and a SORT<br />
processor call using user exit numbers:<br />
1. @SSG SRTGEN<br />
2. SGS<br />
3. SRTMRG NAME,SORT2 ELEMENT,011,01,012 ENTRY,OWN01,OWN11,OWN12<br />
4. @EOF<br />
5. @EOF<br />
6. @.SORT2<br />
7. RSZ=84<br />
8. BLOCK=5<br />
9. FILEIN=INFILE<br />
10. FILEOUT=OUTFILE<br />
11. KEYW=1,35,36,A,A<br />
12. OWN=1,OWN01:11,OWN11:12,OWN12<br />
13. @EOF<br />
Description of Coding Lines<br />
Line 1<br />
Line 2<br />
Line 3<br />
Call to the Symbolic Stream Generator (SSG) indicating the skeleton to be processed<br />
(SRTGEN).<br />
Indicates that stream generation statements (SGS) follow.<br />
The SGS SRTMRG, which indicates a SORT processor, is built with the absolute<br />
element name of SORT2. The user relocatable elements named 01, 011, and 012<br />
are included in the collection and the entry points OWN01, OWN11, OWN12 are<br />
contained in the included relocatable elements.<br />
7831 0687–010 4–9
User Exit Coding Considerations<br />
Line 4 and 5<br />
Line 6<br />
Starts SSG processing.<br />
Calls the new SORT processor, which includes user exit numbers.<br />
Line 7–11<br />
Line 12<br />
Indicates the SORT processor parameters.<br />
Tells the SORT processor that a user routine is activated (The statement 1,OWN01<br />
indicates that exit number 1 is activated and that OWN01 will be called).<br />
4–10 7831 0687–010
Section 5<br />
The SORT Subroutine Parameter Tables<br />
for MASM Programs<br />
This section explains how to perform a sort or merge operation in a MASM program<br />
using the SORT subroutines. It explains how to generate a parameter table to define the<br />
sort or merge operation.<br />
5.1. Introduction<br />
When you give control to the SORT subroutines by specifying the appropriate linkages<br />
within your source program as described in Section 6, you must provide the following:<br />
• The records to sort<br />
• The operations to perform<br />
• The system facilities to use<br />
• Key definitions<br />
You do this by generating a parameter table. A parameter table is made up of a number<br />
of parameter entries that contain table entry codes that specify such items as the record<br />
size, key definitions, the operation to perform, and the facilities to use.<br />
Table 5–1 lists the parameter types, the generation methods, and indicates the<br />
subsection where you can find more information about them.<br />
Table 5–1. MASM Parameter Table Generation Methods<br />
Parameter Generation<br />
Method<br />
Description<br />
Reference<br />
R$FILE assembly-time Use with the R$FILE table generation procedure. 5.2<br />
Coding parameter entries as<br />
constants<br />
Bypass automatic parameter table generation. 5.3<br />
Execution-time Use with R$FILE parameters or with any cards<br />
punched by the IPURI$ linkage (see 6.3.1).<br />
7831 0687–010 5–1<br />
5.4
The SORT Subroutine Parameter Tables for MASM Programs<br />
The following subsections describe and define the particular SORT subroutines<br />
parameter types.<br />
5.2. R$FILE Assembly-Time Parameters<br />
The R$FILE procedure is a predefined MASM procedure that is provided with the<br />
<strong>Sort</strong>/<strong>Merge</strong> product. To use the R$FILE procedure to generate a parameter table, you<br />
must first make it available to your MASM program (see 6.1) by entering a call that<br />
activates the R$FILE procedure.<br />
Format<br />
R$FILE 'parameter-1' 'parameter-2' ... 'parameter-n'<br />
where parameter-1, parameter-2, ... parameter-n are the R$FILE parameters that<br />
correspond to the operation you want to perform (see Table 5–2). Note that R$FILE<br />
parameters are always in single quotation marks.<br />
You do not need to specify a start table or end table entry. Both of these entries are<br />
generated automatically by the R$FILE procedure.<br />
You specify the R$FILE assembly-time parameters when you use the R$FILE procedure<br />
described in 5.1. These parameters are generated when your program is assembled.<br />
Table 5–2 lists the R$FILE assembly-time parameters.<br />
Table 5–2. R$FILE Assembly-Time Parameters<br />
Parameter Code Description Subsection<br />
BIAS 06 Informs the SORT subroutines how many<br />
ordered sequences already exist in the input<br />
data set.<br />
CHECK 060 Forces the elimination of the checksum<br />
operations normally done by the SORT<br />
subroutines module you specify.<br />
CHECKD 066 Sets the mesh count for checksum operations<br />
in the one-level mass storage module (M1).<br />
CHECKF 066 Sets the mesh count for checksum operations<br />
in the two-level mass storage module (M1–<br />
M2).<br />
CHECKK 066 Sets the mesh count for checksum calculations<br />
in the basic mode disk module.<br />
CHECKT 066 Sets the mesh count for checksum calculations<br />
in the tape module.<br />
COMP 041, 077 Tells the SORT subroutines to execute a user<br />
routine each time two records are compared.<br />
CONSOLE 063 Tells the SORT subroutines to issue all<br />
operator console messages during a sort run.<br />
5–2 7831 0687–010<br />
5.2.1<br />
5.2.2<br />
5.2.3<br />
5.2.4<br />
5.2.5<br />
5.2.6<br />
5.2.7<br />
5.2.8
The SORT Subroutine Parameter Tables for MASM Programs<br />
Table 5–2. R$FILE Assembly-Time Parameters<br />
Parameter Code Description Subsection<br />
CONTA 036, 050,<br />
052<br />
Tells the SORT subroutines that an interrupted<br />
PARTA sort is continued.<br />
CONTB 037, 053 Tells the SORT subroutines that an interrupted<br />
PARTB sort is continued.<br />
CONTC 047, 054 Tells the SORT subroutines that an interrupted<br />
PARTC sort is continued.<br />
COPY 070, 077 Allows parameters to be accepted from more<br />
than one parameter table.<br />
CORE 020, 077 Specifies the amount of memory and the type<br />
of memory (basic mode or extended mode) to<br />
be used for the sort.<br />
DEFYEAR 026 Indicates the first year of a 100-year interval<br />
used to order DATE key fields.<br />
DELCON 063 Tells the SORT subroutines to delete all<br />
operator console messages during a sort run.<br />
DELLOG 065 Omits the normal sort completion messages<br />
from the run log.<br />
DROC 040, 077 Tells the SORT subroutines to execute a user<br />
routine each time it is determined that two<br />
records have equal keys.<br />
ERROR 045, 077 Tells the SORT subroutines where to transfer<br />
control if an error occurs in the SORT<br />
subroutines.<br />
FILES 023, 077 Lists the names of the scratch files the SORT<br />
subroutines are to use during a sort operation.<br />
FINAL 044, 077 Tells the SORT subroutines where to transfer<br />
control after completion of a PARTA or PARTB<br />
sort.<br />
FPOC 042, 077 Tells the SORT subroutines the address to<br />
return to after the sort is initialized.<br />
KEY 03, 077 Specifies a key field for the sort or merge<br />
operation.<br />
KEYW 03, 077 Specifies a key field for a sort or merge<br />
operation.<br />
LOCALE 025, 077 Tells the SORT subroutines the desired locale<br />
for I keys for the sort or merge operation.<br />
LOG 065 Tells the SORT subroutines to issue normal<br />
sort completion messages to the run log.<br />
LPOC 043, 077 Tells the SORT subroutines the address to<br />
return to when the subroutines return sorted<br />
records to your program.<br />
7831 0687–010 5–3<br />
5.2.9<br />
5.2.10<br />
5.2.11<br />
5.2.12<br />
5.2.13<br />
5.2.14<br />
5.2.15<br />
5.2.16<br />
5.2.17<br />
5.2.18<br />
5.2.19<br />
5.2.20<br />
5.2.21<br />
5.2.22<br />
5.2.23<br />
5.2.24<br />
5.2.25<br />
5.2.26
The SORT Subroutine Parameter Tables for MASM Programs<br />
Table 5–2. R$FILE Assembly-Time Parameters<br />
Parameter Code Description Subsection<br />
NODISK 016 Tells the SORT subroutines that the disk<br />
module is not collected into your program.<br />
NOMASS 017 Tells the SORT subroutines that the M1 and<br />
the M1–M2 mass storage modules are not<br />
collected into your program.<br />
NOTAPE 016 Tells the SORT subroutines that the tape<br />
module is not collected into your program.<br />
OPTION 067 Tells the SORT subroutines general information<br />
to perform specific actions.<br />
PAD 072 Saves space in the parameter table for<br />
additional information.<br />
PARTA 031, 010,<br />
011, 012,<br />
013<br />
PARTB 032, 012,<br />
014, 015<br />
Tells the SORT subroutines to perform the<br />
distribution phase of a nonautomatic tape sort.<br />
Tells the SORT subroutines to perform the<br />
intermediate merge phase of a nonautomatic<br />
tape sort.<br />
PARTC 033, 014 Tells the SORT subroutines to perform the final<br />
merge phase of a nonautomatic tape sort.<br />
PRESERVE 05 Determines the output order of records that<br />
have equal keys.<br />
RECAREA 046, 077 Tells the SORT subroutines, when executing<br />
an extended mode sort, where to put the<br />
record so that it is visible to a basic mode user<br />
routine.<br />
REDOA 034, 050,<br />
051, 052<br />
5.2.27<br />
5.2.28<br />
5.2.29<br />
5.2.30<br />
5.2.31<br />
5.2.32<br />
5.2.33<br />
5.2.34<br />
5.2.35<br />
5.2.36<br />
Recreates a portion of a PARTA sort. 5.2.37<br />
REDOB 035, 053 Recreates a portion of a PARTB sort. 5.2.38<br />
RSZ 01 Specifies the size of fixed-length records in<br />
terms of 6-bit characters.<br />
RSZA 01 Specifies the size of fixed-length records in<br />
terms of 9-bit characters.<br />
RSZB 01 Specifies the size of fixed-length records in<br />
terms of bits.<br />
RSZW 01 Specifies the size of fixed-length records in<br />
terms of words.<br />
SEQ 04, 077 Generates an alternate Fieldata collating<br />
sequence for type A key fields.<br />
SEQA 07, 077 Generates a 128-character collating table for<br />
type S key fields.<br />
5.2.39<br />
5.2.40<br />
5.2.41<br />
5.2.42<br />
5.2.43<br />
5.2.44<br />
5–4 7831 0687–010
The SORT Subroutine Parameter Tables for MASM Programs<br />
Table 5–2. R$FILE Assembly-Time Parameters<br />
Parameter Code Description Subsection<br />
SEQB 07, 077 Generates a 128-character collating table for<br />
type S key fields.<br />
SEQC 024, 077 Generates a 256-character collating table for<br />
type S key fields.<br />
SEQD 024, 077 Generates a 256-character collating table for<br />
type S key fields.<br />
SEQE 024, 077 Generates a 256-character collating table with<br />
the EBCDIC collating sequence for type S key<br />
fields<br />
SEQF 04, 077 Generates a Fieldata collating table for type A<br />
key fields.<br />
SEQK 024, 077 Generates a 256-character collating table in the<br />
same manner as the SEQD parameter except<br />
that the katakana character sequence is<br />
included before the special characters.<br />
SMRG 030, 010,<br />
011, 012<br />
Tells the SORT subroutines to perform an<br />
automatic tape sort.<br />
VOL 064 Tells the SORT subroutines approximately how<br />
many records in thousands are to be sorted.<br />
VRSZ 01, 02 Specifies the maximum size of variable-length<br />
records and the minimum link size of the input<br />
record set in terms of 6-bit characters.<br />
VRSZA 01, 02 Specifies the maximum size of variable-length<br />
records and the minimum link size of the input<br />
record set in terms of 9-bit characters.<br />
VRSZB 01,02 Specifies the maximum size of variable-length<br />
records and the minimum link size of the input<br />
record set in terms of bits.<br />
VRSZW 01, 02 Specifies the maximum size of variable-length<br />
records and the minimum link size of the input<br />
record set in terms of words.<br />
5.2.45<br />
5.2.46<br />
5.2.47<br />
5.2.48<br />
5.2.49<br />
5.2.50<br />
5.2.51<br />
5.2.52<br />
5.2.53<br />
5.2.54<br />
5.2.55<br />
5.2.56<br />
7831 0687–010 5–5
The SORT Subroutine Parameter Tables for MASM Programs<br />
The following subsections describe each of these parameters in detail. Default values in<br />
command formats are in bold text.<br />
5.2.1. BIAS Parameter<br />
Function<br />
Informs the SORT subroutines how many ordered sequences already exist in the input<br />
data set.<br />
Format<br />
'BIAS', bias-factor<br />
where bias-factor must be the actual bias of the data multiplied by 10. You cannot<br />
specify a decimal point.<br />
Generated Entry<br />
060000bbbbbb<br />
where bbbbbb is the 18-bit octal bias of the data multiplied by 10.<br />
5.2.2. CHECK Parameter<br />
Function<br />
Forces the elimination of the checksum operations for the sort modules you specify.<br />
Normally, the SORT subroutines perform checksum operations.<br />
Format<br />
'CHECK', 'mod-1' [,'mod-2'] [,'mod-3'] [,'mod-4']<br />
where mod-1, mod-2, mod-3, and mod-4 can be any of the following values:<br />
D<br />
F<br />
K<br />
T<br />
omits the M1 module checksum.<br />
omits the M2 module checksum.<br />
omits the basic mode disk module checksums.<br />
omits tape module checksum operations.<br />
The CHECK parameter has no meaning when an extended mode sort is being<br />
performed.<br />
5–6 7831 0687–010
Generated Entry<br />
60ddttffkk00<br />
where<br />
dd<br />
tt<br />
ff<br />
kk<br />
The SORT Subroutine Parameter Tables for MASM Programs<br />
is the checksum value in effect for an M1 sort. If dd is 011, checksums are not<br />
performed. Any other value allows checksums to be performed for the M1 module.<br />
is the checksum value in effect for a tape sort. If tt is 031, checksums are not<br />
performed. Any other value allows checksums to be performed for the tape module.<br />
is the checksum value in effect for an M2 sort. If ff is 013, checksums are not<br />
performed. Any other value allows checksums to be performed for the M2 module.<br />
is the checksum value in effect for basic mode disk module specifications. If kk is<br />
020, checksums are not performed. Any other value allows checksums to be<br />
performed for the basic mode disk module.<br />
5.2.3. CHECKD Parameter<br />
Function<br />
Sets the mesh count for checksum operations in the one-level mass storage (M1)<br />
module.<br />
Format<br />
'CHECKD', mesh-count<br />
where mesh-count is an integer that specifies the mesh or interval at which checksum<br />
operations are computed. The default mesh count is 1, which means that every word in<br />
a block is summed before being written and after being read. By setting a larger mesh<br />
count, you can save time during the sort by doing fewer checksum operations. If the<br />
mesh count is set to 0, checksum calculations are disabled.<br />
The CHECKD parameter has no meaning when an extended mode sort is being<br />
performed.<br />
Generated Entry<br />
660001mmmmmm<br />
where mmmmmm is the 18-bit octal mesh count used in checksum calculations.<br />
7831 0687–010 5–7
The SORT Subroutine Parameter Tables for MASM Programs<br />
5.2.4. CHECKF Parameter<br />
Function<br />
Sets the mesh count for checksum operations in the two-level mass storage (M2)<br />
module.<br />
Format<br />
'CHECKF', mesh-count<br />
where mesh-count is an integer that specifies the mesh or interval at which checksum<br />
operations are computed. The default mesh count is 1, which means that every word in<br />
a block is summed before being written and after being read. By setting a larger mesh<br />
count, you can save time during the sort by doing fewer checksum operations. If the<br />
mesh count is set to 0, checksum calculations are disabled.<br />
The CHECKF parameter has no meaning when an extended mode sort is being<br />
performed.<br />
Generated Entry<br />
660002mmmmmm<br />
where mmmmmm is the 18-bit octal mesh count used in checksum calculations.<br />
5.2.5. CHECKK Parameter<br />
Function<br />
Sets the mesh count for checksum calculations in the disk module.<br />
Format<br />
'CHECKK', mesh-count<br />
where mesh-count is an integer that specifies the mesh or interval at which checksum<br />
operations are computed. The default mesh count is 1, which means that every word in<br />
a block is summed before being written and after being read. By setting a larger mesh<br />
count, you can save time during the sort by doing fewer checksum operations. If the<br />
mesh count is set to 0, checksum calculations are disabled.<br />
The CHECKK parameter has no meaning when an extended mode sort is being<br />
performed.<br />
Generated Entry<br />
660004mmmmmm<br />
where mmmmmm is the 18-bit octal mesh count used in checksum calculations.<br />
5–8 7831 0687–010
5.2.6. CHECKT Parameter<br />
Function<br />
The SORT Subroutine Parameter Tables for MASM Programs<br />
Sets the mesh count for checksum calculations in the tape module.<br />
Format<br />
'CHECKT', mesh-count<br />
where mesh-count is an integer that specifies the mesh or interval at which checksum<br />
operations are computed. The default mesh count is 1, which means that every word in<br />
a block is summed before being written and after being read. By setting a larger mesh<br />
count, you can save time during the sort by doing fewer checksum operations. If the<br />
mesh count is set to 0, checksum calculations are disabled.<br />
The CHECKT parameter has no meaning when an extended mode sort is being<br />
performed.<br />
Generated Entry<br />
660003mmmmmm<br />
where mmmmmm is the 18-bit octal mesh count used in checksum calculations.<br />
5.2.7. COMP Parameter<br />
Function<br />
Tells the SORT subroutines to execute a user routine each time two records are<br />
compared. See 6.6.1 for more information about user compare routines. The COMP<br />
parameter causes KEY or KEYW parameters to be ignored.<br />
Format<br />
'COMP', [*]comp-routine-address<br />
where<br />
*<br />
is an asterisk that must be coded if the COMP routine resides in a common bank or<br />
is called by the SORT subroutines common bank. The asterisk generates a<br />
BDICALL$ Collector directive rather than the normal BDIREF$ directive.<br />
comp-routine-address<br />
is the address of the user routine that is executed.<br />
7831 0687–010 5–9
The SORT Subroutine Parameter Tables for MASM Programs<br />
Generated Entries<br />
410000aaaaaa<br />
770000bbbbbb<br />
where<br />
aaaaaa<br />
bbbbbb<br />
is the 18-bit octal address of the user compare routine.<br />
is the 18-bit octal bank descriptor index (BDI) of the bank containing the COMP<br />
routine.<br />
5.2.8. CONSOLE Parameter<br />
Function<br />
Tells the SORT subroutines to issue all operator console messages during the sort run.<br />
This parameter is the opposite of the DELCON parameter and overrides the CONSOLE<br />
configuration parameter (see 9.4).<br />
Format<br />
'CONSOLE'<br />
Generated Entry<br />
630000000001<br />
5.2.9. CONTA Parameter<br />
Function<br />
Tells the SORT subroutines that an interrupted PARTA sort is continued (see 5.2.32).<br />
Format<br />
'CONTA', cycle-number, start-record<br />
where<br />
cycle-number<br />
is the cycle number of the next PARTA tape created.<br />
start-record<br />
is the number of the record at which the continuation begins. This number should<br />
be one more than the last record number on the last PARTA tape created.<br />
All of the input data must be available to the SORT subroutines. The cycle number and<br />
the start record appear in console messages during a PARTA sort and are also listed in<br />
the system log file (see 12.3).<br />
5–10 7831 0687–010
Generated Entries<br />
360000000000<br />
520000000ccc<br />
50ssssssssss<br />
where<br />
ccc<br />
The SORT Subroutine Parameter Tables for MASM Programs<br />
is the 9-bit octal cycle number of the PARTA output.<br />
ssssssssss<br />
is the 30-bit octal start record number.<br />
5.2.10. CONTB Parameter<br />
Function<br />
Tells the SORT subroutines that an interrupted PARTB sort is continued (see 5.2.33).<br />
Format<br />
'CONTB', 'tape-label', reel-number<br />
where<br />
tape-label<br />
is the tape label assigned to the first tape created after restart.<br />
reel-number<br />
is the reel number of that tape. The values for the tape-label and reel-number fields<br />
appear in console messages during a PARTB sort and are also listed in the system<br />
log file (see 12.3).<br />
Generated Entries<br />
370000000000<br />
530000aaaaaa<br />
where aaaaaa is the 18-bit octal address of the 2-word packet that contains the tape label<br />
and reel number of the first tape created after restart.<br />
The structure of the 2-word packet is the following:<br />
word-1 llllllllllll (See tape-label)<br />
word-2 00000000rrrr (See reel-number)<br />
7831 0687–010 5–11
The SORT Subroutine Parameter Tables for MASM Programs<br />
5.2.11. CONTC Parameter<br />
Function<br />
Tells the SORT subroutines that an interrupted PARTC sort is continued (see 5.2.34).<br />
Format<br />
'CONTC', tape-repositioning-table<br />
where tape-repositioning-table is the address of the table where all the necessary<br />
PARTC continuation information is located (see 5.2.34). This information is available<br />
throughout a PARTC operation through the SORT subroutines entry points. It is also<br />
listed in the system log file (see 12.3).<br />
Generated Entries<br />
470000000000<br />
540000aaaaaa<br />
where aaaaaa is the 18-bit octal address of the PARTC tape repositioning table.<br />
5.2.12. COPY Parameter<br />
Function<br />
Allows parameters to be accepted from more than one parameter table.<br />
Format<br />
'COPY', copy-address<br />
where copy-address must be the address of another parameter table that is to be<br />
scanned.<br />
You can nest the COPY parameters within several parameter tables. You can also use<br />
COPY to add a standard set of several sort parameters to your own sort or merge<br />
programs.<br />
Generated Entries<br />
700000aaaaaa<br />
770000bbbbbb<br />
where<br />
aaaaaa<br />
is the 18-bit octal address of a parameter table that is searched before completing<br />
the search of the current parameter table.<br />
bbbbbb<br />
is the 18-bit octal bank descriptor index in L,BDI format of the bank containing the<br />
copy address. This entry is optional. If it is specified, it is used only in an extended<br />
mode sort or an extended mode merge.<br />
5–12 7831 0687–010
5.2.13. CORE Parameter<br />
Function<br />
The SORT Subroutine Parameter Tables for MASM Programs<br />
Specifies the amount and location of the memory for the sort and specifies the type of<br />
memory area to be used in a basic mode or extended mode sort.<br />
For a merge operation, the memory associated with the COMP parameter is only used if<br />
a CORE parameter is also specified. In this case, the memory must be a basic mode<br />
memory area with a size greater than the largest record size.<br />
Format<br />
'CORE', number-of-words [ ,core-address ]<br />
where<br />
number-of-words<br />
must be the number of words of memory that the sort can use. You must make<br />
sure that the memory area is at least as large as this value.<br />
core-address<br />
is the address of the memory area to be used. If you specify this optional value, the<br />
SORT subroutines will not generate a memory area. If you omit this value, the SORT<br />
subroutines<br />
− Automatically generate the memory area immediately following the parameter<br />
table if the number-of-words value is less than or equal to 210,000.<br />
− Allocate an extended mode memory area when the number-of-words value is<br />
greater than 210,000.<br />
A 20 entry with one 77 table entry indicates a basic mode memory area. A 20 entry with<br />
no 77 entries or two 77 table entries indicates an extended mode memory area.<br />
Generated Entries for Basic Mode<br />
20wwwwwwwwww<br />
770000aaaaaa<br />
where:<br />
wwwwwwwwww<br />
aaaaaa<br />
is the 30-bit octal number of words of memory.<br />
is the 18-bit octal address where the memory begins.<br />
The minimum number of words allowed for the CORE parameter is 2000; the maximum<br />
number is 262143.<br />
Note: The minimum size of 2000 is an absolute minimum; for some sorts, the<br />
minimum will be greater.<br />
7831 0687–010 5–13
The SORT Subroutine Parameter Tables for MASM Programs<br />
Generated Entries for Extended Mode<br />
20wwwwwwwwww<br />
770000aaaaaa<br />
770000bbbbbb<br />
where<br />
wwwwwwwwww<br />
aaaaaa<br />
bbbbbb<br />
is the 30-bit octal number of words of memory.<br />
is the 18-bit octal address where the memory begins.<br />
is the 18-bit octal L,BDI of the bank containing the beginning of the memory.<br />
The 77 continuation entries are optional. However, one cannot be specified without the<br />
other.<br />
No 77 continuation entries direct the SORT subroutines to allocate the storage used for<br />
the memory area. The number of words actually allocated falls within the range defined<br />
by the MINIMUM and MAXIMUM configuration parameters (see 9.12 and 9.13).<br />
Specifying the 77 continuation entries indicates to the SORT subroutines that you<br />
allocated the memory area. The number of words allocated must be greater than<br />
210,000.<br />
5.2.14. DEFYEAR Parameter<br />
Function<br />
This parameter tells the SORT subroutines which year is the first year of a 100-year<br />
interval to use when ordering a DATE key field. See 5.2.22 or 5.2.23 (the KEY or KEYW<br />
parameters).<br />
Format<br />
'DEFYEAR', defyear-value<br />
where defyear-value is an integer in the range 0 to 99 to specify the first year of a 100year<br />
interval that <strong>Sort</strong>/<strong>Merge</strong> uses to order a DATE key field.<br />
Generated Entry<br />
260000000ddd<br />
where ddd is the 9-bit octal value representing a year.<br />
A defyear-value of zero causes a DATE key field to be ordered from 0 to 99. A nonzero<br />
defyear-value causes a DATE key field to be ordered from defyear-value, defyearvalue+1,<br />
defyear-value+2, ... , 99, 00, ... , defyear-value–1. If no DEFYEAR parameter is<br />
specified, a default defyear-value of 28 is used when a DATE key field is ordered.<br />
5–14 7831 0687–010
5.2.15. DELCON Parameter<br />
Function<br />
The SORT Subroutine Parameter Tables for MASM Programs<br />
Tells the SORT subroutines to delete all operator console messages during the sort run.<br />
The SORT subroutines still print error termination messages on the operator console.<br />
This parameter is the opposite of the CONSOLE parameter and overrides the CONSOLE<br />
configuration parameter (see 9.4).<br />
Format<br />
'DELCON'<br />
Generated Entry<br />
630000000000<br />
5.2.16. DELLOG Parameter<br />
Function<br />
Omits the normal sort completion messages from the run log. This parameter is the<br />
opposite of the LOG parameter and overrides the LOG configuration parameter (see<br />
9.11).<br />
Format<br />
'DELLOG'<br />
Generated Entry<br />
650000000000<br />
5.2.17. DROC Parameter<br />
Function<br />
Tells the SORT subroutines to execute a user routine, called a data reduction own code<br />
(DROC) routine, each time two records have equal keys. The DROC parameter overrides<br />
the OPTION parameter’s delete duplicate records field (bit 32). (See 6.6.2 for more<br />
information about user data reduction routines.) This parameter cannot be used with an<br />
international sort and is ignored for merge operations.<br />
Format<br />
'DROC', [*]droc-routine-address<br />
where<br />
*<br />
is an asterisk that must be coded if the DROC routine resides in a common bank or<br />
is called by the SORT subroutine common bank. The asterisk generates a BDICALL$<br />
Collector directive rather than the normal BDIREF$ directive.<br />
7831 0687–010 5–15
The SORT Subroutine Parameter Tables for MASM Programs<br />
droc-routine-address<br />
is the address of the user routine to be executed.<br />
Generated Entries<br />
400000aaaaaa<br />
770000bbbbbb<br />
where<br />
aaaaaa<br />
bbbbbb<br />
is the 18-bit octal address of the data reduction own code (DROC) routine.<br />
is the 18-bit octal bank descriptor index (BDI) of the bank containing the DROC<br />
routine.<br />
5.2.18. ERROR Parameter<br />
Function<br />
Tells the SORT subroutines where to transfer control if an error occurs in the SORT<br />
subroutines.<br />
Format<br />
'ERROR', [*]error-routine-address<br />
where<br />
*<br />
is an asterisk that must be coded if the ERROR routine resides in a common bank or<br />
is called by the SORT subroutines common bank. The asterisk generates a<br />
BDICALL$ Collector directive rather than the normal BDIREF$ directive.<br />
error-routine-address<br />
is the address where control transfers when an error occurs.<br />
Once control is transferred to the error-routine-address, SORT or MERGE cannot be<br />
reentered unless you specify one of the following entry points:<br />
• ROPN$<br />
• ROPN$X<br />
• ROPN$CB<br />
• RMGOPN$<br />
• RMGOPN$X<br />
• RMGOPN$CB<br />
5–16 7831 0687–010
Generated Entries<br />
450000aaaaaa<br />
770000bbbbbb<br />
where<br />
aaaaaa<br />
bbbbbb<br />
The SORT Subroutine Parameter Tables for MASM Programs<br />
is the 18-bit octal address where control is transferred when an error occurs.<br />
is the 18-bit octal BDI of the bank containing the ERROR routine.<br />
On return to the ERROR routine, H1 of register A0 contains either a zero or an error<br />
packet address, while H2 of register A0 contains the sort error code (see A.2) as two<br />
Fieldata characters, right-justified and zero-filled.<br />
The format of register A0 is as follows.<br />
Zero or address of error packet Fieldata error code (RJZF)<br />
H2 of the first word in the error packet will always contain an error identifier. If the error<br />
identifier is a 1, then a D5, an F5, or an X4 error has occurred and the error packet is<br />
defined as follows.<br />
where<br />
error address error identifier<br />
Internal file name characters 1-6<br />
Internal file name characters 7-12<br />
status function error type Reserved Reserved Reserved<br />
error address<br />
Reserved I/O packet address<br />
is the address within the sort where the error occurred.<br />
error identifier<br />
status<br />
is the identifier for the error packet.<br />
is the I/O error status.<br />
function<br />
is the I/O error function code.<br />
7831 0687–010 5–17
The SORT Subroutine Parameter Tables for MASM Programs<br />
error type<br />
the error mode type.<br />
I/O packet address<br />
is the address of the scratch file I/O packet receiving the I/O error.<br />
Initialization errors C2, C3, C7, L6, and L7 are not returned to the ERROR routine.<br />
Register X11 is destroyed when control is transferred to the ERROR routine. All other<br />
registers are saved and restored.<br />
5.2.19. FILES Parameter<br />
Function<br />
Lists the names of the scratch files to be used by the SORT subroutines during a sort<br />
operation.<br />
Format<br />
'FILES', 'file-name-1', 'file-name-2', ... , 'file-name-26'<br />
where file-name-1, file-name-2, ..., file-name-26 are the internal names of files to be used<br />
as scratch files by the SORT subroutines during the sort operation. These names can be<br />
from 1 to 12 characters long with no qualifiers. The SORT subroutines will not assign<br />
these files so they must be assigned to the run before initiating the sort operation. Any<br />
file specified in the list that is not assigned to the run will be ignored and the SORT<br />
subroutines will only use those scratch files actually assigned to the run. The order of<br />
the names of the files appearing in the list is immaterial. The FILES parameter is ignored<br />
for merge operations.<br />
Generated Entries<br />
230000aaaaaa<br />
770000bbbbbb<br />
where<br />
aaaaaa<br />
is the 18-bit octal address of the 2-word Fieldata left-justified, space-filled internal file<br />
name. A 23 entry is built for each file name you specify. If you do not use R$FILE,<br />
you must build a table of internal file names.<br />
bbbbbb<br />
is the 18-bit octal bank descriptor index in L,BDI format of the bank containing the<br />
address of the internal file name. This entry is optional. If it is specified, it is used<br />
only for an extended mode sort.<br />
5–18 7831 0687–010
The SORT Subroutine Parameter Tables for MASM Programs<br />
Note: The SORT subroutines provide a predefined parameter table with the names of<br />
the files XA through XZ. If you want to use some or all of these files as the scratch files,<br />
then you may be able to use this predefined parameter table. To use the predefined<br />
parameter table to define the files XA through XZ as scratch, insert the following<br />
parameter in your R$FILE procedure call:<br />
'COPY' ,RSTD$<br />
5.2.20. FINAL Parameter<br />
Function<br />
Tells the SORT subroutines where to transfer control after completion of a PARTA or<br />
PARTB sort.<br />
Format<br />
'FINAL', [*] final-routine-address<br />
where<br />
*<br />
is an asterisk that must be coded if the FINAL routine resides in a common bank or<br />
is called by the SORT subroutines common bank. The asterisk generates a<br />
BDICALL$ Collector directive rather than the normal BDIREF$ directive.<br />
final-routine-address<br />
is the address where control is returned after completing a PARTA or PARTB sort.<br />
Generated Entries<br />
440000aaaaaa<br />
770000bbbbbb<br />
where<br />
aaaaaa<br />
is the 18-bit octal address where control is transferred after completion of a PARTA<br />
or a PARTB sort. If you do not specify this entry, the SORT subroutines terminates<br />
program execution through ER EXIT$.<br />
bbbbbb<br />
is the 18-bit octal BDI of the bank containing the FINAL routine.<br />
5.2.21. FPOC Parameter<br />
Function<br />
Tells the SORT subroutines the address to return to after the sort is initialized.<br />
Format<br />
'FPOC', [*]fpoc-routine-address<br />
7831 0687–010 5–19
The SORT Subroutine Parameter Tables for MASM Programs<br />
where<br />
*<br />
is an asterisk that must be coded if the FPOC routine resides in a common bank or is<br />
called by the SORT subroutines common bank. The asterisk generates a BDICALL$<br />
Collector directive rather than the normal BDIREF$ directive.<br />
fpoc-routine-address<br />
is the address where the user program supplies records to the SORT subroutines<br />
after initialization.<br />
Generated Entries<br />
420000aaaaaa<br />
770000bbbbbb<br />
where<br />
aaaaaa<br />
bbbbbb<br />
is the 18-bit octal address where control is transferred after sort initialization.<br />
is the 18-bit octal BDI of the bank containing the FPOC routine.<br />
5.2.22. KEY Parameter<br />
Function<br />
Specifies a key field used for the sort or merge operation. The KEY parameter has no<br />
effect if the COMP parameter is specified.<br />
Key fields specified by the KEY or KEYW parameters are required for all merge and sort<br />
operations unless an OWN parameter with an exit number 14 or 21 is specified. The<br />
KEY parameter is used to define key fields based on a start character within the record<br />
and a character length. Whereas, the KEYW parameter defines key fields based on a<br />
start word and bit within the record and a bit length.<br />
Format<br />
'KEY', char-pos, number-of-char, 'type[(subtype)]' [,['order'] [,field-number]]<br />
where<br />
char-pos<br />
is an integer specifying the starting character of the key stated in either 6-bit or 9-bit<br />
characters. For key types A, B, D, G, L, M, P, or U, the field is in 6-bit characters.<br />
For key types DATE, I, J, Q, R, S, T, or V, the field is in 9-bit characters. The first<br />
character position of a record is number one (1).<br />
5–20 7831 0687–010
number-of-char<br />
type<br />
The SORT Subroutine Parameter Tables for MASM Programs<br />
specifies the length of the key in 6-bit byte characters (for example, Fieldata<br />
characters) or 9-bit byte characters (for example, ASCII characters), depending on the<br />
type of the key. If a DATE key type is specified, the length of the key field must be<br />
at least 2.<br />
specifies the key type using the following values (see Section 11 for complete<br />
explanations):<br />
A<br />
B<br />
D<br />
DATE<br />
G<br />
I<br />
J<br />
L<br />
M<br />
P<br />
Q<br />
R<br />
specifies that the key is Fieldata alphanumeric.<br />
specifies that the key is signed binary.<br />
specifies that the key is Fieldata sign-leading separate decimal.<br />
specifies that the key is ASCII alphanumeric containing a date where the first 18<br />
bits represent a year.<br />
specifies that the key is Fieldata sign-trailing separate decimal.<br />
specifies that the key contains 9-bit data and that an international sort or merge<br />
should be performed. The data is ordered according to the rules of the locale.<br />
specifies that the key is signed packed decimal.<br />
specifies that the key is Fieldata sign-leading overpunched decimal.<br />
specifies that the key is IBM fixed-point binary.<br />
specifies that the key is Fieldata sign-trailing overpunched decimal.<br />
specifies that the key is ASCII sign-trailing overpunched decimal.<br />
specifies that the key is ASCII sign-leading separate decimal.<br />
7831 0687–010 5–21
The SORT Subroutine Parameter Tables for MASM Programs<br />
S<br />
T<br />
U<br />
V<br />
subtype<br />
order<br />
specifies that the key is ASCII alphanumeric.<br />
specifies that the key is ASCII sign-trailing separate decimal.<br />
specifies that the key is unsigned binary.<br />
specifies that the key is ASCII sign-leading overpunched decimal.<br />
specifies additional information about the type of the key. The optional subtype field<br />
specification is only valid when the type field specifies I. The valid subtype field<br />
specifications for I keys are the following:<br />
IGNORETSP<br />
specifies that trailing spaces within the I key field should be ignored when<br />
ordering the records.<br />
INCLUDETSP<br />
specifies that trailing spaces within the I key field should be included when<br />
ordering the records. If the subtype field is not specified for an I key type, this is<br />
the default specification.<br />
is an optional field. If you specify order, you must assign one of the following values:<br />
A<br />
D<br />
field-number<br />
specifies an ascending sort or merge on this key field. This is the default value.<br />
specifies a descending sort or merge on this key field.<br />
is an integer between 1 and 64 that indicates the significance of the key field: 1 is<br />
the most significant or major key field; 64 is the least significant field.<br />
If you specify field-number for any key field, you must specify it for all the key fields.<br />
If you do not specify field-number, the first key field defined is the major key and any<br />
subsequent key fields are the minor keys.<br />
Generated Entries<br />
Format 1<br />
03ttoobbffff<br />
77wwwwnnnnnn<br />
5–22 7831 0687–010
Format 2<br />
03ttoobbffff<br />
7700ssnnnnnn<br />
770000wwwwww<br />
where<br />
tt<br />
oo<br />
bb<br />
ffff<br />
The SORT Subroutine Parameter Tables for MASM Programs<br />
is the 6-bit octal representation of the Fieldata character used in the type field. For<br />
the DATE key type, the type field will be an octal 40 (040).<br />
is the 6-bit octal representation of the Fieldata character used for the order field.<br />
is a 6-bit octal representation of the most significant bit within the starting word of<br />
the key field. The most significant bit position within a word is 1, the least significant<br />
is 36.<br />
is the 12-bit octal representation of the field-number. It is 0000 if no field-number is<br />
specified.<br />
wwww or wwwwww<br />
ss<br />
is the 12-bit (Format 1) or 18-bit (Format 2) octal representation of the starting word<br />
of the key. The first word of the record is number 0. The SORT subroutines<br />
determine the format of the KEY parameter based on the specification of the second<br />
continuation (77) entry and thus the location of the key starting word field.<br />
is the 6-bit octal representation of the subtype field. 0 represents a subtype field of<br />
INCLUDETSP and 1 represents a subtype field of IGNORETSP. This field is only<br />
valid for Format 2 of the KEY parameter.<br />
nnnnnn<br />
is the 18-bit octal representation for the number of bits in the key field.<br />
The format of the KEY parameter is based on the specification of the second<br />
continuation (77) entry.<br />
Note: Key fields can overlap. If they do, you must observe the guidelines for key types<br />
contained in Table 5–3.<br />
7831 0687–010 5–23
The SORT Subroutine Parameter Tables for MASM Programs<br />
If your major key type is ...<br />
Table 5–3. Key Types<br />
Then the overlapping minor key types<br />
can be only ...<br />
A, D, G, L, or P A* or U<br />
B, J, M, or U U<br />
I B, I, Q, R, S, T, U, or V<br />
DATE, Q, R, S, T, or V S** or U<br />
* The overlapping key type can be A only if an alternate Fieldata collating sequence is not<br />
specified.<br />
** The overlapping key type can be S only if a 128-character or 256-character collating<br />
sequence is not specified.<br />
5.2.23. KEYW Parameter<br />
Function<br />
Specifies a key field for a sort or merge operation. The KEYW parameter has no effect if<br />
the COMP parameter is also specified.<br />
Key fields specified by the KEY or KEYW parameters are required for all merge and sort<br />
operations unless an OWN parameter with an exit number 14 or 21 is specified. The<br />
KEYW parameter defines key fields based on a start word and bit within the record and a<br />
bit length. Whereas, the KEY parameter is used to define key fields based on a start<br />
character within the record and a character length.<br />
Format<br />
'KEYW',word-pos, bit-pos, number-of-bits, 'type[(subtype)]' [,['order'] [,field-number]]<br />
where<br />
word-pos<br />
bit-pos<br />
must be the starting word number of the key field. The first word within a record is<br />
number 1.<br />
indicates the most significant bit of the key field within the first word of the key. The<br />
most significant bit position is number 35, the least significant is number 0.<br />
number-of-bits<br />
specifies how many bits are in the key field. If a DATE key type is specified, the<br />
length of the key field must be at least 18.<br />
5–24 7831 0687–010
type<br />
The SORT Subroutine Parameter Tables for MASM Programs<br />
specifies the key type using the following values (see Section 11 for complete<br />
explanations):<br />
A<br />
B<br />
D<br />
DATE<br />
G<br />
I<br />
J<br />
L<br />
M<br />
P<br />
Q<br />
R<br />
S<br />
T<br />
specifies that the key is Fieldata alphanumeric.<br />
specifies that the key is signed binary.<br />
specifies that the key is Fieldata sign-leading separate decimal.<br />
specifies that the key is ASCII alphanumeric containing a date where the first 18<br />
bits represent a year.<br />
specifies that the key is Fieldata sign-trailing separate decimal.<br />
specifies that the key contains 9-bit data and that an international sort or merge<br />
should be performed. The data is ordered according to the rules of the locale.<br />
specifies that the key is signed packed decimal.<br />
specifies that the key is Fieldata sign-leading overpunched decimal.<br />
specifies that the key is IBM fixed-point binary.<br />
specifies that the key is Fieldata sign-trailing overpunched decimal.<br />
specifies that the key is ASCII sign-trailing overpunched decimal.<br />
specifies that the key is ASCII sign-leading separate decimal.<br />
specifies that the key is ASCII alphanumeric.<br />
specifies that the key is ASCII sign-trailing separate decimal.<br />
7831 0687–010 5–25
The SORT Subroutine Parameter Tables for MASM Programs<br />
U<br />
V<br />
subtype<br />
order<br />
specifies that the key is unsigned binary.<br />
specifies that the key is ASCII sign-leading overpunched decimal.<br />
specifies additional information about the type of the key. The optional subtype field<br />
specification is only valid when the type field specifies I. The valid subtype field<br />
specifications for I keys are the following:<br />
IGNORETSP<br />
specifies that trailing spaces within the I key field should be ignored when<br />
ordering the records.<br />
INCLUDETSP<br />
specifies that trailing spaces within the I key field should be included when<br />
ordering the records. If the subtype field is not specified for an I key type, this is<br />
the default specification.<br />
is an optional field. If you specify order, you must assign one of the following values:<br />
A<br />
D<br />
field-number<br />
specifies an ascending sort or merge on this key field. This is the default value.<br />
specifies a descending sort or merge on this key field.<br />
is an integer between 1 and 64 that indicates the significance of the key field: 1 is<br />
the most significant or major key field; 64 is the least significant field.<br />
If you specify field-number for any key field, you must specify it for all the key fields<br />
you specified. If you do not specify field-number, the first key field defined is the<br />
major key and any subsequent key fields that are defined are the minor keys.<br />
Generated Entries<br />
Format 1<br />
03ttoobbffff<br />
77wwwwnnnnnn<br />
Format 2<br />
03ttoobbffff<br />
7700ssnnnnnn<br />
770000wwwwww<br />
where<br />
5–26 7831 0687–010
tt<br />
oo<br />
bb<br />
ffff<br />
The SORT Subroutine Parameter Tables for MASM Programs<br />
is the 6-bit octal representation of the Fieldata character used in the type field. For<br />
the DATE key type, the type field will be an octal 40 (040).<br />
is the 6-bit octal representation of the Fieldata character used for the order field.<br />
is a 6-bit octal representation of the most significant bit within the starting word of<br />
the key field. The most significant bit position within a word is 1, the least significant<br />
is 36.<br />
is the 12-bit octal representation of the field-number. It is 0000 if no field-number is<br />
specified.<br />
wwww or wwwwww<br />
ss<br />
is the 12-bit (Format 1) or 18-bit (Format 2) octal representation of the starting word<br />
of the key. The first word of the record is number 0. The SORT subroutines<br />
determine the format of the KEYW parameter based on the specification of the<br />
second continuation (77) entry and thus the location of the key starting word field.<br />
is the 6-bit octal representation of the subtype field. 0 represents a subtype field of<br />
INCLUDETSP, and 1 represents a subtype field of IGNORETSP. This field is only<br />
valid for Format 2 of the KEYW parameter.<br />
nnnnnn<br />
is the 18-bit octal representation for the number of bits in the key field.<br />
The format of the KEYW parameter is based on the specification of the second<br />
continuation (77) entry.<br />
Note: Key fields can overlap. If they do, you must observe the guidelines for key types<br />
contained in Table 5–3.<br />
5.2.24. LOCALE Parameter<br />
Function<br />
Specifies the desired locale for the sort or merge operation. Only one LOCALE<br />
parameter should be specified. If an international sort or merge is requested (presence<br />
of an I key) and a LOCALE parameter is not specified, the locale currently in force is used<br />
for the sort or merge operation.<br />
Format<br />
'LOCALE', 'locale-name'<br />
where locale-name is a string that indicates the desired locale for the sort or merge<br />
operation. The locale name can be 1 to 16 characters in length.<br />
7831 0687–010 5–27
The SORT Subroutine Parameter Tables for MASM Programs<br />
Generated Entries<br />
25nn00aaaaaa<br />
770000bbbbbb<br />
where<br />
nn<br />
aaaaaa<br />
bbbbbb<br />
is the number of 9-bit characters in the locale name.<br />
is the 18-bit octal address of the locale name.<br />
is the 18-bit octal bank descriptor index in L,BDI format of the bank containing the<br />
address of the locale name.<br />
5.2.25. LOG Parameter<br />
Function<br />
Tells the SORT subroutines to issue normal sort completion messages to the run log.<br />
This parameter is the opposite of the DELLOG parameter and overrides the LOG<br />
configuration parameter (see 9.11).<br />
Format<br />
'LOG'<br />
Generated Entry<br />
650000000001<br />
5.2.26. LPOC Parameter<br />
Function<br />
Tells the SORT subroutines the address to return to when it is ready to return sorted<br />
records to the user program.<br />
Format<br />
'LPOC', [*]lpoc-routine-address<br />
where<br />
*<br />
is an asterisk that must be coded if the LPOC routine resides in a common bank or is<br />
called by the SORT subroutines common bank. The asterisk generates a BDICALL$<br />
Collector directive rather than the normal BDIREF$ directive.<br />
lpoc-routine-address<br />
is the address returned after sorting.<br />
5–28 7831 0687–010
Generated Entries<br />
430000aaaaaa<br />
770000bbbbbb<br />
where<br />
aaaaaa<br />
The SORT Subroutine Parameter Tables for MASM Programs<br />
is the 18-bit octal address where the SORT subroutines return when they are ready<br />
to transfer sorted records back to the user program.<br />
bbbbbb<br />
is the 18-bit octal BDI of the bank containing the LPOC routine.<br />
5.2.27. NODISK Parameter<br />
Function<br />
Tells the SORT subroutines that the disk module is not collected into your program.<br />
Format<br />
'NODISK'<br />
Generated Entry<br />
160100000000<br />
5.2.28. NOMASS Parameter<br />
Function<br />
Tells the SORT subroutines that the M1 module and the M1–M2 mass storage modules<br />
are not collected into your program.<br />
Format<br />
'NOMASS'<br />
Generated Entry<br />
170000000000<br />
5.2.29. NOTAPE Parameter<br />
Function<br />
Tells the SORT subroutines that the tape module is not collected into your program.<br />
Format<br />
'NOTAPE'<br />
Generated Entry<br />
160000000000<br />
7831 0687–010 5–29
The SORT Subroutine Parameter Tables for MASM Programs<br />
5.2.30. OPTION Parameter<br />
Function<br />
Tells the SORT subroutines what extra information to use during a sort operation.<br />
You can specify multiple OPTION parameters. You must specify an option field in one of<br />
the parameters to be invoked. If you specify the same option field in multiple OPTION<br />
parameters, it is redundant and has the effect of invoking the option field’s functionality.<br />
Format<br />
'OPTION','option-field-1' [,'option-field-2'] ...<br />
where option-field-n specifies the extra information being passed to the SORT<br />
subroutines using the following values:<br />
NO-P-OPTION<br />
indicates that the SORT XQT P option should be suppressed when it is used at<br />
execution time. This permits the use of @XQT,P for other purposes (for example,<br />
TIP). (See 5.4.)<br />
DELETE-DUPS<br />
indicates that duplicate records are to be deleted from the sort.<br />
6BIT-LENGTH<br />
Indicates that 6-bit length records are passed.<br />
9BIT-LENGTH<br />
Indicates that 9-bit length records are passed.<br />
BIT-LENGTH<br />
Indicates that bitlength records are passed.<br />
Generated Entry<br />
67bbbbbbbbbb<br />
where bbbbbbbbbb is a 30-bit field where each bit is an indicator to <strong>Sort</strong>/<strong>Merge</strong>. The<br />
leftmost or most significant bit number is 6 and the least significant bit number is 35.<br />
Each bit is reserved and has the following purpose:<br />
bits 6–29<br />
are reserved for future use. These bits should be zero.<br />
5–30 7831 0687–010
its 30-31<br />
bit 32<br />
bit 33<br />
bit 34<br />
bit 35<br />
5.2.31. PAD Parameter<br />
Function<br />
The SORT Subroutine Parameter Tables for MASM Programs<br />
is a two-bit field used to indicate how records are processed.<br />
Bit 30 Bit 31 Description<br />
0 0 Word length records are passed<br />
0 1 ‘6BIT-LENGTH’ records are passed.<br />
1 0 ‘9BIT-LENGTH’ records are passed.<br />
1 1 ‘BIT-LENGTH’ records are passed.<br />
indicates that DELETE–DUPS is specified.<br />
indicates that the SORT subroutines were called by the Relational Database<br />
Management System (RDMS).<br />
indicates that the SORT subroutines were called by the SORT processor.<br />
indicates that NO–P–OPTION is specified.<br />
Saves space in the parameter table for additional information.<br />
Format<br />
'PAD', number-of-words<br />
where number-of-words is the number of words you want to reserve for future<br />
information. You must place any added information in these locations before the sort is<br />
opened.<br />
Generated Entry<br />
720000000000<br />
A 72 entry is entered in the parameter table for each word you reserve.<br />
5.2.32. PARTA Parameter<br />
Function<br />
Tells the SORT subroutines to perform the distribution phase of a nonautomatic tape sort<br />
(see Section 12). At least one tape drive must be assigned to the run.<br />
7831 0687–010 5–31
The SORT Subroutine Parameter Tables for MASM Programs<br />
Format<br />
'PARTA', 'output-label-prefix'[,recs-per-cycle, reels-per-cycle, block-size]<br />
where<br />
output-label-prefix<br />
is two characters long and contains the first two characters of each tape label<br />
created.<br />
recs-per-cycle<br />
is the maximum number of records to be sorted in any cycle. This field is optional<br />
and is used only when the value is less than the physical record volume limit that can<br />
be sorted with the total facilities assigned.<br />
reels-per-cycle<br />
is optional and specifies the maximum number of tape reels to be produced during<br />
any sort cycle.<br />
block-size<br />
is optional and specifies an integer that represents the maximum block size in words<br />
used on tape. The block size field is ignored if it is greater than 1000 words.<br />
Generated Entries<br />
310000000000<br />
12000000pppp<br />
where pppp is the 12-bit octal representation of the 2-character prefix for all tape labels<br />
created.<br />
If the optional fields are present, the following entries are also generated:<br />
10rrrrrrrrrr<br />
11tttttttttt<br />
13000000bbbb<br />
where<br />
rrrrrrrrrr<br />
tttttttttt<br />
bbbb<br />
the 30-bit octal maximum records per cycle.<br />
is the 30-bit octal maximum number of reels created per cycle.<br />
is the 12-bit octal maximum block size in words allowed on tape.<br />
5–32 7831 0687–010
5.2.33. PARTB Parameter<br />
Function<br />
The SORT Subroutine Parameter Tables for MASM Programs<br />
Tells the SORT subroutines to perform the intermediate merge phase of a nonautomatic<br />
tape sort (see Section 12). At least three tape drives must be assigned to the run.<br />
Format<br />
'PARTB', 'output-label-prefix', 'output-file-name', 'input-file-name-1',<br />
'input-file-name-2' ,..., 'input-file-name-n'<br />
where<br />
output-label-prefix<br />
is 2 characters long and contains the first 2 characters of each tape label created.<br />
output-file-name<br />
is used to assign the tape drive for output. It is from 1 to 12 characters with no<br />
qualifier specified.<br />
input-file-name-1, input-file-name-2, ..., input-file-name-n<br />
are the 6-character labels of the tapes created by a PARTA sort.<br />
Generated Entries<br />
320000000000<br />
12000000pppp<br />
150000oooooo<br />
140000iiiiii<br />
where<br />
pppp<br />
oooooo<br />
iiiiii<br />
is the 12-bit octal representation of the 2-character prefix for all labels created.<br />
is the 18-bit octal address of a 2-word packet that contains the external output file<br />
name.<br />
is the 18-bit octal address of a 1-word entry that contains an input tape label. A 14<br />
entry is generated for each input tape to the PARTB sort.<br />
7831 0687–010 5–33
The SORT Subroutine Parameter Tables for MASM Programs<br />
5.2.34. PARTC Parameter<br />
Function<br />
Tells the SORT subroutines to perform the final merge phase of a nonautomatic tape<br />
sort (see Section 12).<br />
Format<br />
'PARTC', 'input-file-name-1',...,'input-file-name-n'<br />
where input-file-name-1, ..., input-file-name-n are the tape labels created by the last<br />
PARTB sort done on the input tapes. The same number of tape drives used in the last<br />
PARTB sort must be assigned for the PARTC operation.<br />
Generated Entries<br />
330000000000<br />
140000iiiiii<br />
where iiiiii is the 18-bit octal tape label of an input tape to the PARTC sort. Each input<br />
tape to a PARTC sort must have a 14 entry in the parameter table.<br />
5.2.35. PRESERVE Parameter<br />
Function<br />
Determines the output order of records that have equal keys. If you specify PRESERVE,<br />
the output order of records with equal keys is the same as the order in which they were<br />
input. If you perform a merge operation, the order of the records within one input file is<br />
always preserved and PRESERVE is ignored. If you specify PRESERVE and the<br />
DELETE–DUPS bit in the OPTION parameter is specified, the DELETE–DUPS option is<br />
ignored.<br />
Format<br />
'PRESERVE'<br />
Generated Entry<br />
050000000000<br />
5.2.36. RECAREA Parameter<br />
Function<br />
Tells the SORT subroutines where to put the records so that they will be visible to a<br />
basic mode user routine when executing an extended mode sort or an extended mode<br />
merge (in other words, a merge operation initiated by the MASM merge open commonbanked<br />
linkages (see 6.4.1).<br />
Format<br />
'RECAREA', [*]record-area-1,[*]record-area-2<br />
where<br />
5–34 7831 0687–010
*<br />
The SORT Subroutine Parameter Tables for MASM Programs<br />
generates an LBDICALL$ Collector directive. If only one asterisk is specified on<br />
either record-area, the generated L,BDI is used for both record-areas. If an asterisk<br />
is specified for both record-areas, an L,BDI is generated separately for each recordarea.<br />
If an asterisk is not specified, the SORT subroutines determine the L,BDI for<br />
each record-area.<br />
record-area-1 and record-area-2<br />
are addresses where the records will be placed. These addresses cannot be the<br />
same and must be able to hold the largest record.<br />
Generated Entries<br />
460000aaaaaa<br />
770000bbbbbb<br />
770000cccccc<br />
770000dddddd<br />
where<br />
aaaaaa<br />
bbbbbb<br />
cccccc<br />
is the 18-bit octal address of the first record area.<br />
is the 18-bit octal address of the second record area.<br />
is the 18-bit octal L,BDI of the first record area. If the third 77 entry is not present,<br />
cccccc is also the L,BDI of the second record area. If the second 77 entry is not<br />
present, then the SORT subroutine determines the L,BDI of each record area by<br />
examining the banks based on base registers B12–B15.<br />
dddddd<br />
is the 18-bit octal L,BDI of the second record area if the third 77 entry is present.<br />
The second and third 77 entries are optional.<br />
5.2.37. REDOA Parameter<br />
Function<br />
Recreates a portion of a PARTA sort.<br />
Format<br />
'REDOA', cycle-number, start-record, end-record<br />
where<br />
cycle-number<br />
is an integer that specifies the output cycle number after restarting PARTA.<br />
7831 0687–010 5–35
The SORT Subroutine Parameter Tables for MASM Programs<br />
start-record<br />
is an integer that specifies the record number at which the restart begins.<br />
end-record<br />
is an integer that specifies the record number at which the restart ends. The entire<br />
input volume must be accessible to the SORT subroutines to reexecute a portion of<br />
the PARTA output.<br />
The values for the cycle-number, start-record, and end-record fields appear in console<br />
messages during a PARTA sort, and are also listed in the system log file (see 12.3).<br />
Generated Entries<br />
340000000000<br />
520000000ccc<br />
50ssssssssss<br />
51eeeeeeeeee<br />
where<br />
ccc<br />
is the 9-bit octal cycle number of the PARTA output.<br />
ssssssssss<br />
is the 30-bit octal start record number.<br />
eeeeeeeeee<br />
is the 30-bit octal record of the last record re-created.<br />
5.2.38. REDOB Parameter<br />
Function<br />
Re-creates a portion of a PARTB sort.<br />
Format<br />
'REDOB', 'tape-label', reel-number<br />
where<br />
tape-label<br />
is the label assigned to the tape that contains rerun information for the tape that is<br />
re-created. After a PARTB tape is created, rerun information for that tape is written<br />
at the beginning of the next PARTB tape.<br />
reel-number<br />
is the actual reel number of the tape containing the rerun information needed to recreate<br />
the PARTB tape. The values for the tape-label and reel-number fields appear<br />
as console messages during a PARTB sort, and are also listed in the system log file<br />
(see 12.3).<br />
5–36 7831 0687–010
Generated Entries<br />
350000000000<br />
530000aaaaaa<br />
The SORT Subroutine Parameter Tables for MASM Programs<br />
where aaaaaa is the 18-bit octal address of a 2-word packet containing the tape label and<br />
reel number of the tape that holds the rerun information. The 2-word packet has the<br />
following structure:<br />
word-1: llllllllllll (See tape-label)<br />
word-2: 00000000rrrr (See reel-number)<br />
5.2.39. RSZ Parameter<br />
Function<br />
Specifies the size of fixed-length records in terms of 6-bit characters.<br />
Format<br />
'RSZ', 6-bit-characters-per-record<br />
where 6-bit-characters-per-record is the fixed-length record size in terms of 6-bit<br />
characters.<br />
Generated Entry<br />
01ggnnnnnnnn<br />
where<br />
gg<br />
is a 6-bit field indicating the granularity of nnnnnnnn. This field is set to 01 for the<br />
RSZ specification to indicate 6-bit character granularity.<br />
nnnnnnnn<br />
is a 24-bit octal number of 6-bit characters per record.<br />
5.2.40. RSZA Parameter<br />
Function<br />
Specifies the size of fixed-length records in terms of 9-bit characters.<br />
Format<br />
'RSZA', 9-bit-characters-per-record<br />
where 9-bit-characters-per-record is the fixed-length record size in 9-bit characters.<br />
Generated Entry<br />
01ggnnnnnnnn<br />
where<br />
7831 0687–010 5–37
The SORT Subroutine Parameter Tables for MASM Programs<br />
gg<br />
is a 6-bit field indicating the granularity of nnnnnnnn. This field is set to 02 for the<br />
RSZA specification to indicate 9-bit character granularity.<br />
nnnnnnnn<br />
is a 24-bit octal number of 9-bit characters per record.<br />
5.2.41. RSZB Parameter<br />
Function<br />
Specifies the size of fixed-length records in terms of bits.<br />
Format<br />
'RSZB', bits-per-record<br />
where bits-per-record is the fixed-length record size as expressed in bits.<br />
Generated Entry<br />
01ggnnnnnnnn<br />
where<br />
gg<br />
is a 6-bit field indicating the granularity of nnnnnnnn. This field is set to 03 for the<br />
RSZB specification to indicate bit granularity.<br />
nnnnnnnn<br />
is a 24-bit octal number of bits per record.<br />
5.2.42. RSZW Parameter<br />
Function<br />
Specifies the size of fixed-length records in terms of words.<br />
Format<br />
'RSZW', words-per-record<br />
where words-per-record is the fixed-length record size.<br />
Generated Entry<br />
01ggnnnnnnnn<br />
where<br />
gg<br />
is a 6-bit field indicating the granularity of nnnnnnnn. This field is set to 00 for the<br />
RSZW specification to indicate word granularity.<br />
5–38 7831 0687–010
nnnnnnnn<br />
The SORT Subroutine Parameter Tables for MASM Programs<br />
is a 24-bit octal number of words per record.<br />
5.2.43. SEQ Parameter<br />
Function<br />
Generates an alternate Fieldata collating sequence table for type A key fields (see 5.2.22<br />
and 5.2.23).<br />
The SEQ and SEQF parameters cannot be specified in the list of parameters for a sort or<br />
merge operation. The SEQ parameter can be specified with SEQA, SEQB, SEQC,<br />
SEQD, SEQE, or SEQK parameters.<br />
Format<br />
'SEQ', n1, n2, n3 [,'UPTO'], ni, nj [,'ALL']<br />
where<br />
n1, n2, n3, ni, and nj<br />
UPTO<br />
ALL<br />
are octal values that represent the new collating order for type A key fields. You can<br />
list all 64 values, if necessary. If you do not list them all, you must use the ALL<br />
option to fill in the collating table with the remainder of the values that you do not<br />
explicitly specify.<br />
can be used to specify a range of numbers that is to appear in sequence in the<br />
collating table.<br />
lists all octal values in the collating table that you do not explicitly specify in the n<br />
fields.<br />
Generated Entries<br />
040000aaaaaa<br />
770000bbbbbb<br />
where<br />
aaaaaa<br />
bbbbbb<br />
is the 18-bit octal address of the alternate Fieldata collating sequence.<br />
is the 18-bit octal bank descriptor index in the L,BDI format of the bank containing<br />
the address of the alternate Fieldata sequence. This entry is optional and is used for<br />
an extended mode sort only.<br />
7831 0687–010 5–39
The SORT Subroutine Parameter Tables for MASM Programs<br />
If you do not use R$FILE to define your parameter table, your program must generate a<br />
64-word table that contains the type A key fields with the alternate collating sequence<br />
you want in the rightmost bit positions of each word. Only one character per word is<br />
allowed.<br />
5.2.44. SEQA Parameter<br />
Function<br />
Generates a 128-character collating sequence table used by type S key fields (see 5.2.22<br />
and 5.2.23).<br />
The SEQA parameter cannot be specified with the SEQB, SEQC, SEQD, SEQE, or SEQK<br />
parameters in the list of parameters for a sort or merge operation. The SEQA parameter<br />
can be specified with either the SEQ or SEQF parameter.<br />
Format<br />
'SEQA', n1, n2, n3 [,'UPTO'], ni, nj [,'ALL']<br />
where<br />
n1, n2, n3, ni, and nj<br />
UPTO<br />
ALL<br />
are octal values that represent the new collating order for type S key fields. You can<br />
list all 128 values, if necessary. If you do not list them all, you must use the ALL<br />
option to fill in the collating table with the remainder of the values that you do not<br />
explicitly specify.<br />
can be used to specify a range of numbers that is to appear in sequence in the<br />
collating table.<br />
lists all octal values in the collating table that you do not explicitly specify in the n<br />
fields.<br />
Generated Entries<br />
070000aaaaaa<br />
770000bbbbbb<br />
where<br />
aaaaaa<br />
bbbbbb<br />
is the 18-bit octal address of the 128-character collating sequence table.<br />
is the 18-bit octal bank descriptor index in the L,BDI format of the bank containing<br />
the address of the collating sequence table. This entry is optional and is used for an<br />
extended mode sort only.<br />
5–40 7831 0687–010
The SORT Subroutine Parameter Tables for MASM Programs<br />
If you do not use R$FILE to define your parameter table, your program must generate a<br />
128-word table that contains the type S key fields with the alternate collating sequence<br />
you want in the rightmost bit positions of each word. Only one character per word is<br />
allowed.<br />
5.2.45. SEQB Parameter<br />
Function<br />
Generates a 128-character collating sequence table for type S key fields (see 5.2.22 and<br />
5.2.23) with the following sequence:<br />
1. Space<br />
2. Alphabetic characters (A, a, B, b,...)<br />
3. Numeric characters<br />
4. Special characters from 0 to 0177<br />
The SEQB parameter cannot be specified with the SEQA, SEQC, SEQD, SEQE, or SEQK<br />
parameters in the list of parameters for a sort or merge operation. The SEQB parameter<br />
can be specified with either the SEQ or SEQF parameter.<br />
Format<br />
'SEQB'<br />
Generated Entries<br />
070000aaaaaa<br />
770000bbbbbb<br />
where<br />
aaaaaa<br />
bbbbbb<br />
is the 18-bit octal address of the 128-character collating sequence table.<br />
is the 18-bit octal bank descriptor index in the L,BDI format of the bank containing<br />
the address of the collating sequence table. This entry is optional and is used for an<br />
extended mode sort only.<br />
If you do not use R$FILE to define your parameter table, your program must generate a<br />
128-word table that contains the type S key fields with the alternate collating sequence<br />
you want in the rightmost bit positions of each word. Only one character per word is<br />
allowed.<br />
7831 0687–010 5–41
The SORT Subroutine Parameter Tables for MASM Programs<br />
5.2.46. SEQC Parameter<br />
Function<br />
Generates a 256-character collating sequence table used with type S key fields (see<br />
5.2.22 and 5.2.23).<br />
The SEQC parameter cannot be specified with the SEQA, SEQB, SEQD, SEQE, or SEQK<br />
parameters in the list of parameters for a sort or merge operation. The SEQC parameter<br />
can be specified with either the SEQ or SEQF parameter.<br />
Format<br />
'SEQC', n1, n2, n3 [,'UPTO'], ni, nj [,'ALL']<br />
where<br />
n1, n2, n3, ni, and nj<br />
UPTO<br />
ALL<br />
are octal values that represent the new collating order for type S key fields. You can<br />
list all 256 values, if necessary. If you do not list them all, you must use the ALL<br />
option to fill in the collating table with the remainder of the values that you do not<br />
explicitly specify.<br />
can be used to specify a range of numbers that is to appear in sequence in the<br />
collating table.<br />
lists all octal values in the collating table that you do not explicitly specify in the n<br />
fields.<br />
Description<br />
Specify the fields in the same way you specify SEQA. Do not use SEQC in the same<br />
program with SEQA.<br />
Generated Entries<br />
240000aaaaaa<br />
770000bbbbbb<br />
where<br />
aaaaaa<br />
bbbbbb<br />
is the 18-bit octal address of the 256-character collating sequence table.<br />
is the 18-bit octal bank descriptor index in the L,BDI format of the bank containing<br />
the address of the collating sequence table. This entry is optional and is used for an<br />
extended mode sort only.<br />
5–42 7831 0687–010
The SORT Subroutine Parameter Tables for MASM Programs<br />
If you do not use R$FILE to define your parameter table, your program must generate a<br />
256-word table that contains the type S key fields with the alternate collating sequence<br />
you want in the rightmost bit positions of each word. Only one character per word is<br />
allowed.<br />
5.2.47. SEQD Parameter<br />
Function<br />
Automatically generates a 256-character collating sequence table used with type S key<br />
fields (see 5.2.22 and 5.2.23) in the following sequence:<br />
1. Alphabetic characters (A, a, B, b)<br />
2. Numeric characters<br />
3. Space<br />
4. Special characters<br />
The SEQD parameter cannot be specified with the SEQA, SEQB SEQC, SEQE, or SEQK<br />
parameters in the list of parameters for a sort or merge operation. The SEQD parameter<br />
can be specified with either the SEQ or SEQF parameter.<br />
Format<br />
'SEQD'<br />
Generated Entries<br />
240000aaaaaa<br />
770000bbbbbb<br />
where<br />
aaaaaa<br />
bbbbbb<br />
is the 18-bit octal address of the 256-character collating sequence table.<br />
is the 18-bit octal bank descriptor index in the L,BDI format of the bank containing<br />
the address of the collating sequence table. This entry is optional and is used for an<br />
extended mode sort only.<br />
If you do not use R$FILE to define your parameter table, your program must generate a<br />
256-word table that contains the type S key fields with the alternate collating sequence<br />
you want in the rightmost bit positions of each word. Only one character per word is<br />
allowed.<br />
5.2.48. SEQE Parameter<br />
Function<br />
Automatically generates a 256-character collating sequence table used with type S key<br />
fields (see 5.2.22 and 5.2.23). The sequence is based on the EBCDIC collating<br />
sequence.<br />
7831 0687–010 5–43
The SORT Subroutine Parameter Tables for MASM Programs<br />
The SEQE parameter cannot be specified with the SEQA, SEQB SEQC, SEQD, or SEQK<br />
parameters in the list of parameters for a sort or merge operation. The SEQE parameter<br />
can be specified with either the SEQ or SEQF parameter.<br />
Format<br />
'SEQE'<br />
Generated Entries<br />
240000aaaaaa<br />
770000bbbbbb<br />
where<br />
aaaaaa<br />
bbbbbb<br />
is the 18-bit octal address of the 256-character collating sequence table.<br />
is the bank descriptor index in the L,BDI format of the bank containing the address of<br />
the collating sequence table. This entry is optional and is used for an extended<br />
mode sort only.<br />
If you do not use R$FILE to define your parameter table, your program must generate a<br />
256-word table that contains the type S key fields with the alternate collating sequence<br />
you want in the rightmost bit positions of each word. Only one character per word is<br />
allowed.<br />
5.2.49. SEQF Parameter<br />
Function<br />
Automatically generates a 64-character Fieldata collating sequence table in the following<br />
sequence for all type A key fields:<br />
1. Space<br />
2. Alphabetic characters<br />
3. Numeric characters<br />
4. All special characters from 0 to 077<br />
The SEQF and SEQ parameters cannot be specified in the list of parameters for a sort or<br />
merge operation. The SEQF parameter can be specified with SEQA, SEQB, SEQC,<br />
SEQD, SEQE, or SEQK parameters.<br />
Format<br />
'SEQF'<br />
Generated Entries<br />
040000aaaaaa<br />
770000bbbbbb<br />
5–44 7831 0687–010
where<br />
aaaaaa<br />
bbbbbb<br />
The SORT Subroutine Parameter Tables for MASM Programs<br />
is the address of the alternate Fieldata collating sequence.<br />
is the bank descriptor index in the L,BDI format of the bank containing the address of<br />
the Fieldata collating sequence table. This entry is optional and is used for an<br />
extended mode sort only.<br />
If you do not use R$FILE to define your parameter table, your program must generate a<br />
64-word table that contains the type A key fields with the alternate collating sequence<br />
you want in the rightmost bit positions of each word. Only one character per word is<br />
allowed.<br />
5.2.50. SEQK Parameter<br />
Function<br />
Automatically generates a 256-character collating sequence table in the same manner as<br />
the SEQD parameter except that the katakana character sequence is included before the<br />
special characters.<br />
The SEQK parameter cannot be specified with the SEQA, SEQB SEQC, SEQD, or SEQE<br />
parameters in the list of parameters for a sort or merge operation. The SEQK parameter<br />
can be specified with either the SEQ or SEQF parameter.<br />
Format<br />
'SEQK'<br />
Generated Entries<br />
240000aaaaaa<br />
770000bbbbbb<br />
where<br />
aaaaaa<br />
bbbbbb<br />
is the address of the 256-character collating sequence table.<br />
is the bank descriptor index in the L,BDI format of the bank containing the address of<br />
the collating sequence table. This entry is optional and is only used for an extended<br />
mode sort.<br />
If you do not use R$FILE to define your table, your program must generate a 256-word<br />
table that contains the type S key fields with the alternate collating sequence you want<br />
in the rightmost bit positions of each word. Only one character per word is allowed.<br />
7831 0687–010 5–45
The SORT Subroutine Parameter Tables for MASM Programs<br />
5.2.51. SMRG Parameter<br />
Function<br />
Tells the SORT subroutines to perform an automatic tape sort (see 12.3). This type of<br />
sort requires at least three tape drives. The operator is also required to label and mount<br />
tapes as needed.<br />
Format<br />
'SMRG', 'output-label-prefix' [,records-per-cycle, reels-per-cycle]<br />
where<br />
output-label-prefix<br />
is two characters, used as the first two characters of each tape label created.<br />
records-per-cycle<br />
is a number that specifies the maximum number of records that are sorted in any<br />
cycle. This field is optional and is used only when this value is less than the physical<br />
record volume limit that can be sorted with the total facilities assigned.<br />
reels-per-cycle<br />
is a number that specifies the maximum number of tape reels to be produced in any<br />
sort cycle. This is an optional field.<br />
Generated Entries<br />
300000000000<br />
12000000pppp<br />
where pppp is the 12-bit octal representation of the 2-character prefix for all tape labels<br />
created.<br />
If the optional fields are present, the following entries are generated:<br />
10rrrrrrrrrr<br />
11tttttttttt<br />
where<br />
rrrrrrrrrr<br />
tttttttttt<br />
is the 30-bit octal maximum records per cycle.<br />
is the 30-bit octal maximum number of reels created per cycle.<br />
5–46 7831 0687–010
5.2.52. VOL Parameter<br />
Function<br />
The SORT Subroutine Parameter Tables for MASM Programs<br />
Tells the SORT subroutines approximately how many records to sort.<br />
Format<br />
'VOL', thousands-of-records<br />
where thousands-of-records gives the record count in thousands of records.<br />
Generated Entry<br />
64nnnnnnnnnn<br />
where nnnnnnnnnn is the 30-bit octal record count in thousands of records.<br />
5.2.53. VRSZ Parameter<br />
Function<br />
Specifies the maximum length of variable-length records and the minimum link size of<br />
the input record in terms of 6-bit characters.<br />
Format<br />
'VRSZ', max-char-per-rec, min-char-per-link<br />
where<br />
max-char-per-rec<br />
specifies the maximum number of 6-bit characters a record can contain.<br />
min-char-per-link<br />
specifies the minimum number of 6-bit characters required to contain all the key<br />
fields in the records. See Section 10 for variable-length record efficiency<br />
considerations.<br />
Generated Entries<br />
01ggnnnnnnnn<br />
02ggllllllll<br />
where<br />
gg<br />
is a 6-bit field indicating the granularity of the nnnnnnnn or llllllll. This field is set<br />
to 01 for the VRSZ specification to indicate 6-bit granularity.<br />
nnnnnnnn<br />
is the 24-bit octal number of 6-bit characters per record in the largest record.<br />
7831 0687–010 5–47
The SORT Subroutine Parameter Tables for MASM Programs<br />
llllllll<br />
is the 24-bit octal representation of the minimum link size in 6-bit characters.<br />
5.2.54. VRSZA Parameter<br />
Function<br />
Specifies the maximum length of variable-length records and the minimum link size of<br />
the input record in terms of 9-bit characters.<br />
Format<br />
'VRSZA', max-char-per-rec, min-char-per-link<br />
where<br />
max-char-per-rec<br />
specifies the maximum number of 9-bit characters a record can contain.<br />
min-char-per-link<br />
specifies the minimum number of 9-bit characters required to contain all the key<br />
fields in the records. See Section 10 for variable-length record efficiency<br />
considerations.<br />
Generated Entries<br />
01ggnnnnnnnn<br />
02ggllllllll<br />
where<br />
gg<br />
is a 6-bit field indicating the granularity of the nnnnnnnn or llllllll. This field is set<br />
to 02 for the VRSZA specification to indicate 9-bit granularity.<br />
nnnnnn<br />
is the 24-bit octal number of 9-bit characters per record in the largest record.<br />
llllllll<br />
is the 24-bit octal representation of the minimum link size in 9-bit characters.<br />
5.2.55. VRSZB Parameter<br />
Function<br />
Specifies the maximum length of variable-length records and the minimum link size of<br />
the input record in terms of bits.<br />
Format<br />
'VRSZB', max-bits-per-rec, min-bits-per-link<br />
where<br />
5–48 7831 0687–010
max-bits-per-rec<br />
The SORT Subroutine Parameter Tables for MASM Programs<br />
specifies the maximum number of bits a record can contain.<br />
min-bits-per-link<br />
specifies the minimum number of bits required to contain all the key fields in the<br />
records. See Section 10 for variable-length record efficiency considerations.<br />
Generated Entries<br />
01ggnnnnnnnn<br />
02ggllllllll<br />
where<br />
gg<br />
is a 6-bit field indicating the granularity of the nnnnnnnn or llllllll. This field is set<br />
to 03 for the VRSZB specification to indicate bit granularity.<br />
nnnnnn<br />
is the 24-bit octal number of bits per record in the largest record.<br />
llllllll<br />
is the 24-bit octal representation of the minimum link size in bits.<br />
5.2.56. VRSZW Parameter<br />
Function<br />
Specifies the maximum length of variable-length records and the minimum link size of<br />
the input record in terms of words.<br />
Format<br />
'VRSZW', max-words-per-rec, min-words-per-link<br />
where<br />
max-words-per-rec<br />
specifies the maximum number of words a record can contain.<br />
min-words-per-link<br />
specifies the minimum number of words required to contain all the key fields in the<br />
records. See Section 10 for variable-length record efficiency considerations.<br />
Generated Entries<br />
01ggnnnnnnnn<br />
02ggllllllll<br />
where<br />
7831 0687–010 5–49
The SORT Subroutine Parameter Tables for MASM Programs<br />
gg<br />
is a 6-bit field indicating the granularity of the nnnnnnnn or llllllll. This field is set<br />
to 00 for the VRSZW specification to indicate word granularity.<br />
nnnnnn<br />
is the 24-bit octal number of words per record in the largest record.<br />
llllllll<br />
is the 24-bit octal representation of the minimum link size in words.<br />
5.3. Coding Parameter Table Entries as Constants<br />
Follow these steps to code the parameter table entries as constants in your MASM<br />
program:<br />
1. Code a start table entry and an end table entry:<br />
Format<br />
000000aaaaaa (start table entry)<br />
710000aaaaaa (end table entry)<br />
where aaaaaa is the 18-bit octal address of the table in both the start table and end<br />
table entries.<br />
2. Code the table entries that define the information being passed to the SORT<br />
subroutines between the start table entry and the end table entry:<br />
a. Find the appropriate R$FILE parameter.<br />
b. Check the generated entry or entries for the parameter (see 5.2)<br />
c. Code the value of the generated entries as constants in your MASM program.<br />
Example<br />
Perform the following steps to code the amount of memory to be allocated for a sort<br />
as a constant.<br />
Step 1: Find the R$FILE parameter. The parameter is CORE.<br />
Step 2: Check the CORE parameter description (see 5.2.13) to find the entries<br />
generated by the CORE parameter. The generated entries for basic mode are<br />
the following:<br />
20wwwwwwwwww<br />
770000aaaaaa<br />
where<br />
wwwwwwwwww<br />
is the 18-bit octal number of words of memory to be allocated.<br />
5–50 7831 0687–010
770000<br />
aaaaaa<br />
The SORT Subroutine Parameter Tables for MASM Programs<br />
is the continuation code to show that more than one specification is required for<br />
the parameter.<br />
is the 18-bit octal address where working storage begins.<br />
3. Code the values of the generated entries as constants in your MASM program. See<br />
the MASM <strong>Programming</strong> Reference Manual for help.<br />
5.4. Using Execution-Time Parameters<br />
The SORT subroutines read most parameters at assembly time. However, some are<br />
read at execution time. Any cards punched by the IPURI$ linkage (see 6.3.1) must be<br />
read at execution time during a CONTC operation. You must use the following<br />
runstream pattern to force the SORT subroutines to read parameter cards or the IPURI$<br />
deck:<br />
@XQT,P sort-program-name<br />
.<br />
.<br />
.<br />
parameters/IPURI$ cards<br />
.<br />
.<br />
.<br />
@EOF A<br />
When the sort program encounters the P execution option, it issues an AREAD$<br />
Executive request that causes the execution-time parameters to be read.<br />
Use the R$FILE parameter OPTION, NO–P–OPTION to suppress the use of the P option<br />
for SORT execution-time parameters (see 5.2.30).<br />
Note: The P option is ignored and therefore cannot include execution-time parameters<br />
when your sort program is running under Transaction Processing (TIP) (AREAD$ is an<br />
invalid Executive request under TIP).<br />
The following R$FILE parameters can be accepted at execution time:<br />
BIAS, CHECK, CHECKD, CHECKF, CHECKK, CHECKT, CONTA, CONTB, CONTC, DELCON,<br />
DELLOG, PARTA, PARTB, PARTC, REDOA, REDOB, SMRG, VRSZ, VRSZW, VOL<br />
The format for these parameters is the same as the format for assembly-time<br />
parameters, described in 5.3.<br />
7831 0687–010 5–51
The SORT Subroutine Parameter Tables for MASM Programs<br />
The following are non-R$FILE parameters and are accepted at execution time only.<br />
These parameters are not enclosed in quotation marks because they are not R$FILE<br />
parameters. Table 5–4 contains the execution-time parameters.<br />
Table 5–4. Execution-Time Parameters<br />
Parameter Description<br />
LIMDRM Specifies the minimum acceptable block size for the one-level (M1) module.<br />
LIMFST Specifies the minimum acceptable block size for the two-level (M1–M2)<br />
module.<br />
PSORT Deletes all parameter table entries that were generated by the SMRG<br />
parameter.<br />
R$NCDS Omits the execution-time parameter routine from the final sort program<br />
collection.<br />
The following subsections describe and define each of these parameters in detail.<br />
5.4.1. LIMDRM Parameter<br />
Function<br />
Tells the SORT subroutines that the minimum block size acceptable for the M1 module<br />
is specified by the minimum–M1 field. If a block size for M1 is calculated less than this<br />
value, an error message is issued and the sort program terminates.<br />
Format<br />
LIMDRM, minimum-M1<br />
where minimum–M1 is the minimum block size in words.<br />
5.4.2. LIMFST Parameter<br />
Function<br />
Is the same as LIMDRM except that it applies to the block size calculation for the M2<br />
module.<br />
Format<br />
LIMFST, minimum-M2<br />
where minimum–M2 is the minimum block size in words.<br />
5–52 7831 0687–010
5.4.3. PSORT Parameter<br />
Function<br />
The SORT Subroutine Parameter Tables for MASM Programs<br />
Deletes all parameter table entries that were generated by the SMRG parameter. This<br />
parameter is mainly for ASCII COBOL users since the parameter table generated by<br />
ASCII COBOL always has SMRG specified. If no tapes are assigned to the sort program,<br />
this parameter is not needed.<br />
Format<br />
PSORT<br />
5.4.4. R$NCDS Procedure<br />
If execution-time parameters are not being used by a particular sort program, you can<br />
use the R$NCDS procedure to omit the execution-time parameter routine from the final<br />
sort program collection. The R$NCDS procedure is only meaningful when you use the<br />
standard or extended linkages (see 6.2).<br />
You must not use the R$NCDS procedure call in a sort program that uses the @XQT<br />
statement with a P option, unless the OPTION, NO–P–OPTION R$FILE parameter is<br />
specified. If you do, the sort program issues a diagnostic message and terminates.<br />
5.5. Using Multiple Parameter Tables<br />
The SORT subroutines allow a single sort or merge run to use more than one parameter<br />
table. For each COPY parameter (070 table entry) found during a search, the SORT<br />
subroutines interrupt the search pattern and go to the next parameter table you<br />
specified. When an end table code (the 071 table entry) is found, the SORT subroutines<br />
return to the point where the COPY parameter was found in the previous table. This<br />
sequence can be nested.<br />
The following graphic illustrates the multitable searching process.<br />
(1) 00 entry<br />
.<br />
.<br />
.<br />
Main–Table Table–1 Table–2<br />
(2) 070 entry (to Table-1)<br />
(9) .<br />
.<br />
.<br />
(3) 00 entry<br />
.<br />
.<br />
.<br />
(4) 070 entry (to Table-2)<br />
(7) .<br />
.<br />
.<br />
(5) 00 entry<br />
(10) 071 entry (8) 071 entry (to Main-Table) (6) 071 entry (to Table-1)<br />
7831 0687–010 5–53<br />
.<br />
.<br />
.<br />
.<br />
.<br />
.
The SORT Subroutine Parameter Tables for MASM Programs<br />
The search sequence with these parameter tables follows this pattern:<br />
1. Start search in Main-Table at the 00 entry.<br />
2. Link to Table-1 at the 070 entry in Main-Table.<br />
3. Continue search in Table-1 at the 00 entry.<br />
4. Link to Table-2 at the 070 entry in Table-1.<br />
5. Continue search in Table-2 at the 00 entry.<br />
6. Return to Table-1 upon finding the 071 entry in Table-2.<br />
7. Search Table-1 starting at the point of return from Table-2.<br />
8. Return to Main-Table upon finding the 071 entry in Table-1.<br />
9. Search Main-Table starting at the point of return from Table-1.<br />
10. End search upon finding the 071 entry in Main-Table.<br />
When the SORT subroutines find the code for which they are searching, the search<br />
operation stops. The next search operation then starts at the 00 entry in Main-Table.<br />
5–54 7831 0687–010
Section 6<br />
MASM Program Linkages<br />
This section describes the standard, extended, and common bank linkages you use to<br />
call the SORT subroutines from a MASM program.<br />
To enter standard or common bank linkages, you can use procedure calls alone,<br />
procedure calls combined with MASM statements, or MASM statements alone. The<br />
methods for procedure calls alone and MASM statements alone are shown in the<br />
subsections that follow. You choose the method you prefer.<br />
There are no procedure calls for extended linkages, so you must code the MASM<br />
statements into your program to use them. The MASM statements you need are shown<br />
for each extended linkage.<br />
Both standard and extended linkages access the relocatable SORT subroutines, but they<br />
differ in how they handle the D-bank space reserved for the SORT subroutines. This<br />
difference is explained as follows:<br />
• Standard linkages reference relocatable D-bank elements supplied by the SORT<br />
subroutines. These linkages are available for compatibility reasons, but are not<br />
recommended.<br />
• Extended linkages require you to supply the address for the D-bank space located in<br />
your own MASM program.<br />
Common bank linkages access the common bank SORT subroutines. You supply the<br />
address for the D-bank space located in your MASM program, just as you do for<br />
extended linkages.<br />
The common bank SORT subroutines do not require you to re-collect your program when<br />
you modify the <strong>Sort</strong>/<strong>Merge</strong> product. For this reason, use the common bank subroutines<br />
whenever you can. To access the extended mode SORT subroutines, you must use the<br />
common bank subroutines.<br />
7831 0687–010 6–1
MASM Program Linkages<br />
6.1. MASM Procedure Definition Elements<br />
Before you can access the SORT subroutines with the MASM linkages, you must make<br />
the SORT procedure definitions available to your MASM source program. The following<br />
are two methods for making these definitions available:<br />
Method 1<br />
Use this method for standard and common bank linkages.<br />
This method accesses a MASM definition-mode element called RPROC$. MASM runs<br />
more efficiently with definition-mode elements and RPROC$ provides better error<br />
diagnostics than does the RPROCS$ method. This method also supports all parameters,<br />
options, and standard common bank linkages. The RPROCS$ method does not support<br />
some of the newer parameters and options.<br />
Code the following source statement in your program:<br />
$INCLUDE 'RPROC$'<br />
See Appendix C for an example using the $INCLUDE statement. For more information<br />
on coding an $INCLUDE statement, see the MASM <strong>Programming</strong> Reference Manual.<br />
If the SORT subroutines common bank is called from another common bank, special<br />
care is required for any COMP, DROC, ERROR, FINAL, FPOC or LPOC routines.<br />
A collector EQU directive must be entered for each routine used. The format for this<br />
directive is as follows:<br />
Format<br />
EQU epname/0bbbbbbeeeeee<br />
where<br />
epname<br />
is the externally-defined label of the COMP, DROC, ERROR, FINAL, FPOC or LPOC<br />
routine.<br />
bbbbbb<br />
eeeeee<br />
is the 18-bit octal Exec BDI value for the bank containing the routine.<br />
is the 18-bit octal Collector address assigned to the external label (obtainable from an<br />
L-option MAP). The eeeeee value can change if the subprogram containing the<br />
routine is changed.<br />
6–2 7831 0687–010
Method 2<br />
Use this method for standard linkages only.<br />
MASM Program Linkages<br />
This method accesses the Procedure Definition Processor (PDP) element RPROCS$.<br />
The RPROCS$ procedure element is installed in the system procedure library file<br />
SYS$LIB$*PROC$ (part of the MASM library search chain).<br />
You cannot use the I$PURI, R$MGREL, R$MGREQ, R$MGOPN, or R$QEND linkages<br />
with RPROCS$. Also RPROCS$ does not support some of the newer parameters and<br />
options.<br />
6.2. MASM <strong>Sort</strong> Program Linkages<br />
From a MASM program you can perform standard, extended, and common bank<br />
linkages. The following subsection describes the linkages you use to perform a sort<br />
operation.<br />
When you perform a sort operation, follow five basic steps using the appropriate sort<br />
linkage to do each one. To establish the sort linkages, do the following:<br />
1. Open the sort operation with one of the following sort linkages:<br />
a. ROPN$ (standard)<br />
b. ROPN$X (extended)<br />
c. ROPN$CB (common bank)<br />
2. Release records to the sort with one of the following sort linkages:<br />
a. RREL$ (standard)<br />
b. RREL$X (extended)<br />
c. RREL$CB (common bank)<br />
3. End input of records and start the sort with one of the following sort linkages:<br />
a. RSORT$ (standard)<br />
b. RSORT$X (extended)<br />
c. RSORT$CB (common bank)<br />
4. Retrieve sorted records from the sort with one of the following sort linkages:<br />
a. RRET$ (standard)<br />
b. RRET$X (extended)<br />
c. RRET$CB (common bank)<br />
5. Close the sort with one of the following sort linkages:<br />
a. RQEND$ (standard)<br />
b. RQEND$X (extended)<br />
c. RQEND$CB (common bank)<br />
7831 0687–010 6–3
MASM Program Linkages<br />
The following subsections describe the particular SORT subroutine program linkages.<br />
6.2.1. MASM <strong>Sort</strong> Open Linkages<br />
The sort open linkages initialize the SORT subroutines. A sort open linkage must be the<br />
first linkage to the SORT subroutines from every user sort program.<br />
Table 6–1 describes the call formats and MASM statements for each SORT subroutine<br />
sort open linkage type.<br />
Table 6–1. MASM Statements for <strong>Sort</strong> Open Linkage Types<br />
Linkage Type Call Format MASM Statements<br />
Standard Procedure Call R$OPN [parameter-table-address]<br />
MASM Code If an FPOC address is specified (see 5.2.21):<br />
Extended Procedure Call None<br />
LA,U A3,parameter-table-address<br />
J ROPN$<br />
If an FPOC address is not specified:<br />
LA,U A3,parameter-table-address<br />
LMJ X11,ROPN$<br />
MASM Code If an FPOC address (see 5.2.21) is specified:<br />
LX X9,(sort-dbank-size,sort-dbank-address)<br />
LA,U A3,parameter-table-address<br />
J ROPN$X<br />
If an FPOC address is not specified:<br />
LX X9,(sort-dbank-size,sort-dbank-address)<br />
LA,U A3,parameter-table-address<br />
LMJ X11,ROPN$X<br />
Common Bank Procedure Call R$OPNCB[,sort-dbank-size,sort-dbank-address]<br />
[parameter-table-address]<br />
MASM Code LX X9,(sort-dbank-size,sort-dbank-address)<br />
LA,U A3,parameter-table-address<br />
I$BJ X11,ROPN$CB<br />
Note: When using the procedure call format, you can specify addresses with either tag<br />
names or index registers. For example:<br />
R$OPNCB,02200,DBANK PARAMS<br />
or<br />
R$OPNCB,SIZE,0,X2 0,X5<br />
6–4 7831 0687–010
Required Input<br />
MASM Program Linkages<br />
Register A3 must contain the address of the first word of the sort parameter table. If<br />
you are using a procedure call and you specify the parameter-table-address field, register<br />
A3 is loaded with the parameter table address for you before the SORT open subroutine<br />
is called.<br />
For the extended and common bank linkages:<br />
1. The sort-dbank-size must be at least 02200 words. This space must be reserved by<br />
the user program before calling the SORT open subroutine.<br />
2. The upper half of register X9 must contain the size of the D-bank reserved for the<br />
SORT subroutines, and the lower half of register X9 must contain the address of the<br />
D-bank reserved for the SORT subroutines. If you are using a procedure call and you<br />
specify the sort-dbank-size and sort-dbank-address fields, register X9 is loaded for<br />
you before entering the SORT open subroutine.<br />
Exit Conditions<br />
In a PARTB sort, control returns to the address specified by the FINAL parameter. If<br />
FINAL is not specified, the SORT subroutines execute an ER EXIT$ instruction to end the<br />
sort program.<br />
If an FPOC address is specified, SORT returns control at that address by jumping to it<br />
through X11; otherwise, SORT returns on either a J 0,X11 or LIJ X11,0,X11 instruction.<br />
The SORT subroutines save and restore all registers except X11.<br />
6.2.2. MASM <strong>Sort</strong> Release Linkages<br />
You call the sort release linkages to pass records to be sorted to the SORT subroutines.<br />
If OPTION bits 30 and 31 are not set, the WORD record length functionality is invoked<br />
for the SORT subroutines MASM linkages. This is described in 6.2.2.1. If either OPTION<br />
bits 30 or 31 are set, the non-word record length functionality is invoked for the SORT<br />
subroutines MASM linkages.<br />
6.2.2.1. MASM <strong>Sort</strong> Release Linkages (WORD Length Records)<br />
If OPTION bits 30 and 31 are not set, then the WORD record length functionality is<br />
invoked. This is the format that has always been used prior to SORT level 21R1. Table<br />
6–2 describes the call formats and MASM statements for each SORT subroutine sort<br />
release linkage type.<br />
7831 0687–010 6–5
MASM Program Linkages<br />
Table 6–2. MASM Statements for <strong>Sort</strong> Release Linkage Types<br />
Linkage Type Call Format MASM Statements<br />
Standard Procedure Call R$REL [( record-length,record-address )]<br />
MASM Code LA A0,( record-length,record-address )<br />
Extended Procedure Call None<br />
LMJ X11,RREL$<br />
MASM Code LX,U X9,sort-dbank-address<br />
LA A0,( record-length,record-address )<br />
LMJ X11,RREL$X<br />
Common Bank Procedure Call R$RELCB[, sort-dbank-address] [( record-length, record-address)]<br />
MASM Code LX,U X9,sort-dbank-address<br />
LA A0,( record-length,record-address )<br />
I$BJ X11,RREL$CB<br />
Note: When using the procedure call format, you can specify addresses with either<br />
tag names or index registers. For example:<br />
R$RELCB,DBANK (RSIZE,BUFFER)<br />
or<br />
R$RELCB,0,X2 96,X4 X4 + 96 points to a word<br />
containing length in H1 and<br />
record-address in H2.<br />
Required Input<br />
The lower half of register A0 must contain the address of the record being passed to the<br />
SORT subroutines when entering through any sort release linkage. If the records are of<br />
variable length, the upper half of register A0 must contain the record length. If the<br />
records are fixed length, the upper half of register A0 is ignored. If you are using a<br />
procedure call and you specify the record-length and record-address fields, register A0 is<br />
loaded for you before entering the SORT release subroutine.<br />
For the extended and common bank linkages, the lower half of register X9 must contain<br />
the address of the D-bank reserved for the SORT subroutines. If you are using a<br />
procedure call and you specify the sort-dbank-address field, register X9 is loaded for you<br />
before the SORT release subroutine is called.<br />
Exit Conditions<br />
The SORT subroutines return control to the user program with either a J 0,X11 or an LIJ<br />
X11,0,X11 instruction.<br />
The SORT subroutines save and restore all registers except X11.<br />
6–6 7831 0687–010
MASM Program Linkages<br />
6.2.2.2. MASM <strong>Sort</strong> Release Linkages (NON-WORD Length Records)<br />
If either OPTION bits 30 or 31 is set, then the NON-WORD record length functionality is<br />
invoked. This is a new format effective in SORT level 21R1. Table 6–3 describes the call<br />
formats and MASM statements for each SORT subroutine release linkage type.<br />
Table 6–3. MASM Statements for MASM <strong>Sort</strong> Release Linkage Types<br />
(OPTION Bits 30 or 31 Are Set)<br />
Linkage Type Call Format MASM Statements<br />
Standard Procedure Call R$REL [ record-address record-length] ]<br />
MASM Code LA A0,( record -address )<br />
Extended Procedure Call None<br />
LXI,U A0,0<br />
LA A1,record_length . if variable length records<br />
MASM Code LX,U X9,sort-dbank-address<br />
LA A0, record-address<br />
LXI,U A0,0<br />
LA A1, record-length . if variable length records<br />
LMJ X11,RREL$X<br />
Common Bank Procedure Call R$RELCB[,sort-dbank-address] [record-address [ record-length] ]<br />
Required Input<br />
MASM Code LX,U X9,sort-dbank-address<br />
LA A0,record--address<br />
LXI,U A0,0<br />
LA A1,record-length . if variable length records<br />
I$BJ X11,RREL$CB<br />
The lower half of register A0 must contain the address of the record being passed to the<br />
SORT subroutines when entering through any sort linkage. H1 of register A0 should be<br />
0. If a variable length sort operation is occurring, register A1 will contain the length of<br />
the record being passed to the SORT subroutines in terms stated by the setting of<br />
OPTION bits 30 and 31. If you are using a procedure call and you specify the recordlength<br />
and record-address fields, registers A0 and A1 are loaded for you before entering<br />
the SORT release subroutine.<br />
For the extended and common bank linkages, the lower half of register X9 must contain<br />
the address of the D-bank reserved for the SORT subroutines. If you are using a<br />
procedure call and you specify the sort-dbank-address field, register X9 is loaded for you<br />
before the SORT release subroutine is called.<br />
Exit Conditions<br />
The SORT subroutines return control to the user program with either a J 0,X11 or an LIJ<br />
X11,0,X11 instruction.<br />
7831 0687–010 6–7
MASM Program Linkages<br />
The SORT subroutines save and restore all registers except register X11.<br />
6.2.3. MASM <strong>Sort</strong> <strong>Sort</strong> Linkages<br />
MASM sort sort linkages tell the SORT subroutines that all the records have been<br />
released to SORT through a release linkage.<br />
Table 6–4 describes the call formats and MASM statements for each SORT subroutine<br />
sort sort linkage type.<br />
Table 6–4. MASM Statements for <strong>Sort</strong> <strong>Sort</strong> Linkage Types<br />
Linkage Type Call Format MASM Statements<br />
Standard Procedure Call R$SORT<br />
MASM Code If an LPOC address is specified (see 5.2.26)<br />
Extended Procedure Call None<br />
J RSORT$<br />
If an LPOC address is not specified<br />
LMJ 11,RSORT$<br />
MASM Code If an LPOC address (see 5.2.26) is specified:<br />
LX,U X9,sort-dbank-address<br />
J RSORT$X<br />
If an LPOC address is not specified:<br />
LX,U X9,sort-dbank-address<br />
LMJ X11,RSORT$X<br />
Common Bank Procedure Call R$SORTCB[,sort-dbank-address]<br />
MASM Code LX,U X9,sort-dbank-address<br />
I$BJ X11,RSORT$CB<br />
Note: When using the procedure call format, you can specify addresses with either tag<br />
names or index registers. For example:<br />
R$SORTCB,DBANK or R$SORTCB,0,X2<br />
Required Input<br />
For the extended and common bank linkages, the lower half of register X9 must contain<br />
the address of the D-bank reserved for the SORT subroutines. If you are using a<br />
procedure call and you specify the sort-dbank-address field, register X9 is loaded for you<br />
before the SORT sort subroutine is called.<br />
Exit Conditions<br />
In a PARTA sort (see 5.2.32), control returns to the address specified by the FINAL<br />
parameter. If FINAL is not specified, the SORT subroutines execute an ER EXIT$<br />
instruction to terminate the user program.<br />
6–8 7831 0687–010
MASM Program Linkages<br />
If an LPOC address is specified, SORT returns control at that address by jumping to it<br />
through register X11; otherwise, control returns with either a J 0,X11 or an LIJ X11,0,X11<br />
instruction.<br />
The SORT subroutines save and restore all registers except register X11.<br />
6.2.4. MASM <strong>Sort</strong> Return Linkages<br />
MASM sort return linkages tell the SORT subroutines to retrieve a sorted record from<br />
the SORT subroutine.<br />
Table 6–5 describes the call formats and MASM statements for each SORT subroutine<br />
sort return linkage type.<br />
Table 6–5. MASM Statements for <strong>Sort</strong> Return Linkage Types<br />
Linkage Type Call Format MASM Statements<br />
Standard Procedure Call R$RET end-address<br />
MASM Code LMJ X11,RRET$<br />
Extended Procedure Call None<br />
+ end-address<br />
MASM Code LX,U X9,sort-dbank-address<br />
LMJ X11,RRET$X<br />
+ end-address<br />
Common Bank Procedure Call R$RETCB[,sort-dbank-address] [end-address]<br />
[output-record-address]<br />
MASM Code LA,U A0,output-record-address<br />
LX,U X9,sort-dbank-address<br />
I$BJ X11,RRET$CB<br />
J end-address<br />
Note: When using the procedure call format, you can specify addresses with either<br />
tag names or index registers. For example:<br />
R$RETCB,DBANK EOF OUTREC<br />
or<br />
R$RETCB,0,X2 10,X5 12,X6<br />
Required Input<br />
For the extended and common bank linkages, the lower half of register X9 must contain<br />
the address of the D-bank reserved for the SORT subroutines. If you are using a<br />
procedure call and you specify the sort-dbank-address field, register X9 is loaded for you<br />
before the SORT return subroutine is called.<br />
7831 0687–010 6–9
MASM Program Linkages<br />
For the common bank linkages, when an extended mode sort is being performed, you<br />
must supply output-record-address in register A0. The record to be returned will be<br />
moved by SORT to the storage location associated with the output record address. The<br />
length of the storage location must be at least the record size in words. For example, if<br />
the record size is 9 ASCII characters, the length of the storage area must be at least 3<br />
words.<br />
Exit Conditions<br />
The normal return is either a J 1,X11 or an LIJ X11,1,X11 instruction with register A0 or<br />
registers A0 and A1 containing the return record information. The lower half of register<br />
A0 always contains the address for the record being returned. If the records are of<br />
variable length, the length of the record will be returned in either the upper half of<br />
register A0 or in register A1. If word length granularity is specified (OPTION parameter<br />
bits 30 and 31 are 0), the upper half of register A0 will contain the word length of the<br />
record. If 6-bit character, 9-bit character, or bit granularity is specified (OPTION<br />
parameter bit 30 or 31 or both are set), register A1 will contain the length of the record in<br />
the requested granularity.<br />
If a sort return linkage is entered and there are no more records to be returned, control<br />
transfers to the address specified by end-address.<br />
The record area addressed by register A0 must not be altered by your user program.<br />
The SORT subroutines save and restore all registers except X11, A0, and A1.<br />
6.2.5. MASM <strong>Sort</strong> Quick End Linkages<br />
A MASM sort quick end linkage terminates the return record phase of a sort before all<br />
the records have been returned.<br />
Table 6–6 describes the call formats and MASM statements for each SORT subroutine<br />
sort quick end linkage type.<br />
Table 6–6. MASM Statements for <strong>Sort</strong> Quick End Linkages<br />
Linkage Type Call Format MASM Statements<br />
Standard Procedure Call R$QEND<br />
MASM Code LMJ X11,RQEND$<br />
Extended Procedure Call None<br />
MASM Code LX,U X9,sort-dbank-address<br />
LMJ X11,RQEND$X<br />
Common Bank Procedure Call R$QENDCB[,sort-dbank-address]<br />
MASM Code LX,U X9,sort-dbank-address<br />
I$BJ X11,RQEND$CB<br />
6–10 7831 0687–010
MASM Program Linkages<br />
Note: When using the procedure call format, you can specify addresses with either<br />
tag names or index registers. For example:<br />
R$QENDCB,DBANK<br />
or<br />
R$QENDCB,0,X2<br />
Required Input<br />
For the extended and common bank linkages, the lower half of register X9 must contain<br />
the address of the D-bank reserved for the SORT subroutines. If you are using a<br />
procedure call and you specify the sort-dbank-address field, register X9 is loaded for you<br />
before the SORT quick end subroutine is called.<br />
Exit Conditions<br />
The SORT subroutines return to the user program with either a J 0,X11 or an LIJ<br />
X11,0,X11 instruction.<br />
The SORT subroutines save and restore all registers except X11.<br />
6.3. MASM Tape <strong>Sort</strong> Linkages<br />
From a MASM program you can perform standard, extended, and common bank<br />
linkages to perform a tape sort operation. Use the linkages described in the following<br />
subsections for tape sort operations.<br />
6.3.1. IPURI$<br />
IPURI$ punches the tape repositioning table on cards that are read by the SORT<br />
subroutines during a CONTC operation.<br />
Table 6–7 describes the call formats and MASM statements for each SORT subroutine<br />
IPURI$ tape sort linkage type.<br />
Table 6–7. MASM Statements for the IPURI$ Tape <strong>Sort</strong> Linkage<br />
Linkage Type Call Format MASM Statements<br />
Standard Procedure Call I$PURI<br />
MASM Code LMJ X11,IPURI$<br />
Extended Procedure Call None<br />
MASM Code LX,U X9,sort-dbank-address<br />
Common Bank Procedure Call None<br />
LMJ X11,IPURI$X<br />
MASM Code LX,U X9,sort-dbank-address<br />
I$BJ X11,IPURI$CB<br />
7831 0687–010 6–11
MASM Program Linkages<br />
Required Input<br />
None<br />
Exit Conditions<br />
The following exit conditions apply to IPURI$:<br />
• The SORT subroutines return to the user program with either a J 0,X11 or an LIJ<br />
X11,0,X11 instruction.<br />
• IPURI$ destroys registers A2, A3, A4, A5, R1, and X11.<br />
6.3.2. RENCY$<br />
The RENCY$ linkage terminates an input cycle during a PARTA sort (see 5.2.32).<br />
Table 6–8 describes the call formats and MASM statements for each SORT subroutine<br />
RENCY$ tape sort linkage type.<br />
Table 6–8. MASM Statements for the RENCY$ Tape <strong>Sort</strong> Linkages<br />
Linkage Type Call Format MASM Statements<br />
Standard Procedure Call R$ENCY<br />
MASM Code LMJ X11,RENCY$<br />
Extended Procedure Call None<br />
MASM Code LX,U X9,sort-dbank-address<br />
Common Bank Procedure Call None<br />
Required Input<br />
None<br />
Exit Conditions<br />
LMJ X11,RENCY$X<br />
MASM Code LX,U X9,sort-dbank-address<br />
The following exit conditions apply to RENCY$:<br />
I$BJ X11,RENCY$CB<br />
• The SORT subroutines return control to the user program with either a J 0,X11 or an<br />
LIJ X11,0,X11 instruction.<br />
• The SORT subroutines save and restore all registers they use during RENCY$ except<br />
X11 and A0.<br />
6–12 7831 0687–010
6.3.3. RINFO$<br />
MASM Program Linkages<br />
RINFO$ linkage requests the address of the tape repositioning table needed to do a<br />
CONTC operation during a PARTC sort (see 5.2.34).<br />
Table 6–9 describes the call formats and MASM statements for each SORT subroutine<br />
RINFO$ tape sort linkage type.<br />
Table 6–9. MASM Statements for the RINFO$ Tape <strong>Sort</strong> Linkages<br />
Linkage Type Call Format MASM Statements<br />
Standard Procedure Call R$INFO<br />
MASM Code LMJ X11,RINFO$<br />
Extended Procedure Call None<br />
MASM Code LX,U X9,sort-dbank-address<br />
Common Bank Procedure Call None<br />
Required Input<br />
None<br />
Exit Conditions<br />
LMJ X11,RINFO$X<br />
MASM Code LX,U X9,sort-dbank-address<br />
The following exit conditions apply to RINFO$:<br />
I$BJ X11,RINFO$CB<br />
• The SORT subroutines return control to the user program with either a J 0,X11 or an<br />
LIJ X11,0,X11 instruction.<br />
• On return, register A0 contains the address of the tape repositioning table and<br />
register A1 contains the length of the table. The user program must save the table<br />
for a CONTC run.<br />
• RINFO$ destroys the contents of registers A2, A3, A4, A5, R1, and X11.<br />
7831 0687–010 6–13
MASM Program Linkages<br />
6.4. MASM <strong>Merge</strong> Program Linkages<br />
When you perform a merge operation, follow four basic steps using the appropriate<br />
merge linkage.<br />
1. Open the merge operation with one of the following:<br />
a. RMGOPN$ (standard)<br />
b. RMGOPN$X (extended)<br />
c. RMGOPN$CB (common bank)<br />
2. Release the first record of each input file to the merge operation with one of the<br />
following:<br />
a. RMGREL$ (standard)<br />
b. RMGREL$X (extended)<br />
c. RMGREL$CB (common bank)<br />
3. Request a record from, and release the next input record to, the merge operation<br />
with one of the following:<br />
a. RMGREQ$ (standard)<br />
b. RMGREQ$X (extended)<br />
c. RMGREQ$CB (common bank)<br />
4. Close the merge operation with one of the following:<br />
a. RQEND$ (standard)<br />
b. RQEND$X (extended)<br />
c. RQEND$CB (common bank)<br />
6.4.1. MASM <strong>Merge</strong> Open Linkages<br />
A merge open linkage initializes a merge operation. It must be the first linkage to the<br />
SORT subroutines from every user merge program.<br />
Table 6–10 describes the call formats and MASM statements for each SORT subroutine<br />
merge open linkage type.<br />
6–14 7831 0687–010
MASM Program Linkages<br />
Table 6–10. MASM Statements for <strong>Merge</strong> Open Linkages<br />
Linkage Type Call Format MASM Statements<br />
Standard Procedure Call R$MGOPN [parameter-table-address]<br />
MASM Code LA,U A0,parameter-table-address<br />
Extended Procedure Call None<br />
LMJ X11,RMGOPN$<br />
MASM Code LX X9,(merge-dbank-size,merge-dbank-address)<br />
LA,U A0,parameter-table-address<br />
LMJ X11,RMGOPN$X<br />
Common Bank Procedure Call R$MGOPNCB[,merge-dbank-size,merge-dbank-address]<br />
[parameter-table-address]<br />
MASM Code LX X9,(merge-dbank-size,merge-dbank-address)<br />
LA,U A0,parameter-table-address<br />
I$BJ X11,RMGOPN$CB<br />
Note: When using the procedure call format, you can specify addresses with either<br />
tag names or index registers. For example:<br />
R$MGOPNCB,0500,DBANK TABLE<br />
or<br />
R$MGOPNCB,0500,0,X2 10,X3<br />
Required Input<br />
Register A0 must contain the address of the first word of the merge parameter table. If<br />
you are using a procedure call and you specify the parameter-table-address field, register<br />
A0 is loaded with the parameter table address for you before the merge open linkage is<br />
called.<br />
For the extended and common bank linkages:<br />
• The merge-dbank-size must be at least 0500 words. If a CORE entry is not present,<br />
merge-dbank-size (in words) must be at least 0500 + (2 * record-size). This space<br />
must be reserved prior to calling merge open linkage.<br />
• The upper half of register X9 must contain the size of the D-bank reserved for the<br />
SORT subroutines, and the lower half of register X9 must contain the address of the<br />
D-bank reserved for the SORT subroutines. If you are using a procedure call and you<br />
specify the merge-dbank-size and merge-dbank-address fields, register X9 is loaded<br />
for you before the merge open linkage is called.<br />
Exit Conditions<br />
The SORT subroutines return control with either a J 0,X11 or an LIJ X11,0,X11<br />
instruction. All registers used by SORT subroutines are saved and restored except X11.<br />
7831 0687–010 6–15
MASM Program Linkages<br />
6.4.2. MASM <strong>Merge</strong> Release Linkages<br />
A merge release linkage releases the first record of each input file to the SORT<br />
subroutines. It must be entered once for each input file being merged.<br />
Table 6–11 describes the call formats and MASM statements for each SORT subroutine<br />
merge release linkage type.<br />
Table 6–11. MASM Statements for <strong>Merge</strong> Release Linkages<br />
Linkage Type Call Format MASM Statements<br />
Standard Procedure Call R$MGREL [record-address [file-identifier] ]<br />
MASM Code LA,U A0,record-address<br />
Extended Procedure Call None<br />
LA A1,file-identifier<br />
LMJ X11,RMGREL$<br />
MASM Code LX,U X9,merge-dbank-address<br />
LA,U A0,record-address<br />
LA A1,file-identifier<br />
LMJ X11,RMGREL$X<br />
Common Bank Procedure Call R$MGRELCB[,merge-dbank-address]<br />
[record-address [file-identifier] ]<br />
MASM Code LX,U X9,merge-dbank-address<br />
LA,U A0,record-address<br />
LA A1,file-identifier<br />
I$BJ X11,RMGREL$CB<br />
Note: When using the procedure call format, you can specify addresses with either<br />
tag names or index registers. For example:<br />
R$MGRELCB,DBANK BUFFER 1<br />
or<br />
R$MGRELCB,0,X2 0,X4 '2' The ‘2’ indicates a character string.<br />
Required Input<br />
Register A0 must contain the address of the first record from an input file. The record<br />
area addressed by register A0 must not be altered by the user program until that record<br />
is returned through a request linkage. If you are using a procedure call and you specify<br />
the record-address field, register A0 is loaded with the record address for you before the<br />
merge release linkage is called.<br />
The lower half of register A1 must contain an identifier for the input file. Each input file<br />
should have a unique identifier that remains constant throughout the merge operation. If<br />
you are using a procedure call and you specify the file-identifier field, register A1 is<br />
loaded with the file identifier for you before the merge release linkage is called.<br />
6–16 7831 0687–010
MASM Program Linkages<br />
For the extended and common bank linkages, the lower half of register X9 must contain<br />
the address of the D-bank reserved for the SORT subroutines. If you are using a<br />
procedure call and you specify the merge-dbank-address field, register X9 is loaded for<br />
you before the merge release linkage is called.<br />
Exit Conditions<br />
The SORT subroutines return control with either a J 0,X11 or an LIJ X11,0,X11<br />
instruction. All registers used by SORT subroutines are saved and restored except X11.<br />
6.4.3. MASM <strong>Merge</strong> Request Linkages<br />
A merge request linkage requests a record from the SORT subroutines and also enters<br />
the next input record into the merge operation.<br />
Table 6–12 describes the call formats and MASM statements for each SORT subroutine<br />
merge request linkage type.<br />
Table 6–12. MASM Statements for <strong>Merge</strong> Request Linkages<br />
Linkage Type Call Format MASM Statements<br />
Standard Procedure Call R$MGREQ [record-address]<br />
MASM Code LA,U A0,record-address<br />
Extended Procedure Call None<br />
LMJ X11,RMGREQ$<br />
MASM Code LX,U X9,merge-dbank-address<br />
LA,U A0,record-address<br />
LMJ X11,RMGREQ$X<br />
Common Bank Procedure Call R$MGREQCB[,merge-dbank-address] [record-address]<br />
MASM Code LX,U X9,merge-dbank-address<br />
LA,U A0,record-address<br />
I$BJ X11,RMGREQ$CB<br />
Note: When using the procedure call format, you can specify addresses with either<br />
tag names or index registers. For example:<br />
R$MGREQCB,DBANK BUFFER<br />
or<br />
R$MGREQCB,0,X2 5,X4<br />
Required Input<br />
No input is required the first time you enter the request linkage. On all subsequent calls,<br />
register A0 must contain the address of the next record to enter the merge. This record<br />
must be the next input record from the file where the last record was returned by the<br />
request linkage.<br />
7831 0687–010 6–17
MASM Program Linkages<br />
The data area addressed by register A0 cannot be altered until that record returns from<br />
the merge operation. When all records from an input file have entered through the<br />
request linkage, register A0 must be set to negative zero (–0) to inform the SORT<br />
subroutines that an input file is exhausted.<br />
If you are using a procedure call and you specify the record-address field, register A0 is<br />
loaded with the record address for you before the merge request linkage is called.<br />
For the extended and common bank linkages the lower half of register X9 must contain<br />
the address of the D-bank reserved for the SORT subroutines. If you are using a<br />
procedure call and you specify the merge-dbank-address field, register X9 is loaded for<br />
you before the merge release linkage is called.<br />
Exit Conditions<br />
The SORT subroutines return control with a J 0,X11 instruction. Register A0 contains<br />
the address of the record being returned. Register A1 contains the identifier of the input<br />
file for the returning record addressed by register A0. If all records are returned when<br />
the request linkage is entered, a negative zero (–0) is returned in register A0 to signify<br />
the end of the merge operation.<br />
The upper half of register A0 can be used during a merge operation; its contents are not<br />
changed by the SORT subroutines. All registers used by SORT subroutines are saved<br />
and restored except A0, A1, and X11.<br />
6.4.4. MASM <strong>Merge</strong> Close Linkages<br />
A merge close linkage terminates a merge operation before all records have been<br />
requested from the SORT subroutines.<br />
There are no MASM merge linkages for the purpose of ending the merge operation<br />
before all records have been requested from the SORT subroutines. If it is necessary to<br />
close a merge operation before all records have been returned, use the MASM sort<br />
close linkages (see 6.2.5).<br />
6–18 7831 0687–010
MASM Program Linkages<br />
6.5. Interface Aids to the SORT Subroutine MASM<br />
Linkages<br />
All installations of the <strong>Sort</strong>/<strong>Merge</strong> product provide five relocatable interface (intercept)<br />
elements that can provide quick conversion (for example, relocatable to common-banked<br />
interface, basic mode to extended mode) or testing of another MASM linkage. These<br />
elements, depending on the selected installation mode, are installed into either<br />
SYS$LIB$*SORT or SYS$*SRT$PAR.<br />
The five relocatable interface elements and their functions are the following:<br />
• RINTRCPT<br />
Redirects standard linkage calls to the common-banked linkages and subroutines.<br />
• RINTRCPT-EM<br />
Redirects standard linkage calls to the common-banked linkages and subroutines,<br />
and provides some basic mode to extended mode conversion assistance.<br />
• RINTRCPTX<br />
Redirects extended linkage calls to the common-banked linkages and subroutines.<br />
• RINTRCPTX-EM<br />
Redirects extended linkage calls to the common-banked linkages and subroutines,<br />
and provides some basic mode to extended mode conversion assistance.<br />
• RINTRCPTCB<br />
Redirects common-banked linkage calls and subroutines to the relocatable<br />
subroutine extended linkage calls.<br />
These intercept routines (except RINTRCPTCB) can also be used to reduce the changes<br />
necessary to the MASM routine in order to change a basic mode sort to an extended<br />
mode sort. For RINTRCPT and INTRCPTX to be used for converting to an extended<br />
mode sort, the following changes to the MASM program are still required:<br />
1. Change the SORT RETURN linkage call to pass a record area address in register A0.<br />
This record area is used by the extended mode sort subroutines to place the record<br />
to be returned. For basic mode sorts, the sort subroutines simply return the address<br />
of the record being returned.<br />
2. If a COMP or a DROC parameter is specified, a RECAREA parameter defining two<br />
record areas must be specified. These record areas are used by the sort subroutines<br />
to provide access to the records that are being passed to the COMP or DROC<br />
routine.<br />
3. If a CORE parameter is specified, the size of the CORE area must be increased to a<br />
size greater than 210,000 words. If the assignment of file R$CORE is used to state<br />
the size of the sort core area, the maximum reserve for the file R$CORE must be<br />
increased to a size greater than 210 granules.<br />
4. If an M1, M1-M2, or tape sort is being performed, the type of the sort being<br />
performed must be changed to a memory or a disk sort.<br />
7831 0687–010 6–19
MASM Program Linkages<br />
The elements RINTRCPT-EM and RINTRCPTX-EM are intended for converting MASM<br />
basic mode sorts to an extended mode sort, but it is not required that the sort be an<br />
extended mode sort (in other words, these intercept routines will work for a basic mode<br />
sort). When RINTRCPT-EM and RINTRCPTX-EM are used, steps 1 and 2 above are<br />
resolved automatically, so the only user requirements are steps 3 and 4.<br />
It should be noted that both of these routines have a couple of restrictions with regard to<br />
the maximum length of a record related to the automatic resolution of steps 1 and 2.<br />
The maximum record length is 1000 words if no COMP or DROC routine is specified. If<br />
a COMP or DROC routine is specified, then for a fixed length sort the record length must<br />
be less than or equal to 500 words; for a variable length sort, the link size (VRSZ<br />
parameter) is limited to 500 words and the maximum record size is limited to 1000<br />
words. These routines do not verify these limitations.<br />
A site can increase these limits locally with a local CHG to these elements, which alters<br />
the EQUated value of the tag “rszmax.”<br />
For example, when <strong>Sort</strong>/<strong>Merge</strong> is installed using mode A, a standard linkage call to the<br />
relocatable SORT subroutines can be redirected to the common bank SORT subroutines<br />
by specifying the following at collection time:<br />
IN SYS$*SRT$PAR.RINTRCPT<br />
Conversely, a common-banked linkage call to the common bank SORT subroutines can<br />
be redirected to the relocatable SORT subroutines by specifying the following at<br />
collection time:<br />
IN SYS$*SRT$PAR.RINTRCPTCB<br />
NOT SYS$LIB$*SORT.CBEP$$SORT<br />
6.6. User Routine Substitution Considerations<br />
One of the more powerful features of the <strong>Sort</strong>/<strong>Merge</strong> product is its ability to substitute<br />
your routines for certain SORT functions. This ability gives you greater control over the<br />
<strong>Sort</strong>/<strong>Merge</strong> process, allowing you to do the following:<br />
• Determine your own comparison criteria.<br />
By writing and substituting your own comparison criteria routine, you can perform<br />
comparisons based on criteria different from that normally used by the comparison<br />
SORT routine.<br />
• Determine how duplicate data is processed.<br />
You can write and substitute the SORT data reduction routine with a subroutine that<br />
changes what occurs when two records being compared are found to have equal<br />
keys.<br />
6–20 7831 0687–010
MASM Program Linkages<br />
The following describes specific coding considerations you should know when writing<br />
and substituting your routines for certain SORT routines.<br />
6.6.1. User COMP Code<br />
Function<br />
You can write your own COMP routine to perform a comparison based on criteria<br />
different from those normally used by the SORT subroutines. To give control to your<br />
COMP routine, specify the COMP parameter with the address of your routine (see<br />
5.2.7).<br />
Coding Considerations<br />
The following are coding considerations to observe when writing your own COMP<br />
routine when you are using the SORT subroutine MASM linkages.<br />
When the SORT subroutines transfer control to the COMP routine, registers A0 and A1<br />
contain the addresses of the two records compared. The following table describes<br />
transfer control considerations.<br />
If ...<br />
The record addressed by A0 precedes the<br />
record addressed by A1<br />
The record addressed by A1 precedes the<br />
record addressed by A0<br />
Then return control to the<br />
SORT subroutines with an ...<br />
R$A0 procedure call<br />
R$A1 procedure call<br />
Two records have equal keys R$AE procedure call<br />
For an extended mode sort, the RECAREA parameter (see 5.2.36) must be specified to<br />
make the records that are to be compared visible to the basic mode environment.<br />
Key Translation<br />
No key translation occurs.<br />
Register Usage<br />
Your COMP code cannot destroy the contents of registers A0, A1, A2, A3, or X11.<br />
Registers A4, A5, X1 through X10, and R1 through R3 may not be the same as when the<br />
SORT subroutines were entered.<br />
7831 0687–010 6–21
MASM Program Linkages<br />
6.6.2. User DROC Code<br />
Function<br />
You can write a routine that changes what normally occurs when two records being<br />
compared are found to have equal keys (that is, duplicate records). You can do the<br />
following:<br />
• Delete the duplicate record<br />
• Combine the two records<br />
• Leave the records as they are<br />
When you write a DROC routine, you specify what to do with duplicate records. If the<br />
records are fixed-length and one or both are modified, the non-key portions of the entire<br />
record can be altered. If the records are variable-length and one or both are modified,<br />
only the non-key portions in the first link of each record can be altered. To give control to<br />
your DROC routine, specify the DROC parameter with the address of your routine (see<br />
5.2.17).<br />
Coding Considerations<br />
Observe the following specific coding considerations while coding your own DROC<br />
routine when you are using the MASM SORT subroutine linkages.<br />
When the SORT subroutines transfer control to the DROC routine, registers A0 and A1<br />
contain the addresses of the two records that have equal keys. The following table<br />
describes the case control considerations.<br />
If ... Then…<br />
Your DROC routine decides to return one of<br />
the records and delete the other record<br />
Your DROC routine decides to return both<br />
records where none, one, or both have been<br />
modified<br />
Register A0 must contain the address of the<br />
record to be returned and control should be<br />
returned to the SORT subroutines with an<br />
R$DLT procedure call.<br />
Registers A0 and A1 must contain the record<br />
addresses of the two records and control<br />
should be returned to the SORT subroutines<br />
with an R$NDLT procedure call.<br />
For an extended mode sort, you must specify the RECAREA parameter (see 5.2.36) to<br />
make the records that are candidates for possible data reduction visible to the basic<br />
mode environment.<br />
Key Translation<br />
If a COMP routine was specified, no key translation occurs. Otherwise, if you specify a<br />
KEY or KEYW parameter, the key fields of records are translated according to the<br />
descriptions in Section 11. Your DROC routine must take this translation into<br />
consideration when inspecting key fields.<br />
6–22 7831 0687–010
Register Usage<br />
MASM Program Linkages<br />
Your DROC code cannot destroy the contents of registers A0, A1, A2, A3, or X11.<br />
Registers A4, A5, X1 through X10 and R1 through R3 may not be the same as the user<br />
calling registers to the SORT subroutines.<br />
7831 0687–010 6–23
MASM Program Linkages<br />
6–24 7831 0687–010
Section 7<br />
The SORT Subroutine Parameter Tables<br />
for UCS C Programs<br />
This section explains how to create the parameter tables in Universal Compiling System<br />
(UCS) C programs that the SORT subroutines use to perform sort and merge operations.<br />
In addition, this section shows the formats and considerations for using each of the<br />
available SORT subroutine parameters.<br />
You must install <strong>Sort</strong>/<strong>Merge</strong> with Software Library Administrator (SOLAR) in an<br />
installation mode that makes the common bank SORT subroutines available before the<br />
UCS C program linkages can be used.<br />
7.1. Introduction<br />
When you give control to the SORT subroutines by specifying the appropriate linkages<br />
within your source program, as described in Section 8, you must provide<br />
• The records to sort or merge<br />
• The operations to perform<br />
• The system facilities to use<br />
• Key definitions<br />
• Additional descriptive information<br />
The records to sort or merge and the operation to perform are provided by the<br />
appropriate linkages.<br />
You describe the operation by creating a parameter table. A parameter table is made up<br />
of a number of parameter entries that contain table entry codes specifying such items as<br />
the record size, key definitions, and which facilities to use.<br />
7831 0687–010 7–1
The SORT Subroutine Parameter Tables for UCS C Programs<br />
7.2. Setting Up the UCS C Parameter Table<br />
Include Element<br />
You can include into a user program an element that contains definitions used for<br />
creating a parameter table in a UCS C program. The element is included into the<br />
program as follows:<br />
#include <br />
Contained within the include element is<br />
• A typedef for each parameter<br />
• Constant definitions for each parameter type and some parameter fields<br />
• Macro definitions for determining some parameter field values<br />
The naming convention used by identifiers in sm$prmtbl.h is to begin each definition or<br />
tag name with sm_ to indicate that the identifier is a <strong>Sort</strong>/<strong>Merge</strong> identifier. Structure and<br />
union member names do not necessarily follow this naming convention. Also, all names<br />
are in lowercase.<br />
Parameter Table Declaration<br />
Typedefs are available that define each parameter type. The parameter table can be<br />
declared as a structure using the parameter typedefs (see 7.3). An example of a<br />
parameter table declaration is:<br />
struct { sm_start_parameter_type start_parameter;<br />
sm_core_parameter_type core_parameter;<br />
sm_rsz_parameter_type rsz_parameter;<br />
sm_key_parameter_type key_parameter;<br />
sm_end_parameter_type end_parameter;<br />
} prm_tbl;<br />
The first parameter in the parameter table must be the START parameter. The last<br />
parameter in the parameter table must be the END parameter. The other parameters<br />
that you include in your parameter table depends on the specifics of the sort or merge<br />
operation that you want to perform.<br />
Parameter Table Initialization<br />
The SORT subroutines view the parameter table as an array of one-word entries. Each<br />
parameter entry is at least one full word and some may be multiple words in length. The<br />
words associated with a parameter are further broken down into parameter fields.<br />
Not all parts of a word associated with a parameter entry may be defined as a parameter<br />
field. These undefined areas of a parameter entry, identified as reserved in 7.3, are<br />
reserved for future use. It is recommended that the undefined areas contain zero<br />
values. Initializing the parameter table to zeros before entering any parameter table<br />
values ensures that no unexpected values exist in the parameter table.<br />
7–2 7831 0687–010
The SORT Subroutine Parameter Tables for UCS C Programs<br />
The following code sequence is an example of one way to initialize the parameter table:<br />
int i, *int_ptr;<br />
struct { sm_start_parameter_type start_parameter;<br />
sm_core_parameter_type core_parameter;<br />
sm_rsz_parameter_type rsz_parameter;<br />
sm_key_parameter_type key_parameter;<br />
sm_end_parameter_type end_parameter;<br />
} prm_tbl;<br />
int_ptr = (int *) &prm_tbl;<br />
for (i = 0; i < (sizeof(prm_tbl) / 4); i++)<br />
*int_ptr++ = 0;<br />
Addresses Within the Parameter Table<br />
Some parameter entries define fields that contain pointers or addresses. An address in a<br />
UCS C parameter is in a different format than an address recognized by the SORT<br />
subroutines. A <strong>Sort</strong>/<strong>Merge</strong> macro is available that converts UCS C pointers into<br />
addresses that the SORT subroutines recognize. The macro is described as follows:<br />
sm_ptr_conversion(parameter_pointer);<br />
where<br />
parameter_pointer<br />
is the pointer to be given to the SORT subroutines.<br />
The following UCS C coding sequence is an example of how the sm_ptr_conversion<br />
macro is used:<br />
/*Declare an array that will contain the file names in the parameter table.*/<br />
char *file_list[36];<br />
struct { ...<br />
sm_files_parameter files_parameter;<br />
... } prm_tbl;<br />
/* Fill in the fields of the FILES parameter. */<br />
prm_tbl.files_parameter.code = sm_files;<br />
prm_tbl.files_parameter.number_of_files = 3;<br />
prm_tbl.files_parameter.sm_address = sm_ptr_conversion(*file_list);<br />
7831 0687–010 7–3
The SORT Subroutine Parameter Tables for UCS C Programs<br />
7.3. UCS C Program Parameters<br />
Table 7–1 contains the parameters processed by the SORT subroutines when called<br />
through the UCS C program linkages.<br />
Table 7–1. UCS C Program Parameters<br />
Parameter Description Reference<br />
COMP Tells the SORT subroutines to execute a user compare routine each<br />
time two records are compared.<br />
CONSOLE Indicates whether or not operator console messages are issued<br />
during the course of a sort run.<br />
COPY Allows parameters to be accepted from more than one parameter<br />
table.<br />
CORE Specifies the amount of memory to be used for the sort and<br />
optionally the location of that memory.<br />
DROC Tells the SORT subroutines to execute a user data reduction routine<br />
each time it is determined that two records have equal keys.<br />
7–4 7831 0687–010<br />
7.3.1<br />
7.3.2<br />
7.3.3<br />
7.3.4<br />
7.3.5<br />
END Indicates the end of the parameter table to the SORT subroutines. 7.3.6<br />
FILES Lists the names of the scratch files to be used by the SORT<br />
subroutines during a sort operation.<br />
7.3.7<br />
INFO Tells the SORT subroutines of predefined additional information. 7.3.8<br />
KEY Specifies a key field for sort and merge operations. 7.3.9<br />
LOCALE Specifies a locale name for international sort or merge operations. 7.3.10<br />
LOG Indicates whether or not completion messages are written to the<br />
run log.<br />
OPTION Tells the SORT subroutines general information to perform specific<br />
actions.<br />
7.3.11<br />
7.3.12<br />
PAD Saves space in the parameter table for additional information. 7.3.13<br />
PRESERVE Maintains the order of input records that have equal keys. 7.3.14<br />
RSZ Specifies the maximum record size. 7.3.15<br />
SEQ Specifies a collating sequence table for determining the order of<br />
values in a key field.<br />
7.3.16<br />
START Indicates the start of the parameter table to the SORT subroutines. 7.3.17<br />
VOL Tells the SORT subroutines approximately how many records are to<br />
be sorted.<br />
VRSZ Specifies variable-length records and the minimum link size of the<br />
records.<br />
7.3.18<br />
7.3.19
The SORT Subroutine Parameter Tables for UCS C Programs<br />
The following subsections describe each of the parameters in detail.<br />
7.3.1. COMP Parameter<br />
Function<br />
The COMP parameter tells the SORT subroutines to execute a user routine each time<br />
two records are compared in a sort or merge operation. When a COMP parameter is not<br />
specified, the compare routine internal to the SORT subroutines is used to compare the<br />
records. See 7.4.1 for compare routine coding considerations. Specifying the COMP<br />
parameter overrides the KEY and SEQ parameters. Your sort or merge operation<br />
requires either a COMP or KEY parameter.<br />
Format<br />
typedef struct<br />
{<br />
unsigned code : 6;<br />
unsigned reserved : 30;<br />
unsigned int sm_address;<br />
} sm_comp_parameter_type;<br />
The parameter fields for the COMP parameter are described as follows.<br />
Parameter Field Parameter Field Descriptions Parameter Field Value<br />
code Identifies the COMP parameter. sm_comp (041)<br />
sm_address Contains a pointer to a storage area that<br />
contains the compare routine function<br />
pointer.<br />
Address in SORT subroutines<br />
format.<br />
Function pointers in UCS C and the SORT subroutines are in different formats. A<br />
<strong>Sort</strong>/<strong>Merge</strong> macro is available that converts a UCS C function pointer into an address<br />
that the SORT subroutines can use. The macro is described as follows:<br />
sm_function_ptr_conversion(compare_lve, compare_pointer);<br />
where<br />
compare_lve<br />
is a pointer to the storage area that will contain the converted function pointer.<br />
Declare this storage area using the <strong>Sort</strong>/<strong>Merge</strong> typedef sm_link_vector_entry_type.<br />
compare_pointer<br />
is the function pointer to the compare routine.<br />
7831 0687–010 7–5
The SORT Subroutine Parameter Tables for UCS C Programs<br />
Example<br />
/* Declare the variable that will contain the compare routine address<br />
in the parameter table. */<br />
sm_link_vector_entry_type comp_lve;<br />
void comp_routine( );<br />
struct { ...<br />
sm_comp_parameter comp_parameter;<br />
... } prm_tbl;<br />
/* Convert the function pointer and move it to comp_lve. Fill in<br />
the fields of the COMP parameter. */<br />
sm_function_ptr_conversion(comp_lve, comp_routine);<br />
prm_tbl.comp_parameter.code = sm_comp;<br />
prm_tbl.comp_parameter.sm_address = sm_ptr_conversion(comp_lve);<br />
/* Declaration of the compare routine. */<br />
#pragma interface comp_routine<br />
void comp_routine(void *record_one, void *record_two, int *comp_result) {...}<br />
7.3.2. CONSOLE Parameter<br />
Function<br />
The CONSOLE parameter is an optional parameter that indicates to the SORT<br />
subroutines whether or not all operator console messages should be issued during the<br />
sort operation. If specified, it overrides the CONSOLE configuration parameter (see 9.4).<br />
If this parameter is not specified, the CONSOLE configuration parameter takes effect, if<br />
present. Otherwise, no operator console messages are issued.<br />
Format<br />
typedef struct<br />
{<br />
unsigned code : 6;<br />
unsigned reserved : 24;<br />
unsigned messages : 6;<br />
} sm_console_parameter_type;<br />
The parameter fields for the CONSOLE parameter are described as follows.<br />
Parameter Field Parameter Field Descriptions Parameter Field Value<br />
code Identifies the CONSOLE parameter. sm_console (063)<br />
messages Indicates whether or not operator console<br />
messages are to be issued.<br />
sm_off (0)<br />
sm_on (1)<br />
7–6 7831 0687–010
7.3.3. COPY Parameter<br />
Function<br />
The SORT Subroutine Parameter Tables for UCS C Programs<br />
The COPY parameter is an optional parameter that allows parameters to be accepted<br />
from more than one parameter table. It can be used for both sort and merge operations.<br />
Format<br />
typedef struct<br />
{<br />
unsigned code : 6;<br />
unsigned reserved : 30;<br />
unsigned int sm_address;<br />
} sm_copy_parameter_type;<br />
The parameter fields for the COPY parameter are described as follows.<br />
Parameter Field Parameter Field Descriptions Parameter Field Value<br />
code Identifies the COPY parameter. sm_copy (070)<br />
sm_address Contains a pointer to a storage area that<br />
contains the nested parameter table.<br />
Address in SORT subroutines<br />
format.<br />
The parameter table associated with the COPY parameter can be considered a nested<br />
parameter table. Processing of the current parameter table is suspending while the<br />
nested parameter table is processed. When the nested parameter table is completely<br />
processed, the parameter table that had processing suspended has processing resumed<br />
at the next parameter following the COPY parameter.<br />
7.3.4. CORE Parameter<br />
Function<br />
The CORE parameter is used to specify the amount of memory that the sort operation is<br />
to use for sorting records. The memory can either be allocated by the user program or<br />
by the SORT subroutines. The CORE parameter is ignored for merge operations.<br />
Format<br />
typedef struct<br />
{<br />
unsigned code : 6;<br />
unsigned size : 30;<br />
unsigned int sm_address;<br />
} sm_core_parameter_type;<br />
7831 0687–010 7–7
The SORT Subroutine Parameter Tables for UCS C Programs<br />
The parameter fields for the CORE parameter are described as follows.<br />
Parameter Field Parameter Field Descriptions Parameter Field Value<br />
code Identifies the CORE parameter. sm_core (020)<br />
size Specifies the number of words of memory<br />
that the sort can use. If you are providing<br />
the memory area, you must make sure that<br />
the memory area is at least as large as this<br />
value.<br />
sm_address Contains a pointer to the memory area to<br />
be used for sorting records.<br />
An integer value in the range<br />
262,144 to 16,777,215.<br />
Address in SORT subroutine<br />
format or NULL.<br />
If the user program allocates the memory, sm_address is used to give the SORT<br />
subroutines the pointer to the memory. If you want the SORT subroutines to allocate<br />
the memory, sm_address must be the NULL pointer.<br />
The SORT subroutines always perform an extended mode sort when called through the<br />
UCS C program linkages. Therefore, if the core size specified is not consistent with a<br />
size required by an extended mode sort, the size is adjusted taking the MAXIMUM (see<br />
9.12) and MINIMUM (see 9.13) configuration parameters into consideration. If the core<br />
size specified is not consistent with a size required by an extended mode sort and a user<br />
core area is specified, an error status is returned. See 2.3, 10.2.1, and 10.2.2 for more<br />
information on extended mode sorts.<br />
If the CORE parameter is not specified, the core size is determined by the R$CORE file<br />
assignment (see 10.1). You must either specify a CORE parameter or use the R$CORE<br />
file assignment.<br />
7.3.5. DROC Parameter<br />
Function<br />
The DROC parameter tells the SORT subroutines to execute a user routine each time it<br />
is determined that two records have equal keys in a sort operation. When the DROC<br />
parameter is not specified, the order of the records with equal keys is undefined unless<br />
the PRESERVE parameter is specified. See 7.4.2 for data reduction routine coding<br />
considerations. The DROC parameter overrides the delete_dups bit in the OPTION<br />
parameter (see 7.3.12) and is ignored for merge operations.<br />
Format<br />
typedef struct<br />
{<br />
unsigned code : 6;<br />
unsigned reserved : 30;<br />
unsigned int sm_address;<br />
} sm_droc_parameter_type;<br />
7–8 7831 0687–010
The SORT Subroutine Parameter Tables for UCS C Programs<br />
The parameter fields for the DROC parameter are described as follows.<br />
Parameter Field Parameter Field Descriptions Parameter Field Value<br />
code Identifies the DROC parameter. sm_droc (040)<br />
sm_address Contains a pointer to a storage area that<br />
contains the data reduction routine function<br />
pointer.<br />
Address in SORT subroutines<br />
format.<br />
Function pointers in UCS C and the SORT subroutines are in different formats. A<br />
<strong>Sort</strong>/<strong>Merge</strong> macro is available that converts a UCS C function pointer into an address<br />
that the SORT subroutines can use. The macro is described as follows:<br />
sm_function_ptr_conversion (data_reduction_lve, data_reduction_pointer);<br />
where<br />
data_reduction_lve<br />
is a pointer to the storage area that will contain the converted function pointer.<br />
Declare this storage area using the <strong>Sort</strong>/<strong>Merge</strong> typedef sm_link_vector_entry_type.<br />
data_reduction_pointer<br />
is the function pointer of the data reduction routine.<br />
Example<br />
/* Declare the variable that will contain the data reduction routine address<br />
in the parameter table. */<br />
sm_link_vector_entry_type droc_lve;<br />
void droc_routine( );<br />
struct { ...<br />
sm_droc_parameter droc_parameter;<br />
... } prm_tbl;<br />
/* Convert the function pointer and move it to droc_lve. Fill in the fields<br />
of the DROC parameter. */<br />
sm_function_ptr_conversion(droc_lve, droc_routine);<br />
prm_tbl.droc_parameter.code = sm_droc;<br />
prm_tbl.droc_parameter.sm_address = sm_ptr_conversion(droc_lve);<br />
/* Declaration of the data reduction routine. */<br />
#pragma interface droc_routine<br />
void droc_routine(void *record_one, void *record_two, int *droc_result) {...}<br />
7831 0687–010 7–9
The SORT Subroutine Parameter Tables for UCS C Programs<br />
7.3.6. END Parameter<br />
Function<br />
Indicates the end of the parameter table to the SORT subroutines. Each parameter table<br />
is required to have the END parameter as its last entry.<br />
Format<br />
typedef struct<br />
{<br />
unsigned code : 6;<br />
unsigned reserved : 30;<br />
} sm_end_parameter_type;<br />
The parameter fields for the END parameter are described as follows.<br />
Parameter Field Parameter Field Descriptions Parameter Field Value<br />
code Identifies the END parameter. sm_end (071)<br />
7.3.7. FILES Parameter<br />
Function<br />
The FILES parameter is used to list the names of the scratch files to be used by the<br />
SORT subroutines during a sort operation. The SORT subroutines do not assign these<br />
scratch files so the files must be assigned to the run prior to calling the UCS C <strong>Sort</strong> Open<br />
Linkage. If any scratch files are assigned to the run, at least 3 files must be assigned,<br />
with a maximum of 26. If any of the scratch files are not assigned to the run, those files<br />
are ignored and the sort operation will proceed using only those files that are assigned to<br />
the run. Giving the SORT subroutines scratch files indicates that a disk sort (see 10.2.2)<br />
is to be performed. The FILES parameter is ignored by the merge operation.<br />
Format<br />
typedef struct<br />
{<br />
unsigned code : 6;<br />
unsigned number_of_files : 6;<br />
unsigned character_type : 6;<br />
unsigned reserved : 18;<br />
unsigned int sm_address;<br />
} sm_files_parameter_type;<br />
7–10 7831 0687–010
The SORT Subroutine Parameter Tables for UCS C Programs<br />
The parameter fields for the FILES parameter are described as follows.<br />
Parameter Field Parameter Field Descriptions Parameter Field Value<br />
code Identifies the FILES parameter. sm_files (023)<br />
character_type Indicates the character type of the file<br />
names.<br />
sm_ascii (1)<br />
number_of_files Indicates how many files exist. An integer value in the range 1<br />
to 26.<br />
sm_address Contains a pointer to a storage area that<br />
holds the file names.<br />
Address in SORT subroutines<br />
format.<br />
The format of the storage area that contains the file names is assumed to be an array of<br />
number_of_files character strings, each 12 characters in length. Also, each file name is<br />
assumed to be left-justified and space-filled when it is less than 12 characters in length.<br />
7.3.8. INFO Parameter<br />
Function<br />
The INFO parameter allows the SORT subroutines to pick up predefined, additional<br />
information. The INFO parameter is used only internally by <strong>Unisys</strong>.<br />
Format<br />
typedef struct<br />
{<br />
unsigned code : 6;<br />
unsigned type : 6;<br />
unsigned version : 6;<br />
unsigned reserved : 18;<br />
unsigned int sm_address;<br />
} sm_info_parameter_type;<br />
The parameter fields for the INFO parameter are described as follows.<br />
Parameter Field Parameter Field Descriptions Parameter Field Value<br />
code Identifies the INFO parameter. sm_info (022)<br />
type Specifies the type of information contained<br />
in the associated storage area.<br />
version Specifies the version of the information<br />
contained in the associated storage area.<br />
sm_address Contains a pointer to a storage area that<br />
contains additional information for the<br />
SORT subroutines.<br />
An integer value in the range 0<br />
to 63.<br />
An integer value in the range 0<br />
to 63.<br />
Address in SORT subroutine<br />
format.<br />
7831 0687–010 7–11
The SORT Subroutine Parameter Tables for UCS C Programs<br />
7.3.9. KEY Parameter<br />
Function<br />
The KEY parameter specifies a key field for a sort or merge operation. The KEY<br />
parameter has no effect when the COMP parameter is specified. Your sort or merge<br />
operation requires either a COMP or KEY parameter.<br />
Format<br />
typedef struct { unsigned code :6;<br />
unsigned key_type :6;<br />
unsigned order :6;<br />
unsigned start_bit :6;<br />
unsigned field_number :12;<br />
unsigned code_1 :6;<br />
unsigned reserved_1 :6;<br />
unsigned key_subtype :6;<br />
unsigned bit_count :18;<br />
unsigned code_2 :6;<br />
unsigned reserved_2 :12;<br />
unsigned start_word :18;<br />
} sm_key_parameter_type;<br />
The parameter fields for the KEY parameter are described as follows.<br />
Parameter Field Parameter Field Descriptions Parameter Field Value<br />
code Identifies the KEY parameter. sm_key (03)<br />
key_type Indicates the key type. See Section 11<br />
for a complete explanation of key types.<br />
sm_a (06), sm_b (07),<br />
sm_d (011), sm_g (014),<br />
sm_i (016), sm_j (017),<br />
sm_l (021), sm_m (022),<br />
sm_p (025), sm_q (026),<br />
sm_r (027), sm_s (030),<br />
sm_t (031), sm_u (032),<br />
sm_v (033), sm_date (040)<br />
order Indicates the order of the key. sm_ascending (06),<br />
sm_descending (011)<br />
start_bit Specifies the most significant bit of the<br />
key field within the first word of the key.<br />
The most significant bit position is 1; the<br />
least significant is 36.<br />
An integer value in the range<br />
1 to 36.<br />
7–12 7831 0687–010
The SORT Subroutine Parameter Tables for UCS C Programs<br />
Parameter Field Parameter Field Descriptions Parameter Field Value<br />
field_number Indicates the significance of the key field,<br />
1 identifying the most significant or major<br />
key field and 64 identifying the least<br />
significant key field. If one key field<br />
specifies a field number, all key fields<br />
must specify field numbers. Use 0 when<br />
field numbers are not being used, in<br />
which case the order of significance is the<br />
order in which the keys are specified.<br />
code_1 Identifies the continuation of the KEY<br />
parameter.<br />
An integer value in the range<br />
0 to 64.<br />
sm_continuation (077)<br />
key_subtype Identifies the subtype of an I key type. sm_include_trailing_spaces<br />
(0) sm_ignore_trailing_spaces<br />
(1)<br />
bit_count Specifies the number of bits in the key<br />
field.<br />
code_2 Identifies the continuation of the KEY<br />
parameter.<br />
start_word Specifies the start word of the key field.<br />
The first word position of a record is 0.<br />
An integer value in the range<br />
1 to 262,143.<br />
sm_continuation (077)<br />
An integer in the range 0 to<br />
65,535.<br />
If you do not know the start word, start bit, and bit count of the key but know the start<br />
character and the character count, a set of <strong>Sort</strong>/<strong>Merge</strong> macros is available to determine<br />
these key field values. The macros are described as follows:<br />
sm_start_char_to_start_word(start_character, key_type)<br />
sm_start_char_to_start_bit(start_character, key_type)<br />
sm_char_count_to_bit_count(character_count, key_type)<br />
where<br />
start_character<br />
is an integer specifying the start character of the key. The first character position of<br />
a record is 1.<br />
character_count<br />
is the number of characters in the key.<br />
key_type<br />
is the key field type.<br />
7831 0687–010 7–13
The SORT Subroutine Parameter Tables for UCS C Programs<br />
Example<br />
/* Declare the parameter table. */<br />
struct { ...<br />
sm_key_parameter key_parameter;<br />
... } prm_tbl;<br />
/* Fill in the fields of the KEY parameter. Assume the key field starts with the 5th<br />
character of the record and is 20 characters in length. */<br />
prm_tbl.key_parameter.code = sm_key;<br />
prm_tbl.key_parameter.key_type = sm_s;<br />
prm_tbl.key_parameter.order = sm_ascending;<br />
prm_tbl.key_parameter.field_number = 0;<br />
prm_tbl.key_parameter.code_1 = sm_continuation;<br />
prm_tbl.key_parameter.code_2 = sm_continuation;<br />
prm_tbl.key_parameter.start_word = sm_start_char_to_start_word(5, sm_s);<br />
prm_tbl.key_parameter.start_bit = sm_start_char_to_start_bit(5, sm_s);<br />
prm_tbl.key_parameter.bit_count = sm_char_count_to_bit_count(20, sm_s);<br />
7.3.10. LOCALE Parameter<br />
Function<br />
The LOCALE parameter specifies the desired locale for the sort or merge operation.<br />
Only one LOCALE parameter should be specified. If an international sort or merge is<br />
requested (with the presence of an I key) and a LOCALE parameter is not specified, the<br />
locale currently in force will be used for the sort or merge operation.<br />
Format<br />
typedef struct<br />
{<br />
unsigned code : 6;<br />
unsigned locale_name_length : 6;<br />
unsigned reserved : 24;<br />
unsigned int sm_address;<br />
} sm_locale_parameter_type;<br />
The parameter fields for the LOCALE parameter are described as follows.<br />
Parameter Field Parameter Field Descriptions Parameter Field Value<br />
code Identifies the LOCALE parameter. sm_locale (025)<br />
locale_name_length Specifies the character length of the<br />
locale name.<br />
sm_address Contains a pointer to a storage location<br />
that contains the locale name.<br />
An integer value in the range 1<br />
to 16.<br />
Address in SORT subroutines<br />
format.<br />
7–14 7831 0687–010
7.3.11. LOG Parameter<br />
Function<br />
The SORT Subroutine Parameter Tables for UCS C Programs<br />
The LOG parameter is an optional parameter that indicates to the SORT subroutines<br />
whether or not normal sort completion messages should be issued to the run log. If<br />
specified, it overrides the LOG configuration parameter (see 9.11). If this parameter is<br />
not specified, the LOG configuration parameter takes effect, if present. Otherwise,<br />
normal sort completion messages are issued. See A.3 for a list of sort messages that<br />
are written to the system log file.<br />
Format<br />
typedef struct<br />
{<br />
unsigned code : 6;<br />
unsigned reserved : 24;<br />
unsigned messages : 6;<br />
} sm_log_parameter_type;<br />
The parameter fields for the LOG parameter are described as follows.<br />
Parameter Field Parameter Field Descriptions Parameter Field Value<br />
code Identifies the LOG parameter. sm_log (065)<br />
messages Indicates whether or not log messages are<br />
to be issued.<br />
7.3.12. OPTION Parameter<br />
Function<br />
sm_off (0)<br />
sm_on (1)<br />
The OPTION parameter tells the SORT subroutines general information to perform<br />
specific actions.<br />
Format<br />
typedef struct<br />
{<br />
unsigned code : 6;<br />
unsigned reserved_1 : 26;<br />
unsigned delete_dups : 1;<br />
unsigned rdms_caller : 1;<br />
unsigned reserved_2 : 1;<br />
unsigned no_p_option : 1;<br />
} sm_option_parameter_type;<br />
7831 0687–010 7–15
The SORT Subroutine Parameter Tables for UCS C Programs<br />
The parameter fields for the OPTION parameter are described as follows.<br />
Parameter Field Parameter Field Descriptions Parameter Field Value<br />
code Identifies the OPTION parameter. sm_option (067)<br />
delete_dups Indicates whether or not duplicate records<br />
are to be deleted by the SORT subroutines.<br />
This setting is ignored when the DROC<br />
parameter or PRESERVE parameter is<br />
specified.<br />
rdms_caller Reserved for <strong>Unisys</strong> internal use.<br />
no_p_option Indicates whether or not the P option is to<br />
be suppressed at execution time.<br />
Execution time parameters are not available<br />
when using the UCS C program linkages.<br />
sm_no (0)<br />
sm_yes (1)<br />
sm_no (0)<br />
sm_yes (1)<br />
You can use the OPTION parameter multiple times for the same sort or merge operation<br />
without destroying or overriding the effects of the previous option settings.<br />
7.3.13. PAD Parameter<br />
Function<br />
The PAD parameter is an optional parameter that reserves space in the parameter table.<br />
Format<br />
typedef struct<br />
{<br />
unsigned code : 6;<br />
unsigned reserved : 30;<br />
} sm_pad_parameter_type;<br />
The parameter fields for the PAD parameter are described as follows.<br />
Parameter Field Parameter Field Descriptions Parameter Field Value<br />
code Identifies the PAD parameter. sm_pad (072)<br />
7.3.14. PRESERVE Parameter<br />
Function<br />
The PRESERVE parameter determines the output order of records that have equal keys.<br />
When the PRESERVE parameter is specified, records with equal keys are returned in the<br />
order in which they were released to the SORT subroutines. The PRESERVE parameter<br />
overrides the delete_dups bit in the OPTION parameter (see 7.3.12) and is ignored for<br />
the merge operation.<br />
7–16 7831 0687–010
Format<br />
The SORT Subroutine Parameter Tables for UCS C Programs<br />
typedef struct<br />
{<br />
unsigned code : 6;<br />
unsigned reserved : 30;<br />
} sm_preserve_parameter_type;<br />
The parameter fields for the PRESERVE parameter are described as follows.<br />
Parameter Field Parameter Field Descriptions Parameter Field Value<br />
code Identifies the PRESERVE parameter. sm_preserve (05)<br />
7.3.15. RSZ Parameter<br />
Function<br />
The RSZ parameter is used to specify the size of records being sorted or merged. When<br />
sorting variable-length records, the size specified is the maximum length of the record.<br />
Every sort or merge operation must specify a record size.<br />
Format<br />
typedef struct {<br />
unsigned code : 6;<br />
unsigned size_type : 6;<br />
unsigned size : 24;<br />
} sm_rsz_parameter_type;<br />
The parameter fields for the RSZ parameter are described as follows.<br />
Parameter Field Parameter Field Descriptions Parameter Field Value<br />
code Identifies the RSZ parameter. sm_rsz (1)<br />
size_type Indicates that the size is either a count of<br />
words, 6-bit fields, 9-bit fields, or 1-bit<br />
fields.<br />
size Specifies the maximum length of a record<br />
in size_type terms.<br />
sm_word (0)<br />
sm_6bit (1)<br />
sm_9bit or sm_char (2)<br />
sm_bit (3)<br />
An integer in the range 1 to<br />
16,777,215.<br />
7831 0687–010 7–17
The SORT Subroutine Parameter Tables for UCS C Programs<br />
7.3.16. SEQ Parameter<br />
Function<br />
The SEQ parameter is an optional parameter that specifies a collating sequence table<br />
that the SORT subroutines are to use when determining the order of records from values<br />
contained in the key fields (see 7.3.9). This parameter, when specified, is used by both<br />
the sort and merge operations. This parameter has no effect when the COMP<br />
parameter is specified.<br />
Format<br />
typedef struct<br />
{<br />
unsigned code : 6;<br />
unsigned table_type : 6;<br />
unsigned reserved : 24;<br />
unsigned int sm_address;<br />
} sm_sequence_parameter_type;<br />
The parameter fields for the SEQ parameter are described as follows.<br />
Parameter Field Parameter Field Description Parameter Field Value<br />
code Identifies the SEQ parameter and the length<br />
in words of the collating sequence table.<br />
table_type Indicates which collating sequence table<br />
type is to be used. See Table 7–2 for a<br />
description of table types.<br />
sm_address Contains a pointer to a storage location that<br />
contains the collating sequence table when<br />
the table_type fields equal sm_user_defined;<br />
otherwise, this field is ignored.<br />
sm_seq_64 (4)<br />
sm_seq_128 (7)<br />
sm_seq_256 (024)<br />
sm_user_defined (0)<br />
sm_fieldata (1)<br />
sm_ascii_128 (2)<br />
sm_ascii_256 (3)<br />
sm_ebcdic_256 (4)<br />
sm_katakana_256 (5)<br />
Address in SORT subroutines<br />
format.<br />
7–18 7831 0687–010
The SORT Subroutine Parameter Tables for UCS C Programs<br />
Table 7–2 describes the table sequence of each table type.<br />
Table 7–2. Collating Sequence Table Types<br />
Table Type Explanation of Table Sequence<br />
sm_user_defined A 64–, 128–, or 256–word user-created sequence table. The address of<br />
the table is given to the SORT subroutines by using the sm_address field.<br />
The format of the table must have one word representing one character<br />
with the octal representation of the character contained in H2 of the<br />
word.<br />
sm_fieldata A 64-word Fieldata sequence table supplied by <strong>Sort</strong>/<strong>Merge</strong> that is used<br />
with all type A keys. The sequence is space, letters, numbers, followed<br />
by all special characters starting with 0 and ending with 077 octal.<br />
sm_ascii_128 A 128-character sequence table supplied by <strong>Sort</strong>/<strong>Merge</strong> for use with all<br />
type S keys. The sequence is space, letters (A,a,B,b,...,Z,z), and<br />
numbers, followed by all special characters from 0 to 0177 octal.<br />
sm_ascii_256 A 256-character sequence table supplied by <strong>Sort</strong>/<strong>Merge</strong> used with all<br />
type S keys. The sequence is the same as for sm_ascii_128 except that<br />
the last character is 0377 octal.<br />
sm_ebcdic_256 A 256-character sequence table supplied by <strong>Sort</strong>/<strong>Merge</strong> used by all type<br />
S keys. The sequence follows the EBCDIC collating sequence.<br />
sm_katakana_256 A 256-character sequence table supplied by <strong>Sort</strong>/<strong>Merge</strong> used by all type<br />
S keys. The sequence is the normal katakana character sequence.<br />
7.3.17. START Parameter<br />
Function<br />
Indicates the start of the parameter table to the SORT subroutines. This parameter is<br />
required to be the first parameter in every parameter table used by both the sort and<br />
merge operations.<br />
Format<br />
typedef struct<br />
{<br />
unsigned code : 6;<br />
unsigned version : 6;<br />
unsigned reserved : 24;<br />
} sm_start_parameter_type;<br />
7831 0687–010 7–19
The SORT Subroutine Parameter Tables for UCS C Programs<br />
The parameter fields for the START parameter are described as follows.<br />
Parameter Field Parameter Field Description Parameter Field Value<br />
code Identifies the START parameter. sm_start (00)<br />
version Indicates the parameter table version. 1<br />
7.3.18. VOL Parameter<br />
Function<br />
The VOL parameter tells the SORT subroutines approximately how many thousands of<br />
records are to be sorted. This parameter is only used for sort operations when a disk<br />
type sort (see 10.2.2) is being performed.<br />
Format<br />
typedef struct<br />
{<br />
unsigned code : 6;<br />
unsigned thousands_of_records : 30;<br />
} sm_vol_parameter_type;<br />
The parameter fields for the VOL parameter are described as follows.<br />
Parameter Field Parameter Field Description Parameter Field Value<br />
code Identifies the VOL parameter. sm_vol (064)<br />
thousands_of_records Specifies the record count in<br />
thousands of records.<br />
7.3.19. VRSZ Parameter<br />
Function<br />
An integer value in the range 1 to<br />
1,073,741,823.<br />
The VRSZ parameter is used to specify that variable-length records are being sorted and<br />
to specify the minimum link size of the input records. If you are using the KEY<br />
parameter, the key must be contained within the first link. If you are using the COMP or<br />
DROC parameters, only the first link of the record can be accessed by the user routine.<br />
See 10.3 for variable-length record efficiency considerations. The VRSZ parameter is<br />
ignored for merge operations.<br />
7–20 7831 0687–010
Format<br />
The SORT Subroutine Parameter Tables for UCS C Programs<br />
typedef struct<br />
{<br />
unsigned code : 6;<br />
unsigned size_type : 6;<br />
unsigned size : 24;<br />
} sm_vrsz_parameter_type;<br />
The parameter fields for the VRSZ parameter are described as follows.<br />
Parameter Field Parameter Field Descriptions Parameter Field Value<br />
code Identifies the VRSZ parameter. sm_vrsz (2)<br />
size_type Indicates that the size is either a count of<br />
words, 6-bit fields, or 9-bit fields.<br />
size Specifies the minimum acceptable length<br />
of a link in size_type terms. All keys must<br />
be defined within this size.<br />
sm_word (0)<br />
sm_6bit (1)<br />
sm_9bit or sm_char (2)<br />
sm_bit(3)<br />
An integer in the range<br />
1 to 16,777,215<br />
7.4. User Routine Substitution Considerations<br />
One of the more powerful features of the <strong>Sort</strong>/<strong>Merge</strong> product is its ability to support the<br />
substitution of your routines for certain <strong>Sort</strong>/<strong>Merge</strong> functions. This ability gives you<br />
greater control over the <strong>Sort</strong>/<strong>Merge</strong> process, allowing you to do the following:<br />
• Determine your own comparison criteria<br />
By writing and substituting your own comparison routine, you can perform<br />
comparisons based on criteria different from those normally used by the SORT<br />
subroutines.<br />
• Determine how duplicate records are processed<br />
You can write and substitute the SORT subroutine duplicate record processing with<br />
a routine that changes what normally occurs when two records being compared are<br />
found to have equal keys.<br />
The following describes specific coding considerations you should know when writing<br />
and substituting your routines for certain SORT functions.<br />
7831 0687–010 7–21
The SORT Subroutine Parameter Tables for UCS C Programs<br />
7.4.1. User Compare Code<br />
You can write your own compare routine to perform a comparison based upon criteria<br />
that are different from those normally used by the SORT subroutines. To give control to<br />
your compare routine, specify the COMP parameter with the address of your routine.<br />
See the COMP parameter in 7.3.1.<br />
The interface between the SORT subroutines and a user compare routine when using<br />
the UCS C program linkages is defined as follows:<br />
• The SORT subroutines call the UCS C user routine with three parameters, passed by<br />
reference. The parameters are<br />
− The address of the first of two records<br />
− The address of the second of two records<br />
− The address of a one-word storage area provided by the SORT subroutines that<br />
the user routine will fill in with the result value<br />
Result of Compare<br />
Result Parameter<br />
Value<br />
(record one) precedes (record two) 0<br />
(record one) follows (record two) 1<br />
(record one) equals (record two) 2<br />
• The user compare routine does not return a function value.<br />
An example declaration of a user-provided compare routine is as follows:<br />
#pragma interface user_comp<br />
void user_comp(void *record_one, void *record_two, int *comp_result)<br />
{<br />
enum result_value { one_precedes_two, /* 0 */<br />
one_follows_two, /* 1 */<br />
one_eq_two, /* 2 */<br />
error=262144}; /* force a full-word enum value */<br />
enum result_value *result_ptr = (enum result_value *) comp_result;<br />
. . .<br />
}<br />
By default, UCS C pointer and array parameters are not compatible with non-UCS C<br />
reference parameters. The pragma interface allows passing object pointer and array<br />
parameters to UCS C from non-UCS C reference parameters.<br />
7–22 7831 0687–010
The SORT Subroutine Parameter Tables for UCS C Programs<br />
7.4.2. User Duplicate Record Code<br />
You can write a subroutine that changes what occurs when two records being compared<br />
are found to be equal (that is, duplicate records). You can do the following:<br />
• Delete the duplicate record<br />
• Combine the two records<br />
• Leave the records as they are<br />
When you write a data reduction routine, you specify what to do with duplicate records.<br />
To give control to your data reduction routine, specify the DROC parameter with the<br />
address of your routine. See the DROC parameter in 7.3.5.<br />
The interface between the SORT subroutines and the data reduction routine when using<br />
the UCS C program linkages is defined as follows:<br />
• The SORT subroutines call the user UCS C routine with three parameters, passed by<br />
reference.<br />
− The address of the first of two records<br />
− The address of the second of two records<br />
− The address of a one-word storage area provided by <strong>Sort</strong>/<strong>Merge</strong> that the user<br />
routine will fill in with the result value<br />
Result of Data Reduction<br />
Result Parameter<br />
Value<br />
No action 0<br />
(Record one) is optionally altered and<br />
(record two) is deleted<br />
• The user data reduction routine does not return a function value.<br />
An example declaration of a user-provided data reduction routine is as follows:<br />
#pragma interface user_droc<br />
void user_droc(void *record_one, void *record_two, int *droc_result) {<br />
enum result_value { no_change, /* 0 */<br />
record_deleted, /* 1 */<br />
error=262144}; /* force a full-word enum value */<br />
enum result_value *result_ptr = (enum result_value *) droc_result;<br />
. . .<br />
}<br />
By default, UCS C pointer and array parameters are not compatible with non-UCS C<br />
reference parameters. The pragma interface allows passing object pointer and array<br />
parameters to UCS C from non-UCS C reference parameters.<br />
7831 0687–010 7–23<br />
1
The SORT Subroutine Parameter Tables for UCS C Programs<br />
7–24 7831 0687–010
Section 8<br />
SORT Subroutine Linkages for UCS C<br />
Programs<br />
This section describes the Universal Compiling System (UCS) C linkages you use to call<br />
the SORT subroutines from a UCS C program.<br />
When you use the UCS C program linkages, the common bank SORT subroutines are<br />
accessed. You must install <strong>Sort</strong>/<strong>Merge</strong> with Software Library Administrator (SOLAR)<br />
using an installation mode that makes the common bank SORT subroutines available<br />
before the UCS C program linkages can be used.<br />
8.1. UCS C File Inclusion Element<br />
A <strong>Sort</strong>/<strong>Merge</strong> element must be included into your program that contains definitions that<br />
will assist in using the UCS C linkages. The element is included into your program as<br />
follows:<br />
#include <br />
This element contains<br />
• Function prototypes for the UCS C linkages<br />
• A typedef of the record information packet and constant definitions for some field<br />
values<br />
• A typedef of the result status and constant definitions for some field values<br />
The naming convention used by identifiers in sm$defs.h is to begin each definition or tag<br />
name with sm_ to indicate that the identifier is a <strong>Sort</strong>/<strong>Merge</strong> identifier. Structure<br />
member names, union member names, and function names do not necessarily follow<br />
this naming convention. All names are in lowercase except function names, which are in<br />
uppercase.<br />
7831 0687–010 8–1
SORT Subroutine Linkages for UCS C Programs<br />
8.2. UCS C Program Linkage Parameters<br />
The SORT subroutines and the user UCS C program communicate by using function<br />
parameters. A description of each function parameter follows. See 8.4 and 8.5 for<br />
descriptions of how to call UCS C linkages.<br />
8.2.1. Result Status Parameter<br />
The function calls to the UCS C program linkages do not return function values. Instead,<br />
each UCS C linkage has a result status parameter. The user program is required to<br />
allocate a variable for the result status parameter. The result status is defined by the<br />
<strong>Sort</strong>/<strong>Merge</strong> typedef sm_result_status_type and is described by the following:<br />
Format<br />
typedef struct<br />
{<br />
unsigned severity : 3;<br />
unsigned component_id : 15;<br />
unsigned message_id : 18;<br />
} sm_result_status_type;<br />
where<br />
severity<br />
indicates the severity of the condition detected. The possible values are listed in<br />
Table 8–1.<br />
Severity<br />
Code<br />
Severity Class<br />
Table 8–1. Severity Code Values<br />
Explanation<br />
0 Success The requested operation completed successfully (constant<br />
definition: sm_success).<br />
2 Informational The requested operation completed normally but some<br />
additional information such as end of data is being<br />
returned (constant definition: sm_informational).<br />
3 Warning The requested operation performed an action that it<br />
determined the caller requested. If the caller did not<br />
intend for this action to occur, the current operation must<br />
be restarted to correct the situation. If the caller intended<br />
this action to occur, the operation can continue. The<br />
action taken, such as padding a record, should be<br />
harmless (constant definition: sm_warning).<br />
8–2 7831 0687–010
Severity<br />
Code<br />
Severity Class<br />
SORT Subroutine Linkages for UCS C Programs<br />
Table 8–1. Severity Code Values<br />
Explanation<br />
5 Minor The requested operation performed an action that it<br />
determined the caller requested. The action taken, such<br />
as truncating a record, could be detrimental to the<br />
operation or the data. If the caller did not intend for this<br />
action to occur, the current operation must be restarted to<br />
correct the situation. If the caller intended this action to<br />
occur, the operation can continue (constant definition:<br />
sm_minor).<br />
6 Major A situation has been encountered that prevents the<br />
requested call from continuing without being corrected.<br />
The caller can attempt to correct the situation and perform<br />
the call again. The operation is in a state that can be<br />
resumed (constant definition: sm_major).<br />
7 Failure A situation has been encountered that prevents the<br />
requested call and operation from continuing. The caller<br />
cannot resume this operation and the operation must be<br />
closed. The caller must restart the operation from the<br />
beginning (constant definition: sm_failure).<br />
If the SORT subroutines encounter more than one situation that results in the setting<br />
of the result status parameter, only the most severe will be returned. All major or<br />
failure severity errors are returned immediately.<br />
component_id<br />
is the assigned Extended Language Message System (ELMS) code for <strong>Sort</strong>/<strong>Merge</strong>.<br />
This code is LSM (053626 octal, 22422 decimal) and is always set.<br />
Note: <strong>Sort</strong>/<strong>Merge</strong> is currently not using the ELMS, but has an assigned<br />
component_id and is setting it to maintain compatibility if ELMS is used in the future.<br />
message_id<br />
The message_id field of the result status parameter contains the message identifier<br />
of the condition returned. It should be noted that messages that are not issued<br />
from basic mode are not printed at this time; only the status is returned. If <strong>Sort</strong><br />
implements an ELMS interface, the message could be printed if requested by the<br />
caller. The possible values are as follows.<br />
Message_Id Value Description<br />
0 No errors were detected (constant definition: sm_ok).<br />
Nonzero SORT subroutines error code (see A.2)<br />
0777776 With a severity of informational, indicates that all records have been<br />
returned (constant definition: sm_eof).<br />
7831 0687–010 8–3
SORT Subroutine Linkages for UCS C Programs<br />
The SORT subroutines always set the result status. By testing the result status, the<br />
calling program can determine whether or not the SORT subroutines call was successful.<br />
8.2.2. D-Bank Address Parameter<br />
The d-bank address parameter is the address of a one-word storage area in the user<br />
program. The SORT subroutines open linkages fill in this word of storage with a value<br />
that identifies the storage area allocated by the SORT subroutines. Each subsequent call<br />
to the SORT subroutines for the same sort or merge operation must pass the identifier<br />
to the SORT subroutines so the sort or merge operation can be continued correctly.<br />
8.2.3. Parameter Table Parameter<br />
The sort or merge operation is defined by the parameter entries in the parameter table.<br />
Subsection 7.3 describes the parameter table in detail. The parameter table address<br />
parameter gives the address of a storage area that contains the user-created parameter<br />
table.<br />
8.2.4. Record Information Packet Parameter<br />
The UCS C linkages that transfer records to or from the SORT subroutines have four or<br />
five parameters: a result status, a dbank address, a record information packet, and one or<br />
two record virtual addresses to handle the transfer. The user program must allocate<br />
storage for the record information packet and for the record areas and pass the address<br />
of the record information packet and the addresses of the record areas as parameters.<br />
When transferring data to the SORT subroutines, the user puts record information in the<br />
record information packet and data in the record area. When the data is transferred back<br />
to the user program, the SORT subroutines put record information in the record<br />
information packet and the data in the record area. The record information packet and its<br />
fields are described on the pages that follow.<br />
8.2.4.1. Record Information Packet Definition<br />
The structure of the record information packet (version 1) is illustrated in Figure 8–1.<br />
Figure 8–1. Record Information Packet Version 1 Structure<br />
8–4 7831 0687–010
SORT Subroutine Linkages for UCS C Programs<br />
The structure of the record information packet (version 2) is illustrated in Figure 8–2.<br />
Version 2 is the current version of the record information packet and was first defined in<br />
SORT 20R1.<br />
Figure 8–2. Record Information Packet Version 2 Structure<br />
The UCS C definition of the current version of the record information packet is found in<br />
the header element sm$defs/h. This definition can be used to pass either version of the<br />
record information packet. The record information packet version 2 is defined by the<br />
<strong>Sort</strong>/<strong>Merge</strong> typedef sm_record_packet_type and is described in the following format.<br />
Format<br />
typedef struct { unsigned version:9;<br />
unsigned reserved_1:3;<br />
unsigned buffer_gran:3;<br />
unsigned record_gran:3<br />
unsigned type:9;<br />
unsigned subtype:9;<br />
unsigned record_length;<br />
unsigned buffer_length;<br />
unsigned file_id:18;<br />
unsigned reserved_2:18;<br />
unsigned number_of_records;<br />
union { unsigned pad_word;<br />
char pad_word_char[4]; }<br />
unsigned reserved_3;<br />
unsigned reserved_4;<br />
unsigned reserved_5;<br />
unsigned reserved_6;<br />
unsigned reserved_7;<br />
unsigned reserved_8; } sm_record_packet_type;<br />
7831 0687–010 8–5
SORT Subroutine Linkages for UCS C Programs<br />
8.2.4.2. Record Information Packet version Field<br />
The record information packet version field indicates the format of the record information<br />
packet. Prior to SORT 20R1 the only valid value for the version field was 1. The bulk<br />
interface introduced in SORT 20R1 increased the size of the record information packet<br />
with a new field defined in the expanded area. Thus, 2 is a valid value for the version<br />
field, indicating that an expanded packet exists and that the field pad_word contains a<br />
meaningful value. A version field with a value of 1 is still valid, whether or not the bulk<br />
interface is being used, and indicates that the field pad_word does not exist.<br />
8.2.4.3. Record Information Packet buffer_gran Field<br />
The record information packet buffer_gran field defines the granularity (words, 6-bit<br />
characters, 9-bit characters [bytes], or bits) of the buffer_length field of the record<br />
information packet. Specific meaning of the various fields will be described in the<br />
appropriate interface subsections.<br />
8.2.4.4. Record Information Packet record_gran Field<br />
The record information packet record_gran field defines the granularity (words, 6-bit<br />
characters, 9-bit characters [bytes], or bits) of the record_length field of the record<br />
information packet. Specific meaning of the various fields will be described in the<br />
appropriate interface subsections.<br />
8.2.4.5. Record Information Packet type Field<br />
The record information packet type field identifies how records are being transferred on<br />
calls to the SORT subroutines UCS C <strong>Sort</strong> Release, UCS C <strong>Sort</strong> Return, UCS C <strong>Merge</strong><br />
Release, and UCS C <strong>Merge</strong> Request linkages. The valid values for the record<br />
information packet type field, when passing records to and from the SORT subroutines,<br />
are summarized in Table 8–2.<br />
Value<br />
Table 8–2. Record Information Packet Type Field Values<br />
UCS C Defined<br />
Constant Values<br />
Explanation<br />
0 sm_single_record A single record at an address in memory.<br />
1 sm_blocked_records A buffer of records formatted as described by the<br />
subtype field, located at an address in memory.<br />
None of the<br />
above<br />
Error situation.<br />
The record information packet type field only pertains to the particular call to the linkage<br />
where it is set. Subsequent calls to the same linkage or a different linkage within the<br />
same sort operation may have a different type field specified. The record information<br />
packet subtype field (see 8.2.4.6) further identifies the format of the records being<br />
passed. The valid formats for records in a record buffer are identified in 8.3. For a<br />
merge operation only single record interfaces are valid.<br />
8–6 7831 0687–010
8.2.4.6. Record Information Packet subtype Field<br />
SORT Subroutine Linkages for UCS C Programs<br />
The subtype field provides additional information about the record. Since the bulk<br />
interface supports different ways of formatting records within the buffer, the record<br />
information packet subtype field is used to indicate to the SORT subroutines the format<br />
of the records within the buffer. When the UCS C <strong>Sort</strong> Release Linkage is called, the<br />
SORT subroutine accepts records from the buffer in the format specified by the subtype<br />
field. When the UCS C <strong>Sort</strong> Return Linkage is called, the SORT subroutine formats<br />
records in the buffer according to the value specified in the subtype field.<br />
When the record information packet type field is sm_single_record, the only valid value<br />
for the subtype field is sm_single_record.<br />
Table 8–3 summarizes the valid values of the record information packet subtype field<br />
when passing a record buffer to and from the SORT subroutines (type field equals<br />
sm_blocked_records).<br />
Table 8–3. Record Information Packet Subtype Field Values When Type<br />
Field Equals 1<br />
Value<br />
UCS C Defined<br />
Constant Values<br />
Explanation<br />
0 sm_fixed_records The buffer at record_address parameter is a<br />
fixed record buffer format (see 8.3.1).<br />
1 sm_variable1_records The buffer at record_address parameter is a<br />
variable1 records buffer format (see 8.3.2).<br />
2 sm_variable2_records The buffer at record_address parameter is a<br />
variable2 records buffer format (see 8.3.3).<br />
None of the above Error situation.<br />
The record information packet subtype field is only effective for the duration of the call to<br />
the release or return linkage and does not have to be the same for all calls to the release<br />
and return linkages for the same sort operation. For example:<br />
• Records may be released to the sort operation using one format and then returned<br />
using a different format.<br />
• Some records may be released to the SORT subroutines in a fixed records format,<br />
whereupon additional records could be released in a variable1 records formatted<br />
buffer and the records returned in a variable1 records formatted buffer format.<br />
Almost any combination of record information packet subtype field values are allowed on<br />
individual calls to the SORT subroutines. However, the records can be padded or<br />
truncated, as necessary, if all records are not released and returned in the same format.<br />
To ensure the correct format, a variable2 records formatted buffer can be returned only if<br />
all records were released via a variable2 records formatted buffer and no record padding<br />
or record truncation occurred.<br />
7831 0687–010 8–7
SORT Subroutine Linkages for UCS C Programs<br />
8.2.4.7. Record Information Packet record_length Field<br />
The record_length field in the record information packet contains an integer in the range<br />
of 1 to 07777777777 (2**30–1 = 1,073,741,823). When one record at a time is<br />
released, this field contains the length of the record in terms of the record_gran field.<br />
When a single record is returned, this field contains the length of the record returned in<br />
terms of the record_gran field. When releasing and returning a fixed records formatted<br />
buffer, this field contains the record length in terms of the record_gran field of each<br />
record in the fixed records formatted buffer. This field has no meaning when a variable1<br />
records formatted buffer or a variable2 records formatted buffer is released or returned.<br />
Upon return from the call to the UCS C <strong>Sort</strong> Release Linkage, this field may be altered<br />
from its input state when the type field of the record information packet indicates<br />
sm_blocked_records. Additional information about the entry and exit conditions of the<br />
record_length field is stated when describing each UCS C <strong>Sort</strong> or <strong>Merge</strong> Linkage (see<br />
8.4 and 8.5).<br />
8.2.4.8. Record Information Packet buffer_length Field<br />
The buffer_length field in the record information packet contains an integer in the range<br />
of 1 to 07777777777 (2**30–1 = 1,073,741,823). When a single record or any format of<br />
a buffer is returned, this field must be set to the length of the area pointed to by the<br />
record_address parameter of the UCS C <strong>Sort</strong> Return Linkage or the out_record_address<br />
of the UCS C <strong>Merge</strong> Request Linkage. Upon the return from the call to the UCS C <strong>Sort</strong><br />
Return Linkage for any format of a record buffer, this field contains the length of the data<br />
inserted into the buffer by the SORT subroutines. The buffer_gran field defines the<br />
granularity of the length contained in this field.<br />
When releasing any format of a record buffer with UCS C <strong>Sort</strong> Release Linkage, this field<br />
must contain the length of the data contained in the buffer being released. The field<br />
should not contain the maximum length of the buffer. If the number_of_records field in<br />
the record information packet is provided when releasing any format of a buffer, this field<br />
must contain a value in the range:<br />
length of data in buffer
SORT Subroutine Linkages for UCS C Programs<br />
8.2.4.10. Record Information Packet pad_word Field<br />
The pad_word and pad_word_char fields in the record information packet define a field<br />
that contains the integer or characters respectively that the SORT subroutines should<br />
use to pad records. Throughout this guide pad_word will be used when referencing this<br />
field. The pad_word field exists only when the version field of the record information<br />
packet has a valid value other than 1 (currently the only other valid value is 2). The<br />
pad_word field is valid for both sm_single_record and sm_blocked_records record<br />
transfers.<br />
8.2.5. Record Address Parameter<br />
The UCS C linkages that transfer records to or from the SORT subroutines have one or<br />
two record address parameters. When releasing records to the SORT subroutines, the<br />
record address parameter contains the address where the SORT subroutines can find<br />
the record or record buffer. When records are returned from the SORT subroutines, the<br />
record address parameter contains the address of a user-allocated storage area where<br />
the SORT subroutines will place the returned record or records. The storage area<br />
associated with the record for address parameter must be at least as large as the size<br />
indicated in the buffer_gran and buffer_length fields of the record information packet.<br />
8.3. Bulk Interface<br />
The SORT bulk interface provides the capability to pass a buffer or block of records<br />
between a user program and the SORT subroutines. Prior to SORT 20R1, the SORT<br />
interface required a separate call for each record. To use the bulk interface feature, a<br />
sort operation must be invoked using the SORT subroutines UCS C <strong>Sort</strong> Release Linkage<br />
or the UCS C <strong>Sort</strong> Return Linkage. A buffer cannot be passed from the Basic Mode<br />
MASM linkages or any UCS C <strong>Merge</strong> Linkages.<br />
The bulk interface supports different ways of formatting records within the buffer. The<br />
formatting of the records in the buffer is indicated by the setting of the subtype field of<br />
the record information packet as described in “Record Information Packet subtype<br />
Field”. The following subsections describe in detail the buffer formats. All buffer<br />
formats require that only complete records be passed in a buffer. A record cannot begin<br />
in one buffer and then the remaining part of the record be passed in the next buffer.<br />
Also, in all buffer formats the records are packed into the buffer with no padding or<br />
space between records. The last bit of a record is immediately followed by the first bit<br />
of the next record. Thus, depending upon the length of the records, some or all of the<br />
records in the buffer may not be aligned to a word or character boundary. The<br />
illustrations of the buffer formats that follow may look as through the records are word<br />
aligned, but that is not the case unless the buffer begins on a word boundary and the<br />
length of all records are a multiple of a word.<br />
7831 0687–010 8–9
SORT Subroutine Linkages for UCS C Programs<br />
8.3.1. Fixed Records Buffer Format<br />
The fixed records buffer format is used when the subtype field of the record information<br />
packet is sm_fixed_records and the type field of the record information packet is<br />
sm_blocked_records. Either a fixed length record sort or variable length record sort can<br />
use the fixed records buffer format as the record transfer format. However, the records<br />
in the buffer must be fixed length (that is, all the records in the buffer are the same<br />
length). The length of the records in the fixed records buffer format is defined by the<br />
record_gran and record_length fields of the record information packet.<br />
Format<br />
There is no record control information in the fixed records buffer format. This means<br />
that based on the record_gran and record_length fields passed in the record information<br />
packet, SORT may need to pad or truncate records depending on how the record length<br />
compares to other information passed to SORT (for example, record size in the<br />
parameter table). If padding must take place, the value of the pad_word field of the<br />
record information packet is used if the record information packet version field is two. If<br />
the record information packet version field is 1, then ASCII spaces are used for any<br />
necessary padding. When padding occurs using pad_word or a word of ASCII spaces,<br />
the padding will occur beginning with the bit of the pad word following the last bit of the<br />
record when the record has been word aligned. Figure 8–3 illustrates the structure of<br />
the fixed records buffer format.<br />
Figure 8–3. Fixed Records Buffer Format<br />
8–10 7831 0687–010
8.3.2. Variable1 Records Buffer Format<br />
SORT Subroutine Linkages for UCS C Programs<br />
This subsection describes the variable1 records buffer format. Either a fixed length sort<br />
or a variable length sort can have records transferred by the variable1 records buffer<br />
format.<br />
Format<br />
This format allows records of different lengths to exist in a buffer. The length of each<br />
record is defined in a record control word (RCW) that precedes the record. The length of<br />
the record does not include the RCW. When the records are passed to the SORT<br />
subroutines, the RCW is not passed; thus, word 0 of the sort internal record is the word<br />
immediately following the RCW. When the caller requests that a variable1 records<br />
buffer format be returned, the SORT subroutines insert the RCW followed by the record.<br />
Figure 8–4 illustrates the variable1 records buffer format.<br />
Figure 8–4. Variable1 Records Buffer Format<br />
Figure 8–5 illustrates the format of the record control word (RCW) for the variable1<br />
records buffer format.<br />
Figure 8–5. Variable1 Records RCW Format<br />
7831 0687–010 8–11
SORT Subroutine Linkages for UCS C Programs<br />
Table 8–4 describes the fields with a special meaning for a variable1 records buffer<br />
format.<br />
Table 8–4. Variable1 Records Buffer Fields<br />
Item Releasing Records Returning Records<br />
RCW granularity<br />
Set by the caller. Contains the<br />
granularity of the RCW record length<br />
field. Valid value for this field are:<br />
0 – Words<br />
1 – 6-bit characters<br />
2 – 9-bit characters (bytes)<br />
3 – Bits<br />
RCW record length Set by the caller. Contains the length<br />
of the record not including the<br />
record control word in terms of the<br />
RCW granularity field.<br />
8.3.3. Variable2 Records Buffer Format<br />
Set by the SORT subroutines.<br />
Contains the granularity of the<br />
RCW record length field. Valid<br />
value for this field are:<br />
0 – Words<br />
1 – 6-bit characters<br />
2 – 9-bit characters (bytes)<br />
3 – Bits<br />
Set by the SORT subroutines.<br />
Contains the length of the record<br />
not including the record control<br />
word in terms of the RCW<br />
granularity field.<br />
This subsection describes the variable2 records buffer format. A variable2 records buffer<br />
format is used when the subtype field of the record information packet is<br />
sm_variable2_records and the type field is sm_blocked_records. The variable2 records<br />
buffer format transfer method is another method for passing records of varying length.<br />
It is similar to the variable1 records buffer format and can be used for either a fixed<br />
length record sort or a variable length record sort.<br />
Format<br />
This method requires that the length of the record to be located in bits 18-35 of word 0<br />
of each record, and that the record_gran field of the record information packet defines<br />
the granularity of record length for all records in the buffer. In other words the record<br />
control word (RCW) is part of the record. When records are passed to the SORT<br />
subroutines, the RCW is also passed; thus, word 0 of the sort internal record is the word<br />
containing the record length. When a variable2 records buffer format is requested to be<br />
returned, the format requires that the records contain the RCW. To ensure that all<br />
records meet this criteria, the variable2 records buffer format can be returned only when<br />
all records were released via a variable2 records buffer format, the same record_gran<br />
field value was specified for all release linkages, and no records were padded or<br />
truncated during the release linkages. In addition, the record_gran field specified on the<br />
return linkage must match the record_gran field of the release linkages.<br />
8–12 7831 0687–010
SORT Subroutine Linkages for UCS C Programs<br />
To avoid padding/truncating, a variable length record sort operation should be performed.<br />
These limitations avoid problems that require the insertion of a record control word or<br />
the alteration of the existing record length in word zero of the record. Figure 8–6<br />
illustrates the variable2 records buffer format.<br />
Figure 8–6. Variable2 Records Buffer Format<br />
7831 0687–010 8–13
SORT Subroutine Linkages for UCS C Programs<br />
8.4. UCS C <strong>Sort</strong> Program Linkages<br />
The five following sort functions are available to perform a sort operation:<br />
• Open the sort operation.<br />
• Release records to the sort.<br />
• End input of records and start the sort.<br />
• Retrieve sorted records from the sort.<br />
• Close the sort before all records are retrieved.<br />
From a UCS C program, you can perform these sort functions by using the UCS C sort<br />
linkages. Descriptions of the SORT subroutines UCS C sort program linkages follow.<br />
8.4.1. UCS C <strong>Sort</strong> Open Linkage<br />
The sort open linkage initializes the SORT subroutines for the requested <strong>Sort</strong> operation.<br />
The sort open linkage must be the first linkage to the SORT subroutines for every sort<br />
operation and can be called only once per sort operation.<br />
Format<br />
SRTOPEN(&result_status, &dbank_address, ¶meter_table);<br />
Required Input<br />
result_status<br />
is the address of a one-word storage area that will contain the status returned by the<br />
SORT subroutines (see 8.2.1).<br />
dbank_address<br />
is the address of a one-word storage area that will contain a value that uniquely<br />
identifies the newly opened sort operation (see 8.2.2).<br />
parameter_table<br />
is the address of a storage area that contains the parameter table that is used to<br />
define the sort operation (see 8.2.3).<br />
Exit Conditions<br />
The storage area associated with result_status contains the status returned by the SORT<br />
subroutines.<br />
The storage area associated with dbank_address contains a value that uniquely identifies<br />
the sort operation. On subsequent calls to the SORT subroutines, this value is used to<br />
identify this sort operation.<br />
8–14 7831 0687–010
8.4.2. UCS C <strong>Sort</strong> Release Linkage<br />
SORT Subroutine Linkages for UCS C Programs<br />
The sort release linkage passes records to be sorted to the SORT subroutines. The UCS<br />
C SORT Release Linkage allows either a single record or a buffer of records to be passed<br />
to the SORT subroutines.<br />
Format<br />
SRTRELEASE(&result_status, &dbank_address, &record_information_packet,<br />
&record_address);<br />
Required Input<br />
result_status<br />
is the address of a 1-word storage area that contains the status returned by the<br />
SORT subroutines (see 8.2.1).<br />
dbank_address<br />
is the address of a 1-word storage area that contains the value assigned during the<br />
sort open phase, which uniquely identifies the sort operation (see 8.2.2).<br />
record_information_packet<br />
provides information about the data located at the record_address parameter (see<br />
8.2.4 and Table 8–5 for the required field definition).<br />
record_address<br />
is the address of the record or record buffer being passed to the SORT subroutines<br />
(see 8.2.5).<br />
Table 8–5. <strong>Sort</strong> Release Record Information Packet Input<br />
Field Field Purpose Valid Contents<br />
version Identifies the version of the<br />
record information packet.<br />
buffer_gran Identifies the granularity of the<br />
buffer_length field.<br />
record_gran Identifies the granularity of the<br />
record_length field.<br />
type Identifies whether the data<br />
located at record_address is a<br />
single record or a buffer.<br />
1 or 2<br />
0 – sm_word<br />
1 – sm_6bit<br />
2 – sm_9bit or sm_char<br />
3 – sm_bit<br />
0 – sm_word<br />
1 – sm_6bit<br />
2 – sm_9bit or sm_char<br />
3 – sm_bit<br />
0 – single record (sm_single_record)<br />
1– record buffer (sm_blocked_records)<br />
7831 0687–010 8–15
SORT Subroutine Linkages for UCS C Programs<br />
Table 8–5. <strong>Sort</strong> Release Record Information Packet Input<br />
Field Field Purpose Valid Contents<br />
subtype Identifies the format of data at<br />
record_address based upon the<br />
type field.<br />
record_length When the type field is<br />
sm_single_record, the length in<br />
terms of the record_gran field of<br />
the record at record_address.<br />
When the type field is<br />
sm_blocked_records and the<br />
subtype is sm_fixed_records, the<br />
length in terms of the record_gran<br />
field of each record in the record<br />
buffer. Otherwise, the field has<br />
no meaning.<br />
buffer_length When the type field is<br />
sm_blocked_records, the length<br />
in terms of the buffer_gran field<br />
of data contained in the record<br />
buffer at record_address.<br />
number_of_re<br />
cords<br />
If the type field is<br />
sm_blocked_records, this field<br />
states the number of records<br />
contained in the record buffer.<br />
This field is optional and overrides<br />
the buffer_length field.<br />
pad_word Defined only when the version<br />
field is 2. It defines the bit string<br />
that sort should use to pad<br />
records when required.<br />
Exit Conditions<br />
When the type field is sm_single_record the<br />
only valid value is:<br />
0 – sm_single_record<br />
When the type field is sm_blocked_records<br />
the valid values are:<br />
0 – sm_fixed_records<br />
1 – sm_variable1_records<br />
2 – sm_variable2_records<br />
1 to 07777777777 (2**30–1 =<br />
1,073,741,823)<br />
1 to 07777777777 (2**30–1 =<br />
1,073,741,823)<br />
0 to 07777777777 (2**30–1 =<br />
1,073,741,823)<br />
If 0, the buffer_length field must contain the<br />
length of data in the record buffer. If<br />
nonzero, the actual number of records in the<br />
record buffer and the buffer_length field<br />
must be set to a value where:<br />
length of data in buffer
SORT Subroutine Linkages for UCS C Programs<br />
Table 8–6. <strong>Sort</strong> Release Record Information Packet Exit Condition<br />
Field Return Value<br />
buffer_gran Identifies the granularity of the buffer_length field. This field may be<br />
changed from its input state.<br />
record_gran Identifies the granularity of the record_length field. This field may be<br />
changed from its input state.<br />
record_length When the type field is sm_single_record, this field is not changed from its<br />
input state. When the result_status indicates that not all records have<br />
been released from the buffer, the record_length field contains the offset<br />
in the record buffer where processing stopped. When all records have<br />
been released from the buffer, this field may be changed from its input<br />
state.<br />
buffer_length When the type field is sm_single_record, this field is not used. When the<br />
type field is sm_blocked_records, this field contains the length of the<br />
buffer that was not processed in terms of the buffer_gran field.<br />
number_of_records When the type field is sm_blocked_records and this field was nonzero<br />
upon calling the UCS C <strong>Sort</strong> Release Linkage, this field is set to the input<br />
value minus the number of records processed.<br />
Padding Situations<br />
When records are released to the SORT subroutines by the UCS C <strong>Sort</strong> Release Linkage,<br />
some records may require padding. If padding is required, the value contained in the<br />
pad_word field of the record information packet is used when the version field of the<br />
record information packet is 2. If the version field is 1, ASCII spaces are used to pad the<br />
record.<br />
The minimum length in bits of a record is the greater of 1 or the highest bit that contains<br />
a sort key. If a record is shorter than the minimum, the result_status parameter is set<br />
with a major severity and message_id field of 33847. Records greater than or equal to<br />
the minimum length and less than the maximum record length, as defined by the RSZ<br />
parameter, are padded to the maximum record length for a fixed length sort operation.<br />
The result_status parameter is set with a warning severity and a message_id of 10000 to<br />
indicate a record has been padded. No padding will occur for a variable length sort.<br />
Truncating Situations<br />
When records are released to the SORT subroutines by the UCS C <strong>Sort</strong> Release Linkage<br />
some records are truncated to the maximum record length defined by the RSZ<br />
parameter. Truncation occurs when the length of the record is greater than the<br />
maximum record size. When truncation occurs the result_status parameter is set with a<br />
minor severity and a message_id of 10003 to indicate that a record was truncated.<br />
7831 0687–010 8–17
SORT Subroutine Linkages for UCS C Programs<br />
8.4.3. UCS C <strong>Sort</strong> <strong>Sort</strong> Linkage<br />
The sort linkage tells the SORT subroutines that all the records have been released to<br />
SORT through a release linkage.<br />
Format<br />
SRTSORT(&result_status, &dbank_address);<br />
Required Input<br />
result_status<br />
is the address of a 1-word storage area that contains the status returned by the<br />
SORT subroutines (see 8.2.1).<br />
dbank_address<br />
is the address of a 1-word storage area that contains the value assigned during the<br />
sort open phase, which uniquely identifies the sort operation (see 8.2.2).<br />
Exit Conditions<br />
The storage area associated with result_status contains the status returned by the SORT<br />
subroutines.<br />
8.4.4. UCS C <strong>Sort</strong> Return Linkage<br />
The sort return linkage retrieves the sorted records from the SORT subroutines. The<br />
UCS C SORT Return Linkage allows either a single record or a buffer of records to be<br />
returned from the SORT subroutines.<br />
Format:<br />
SRTRETURN(&result_status, &dbank_address, &record_information_packet,<br />
&record_address);<br />
Required Input<br />
result_status<br />
is the location where the SORT subroutines place the result of the call to the UCS C<br />
<strong>Sort</strong> Return Linkage (see 8.2.1).<br />
dbank_address<br />
is the address of a 1-word storage area that contains the value assigned during the<br />
sort open phase, which uniquely identifies the sort operation (see 8.2.2).<br />
record_information_packet<br />
provides information about the data located at the record_address parameter<br />
(see 8.2.4).<br />
8–18 7831 0687–010
ecord_address<br />
SORT Subroutine Linkages for UCS C Programs<br />
is the address of the record or record buffer where the SORT subroutines is to place<br />
the returned data (see 8.2.5).<br />
Table 8–7 lists the record information packet fields for input to the UCS C <strong>Sort</strong> Return<br />
Linkage.<br />
Table 8–7. <strong>Sort</strong> Return Record Information Packet Input<br />
Field Field Purpose Valid Contents<br />
version Identifies the version of the record<br />
information packet.<br />
buffer_gran Identifies the granularity of the<br />
buffer_length field.<br />
record_gran Identifies the granularity of the<br />
record_length field.<br />
type Identifies whether the caller is<br />
requesting a single record or a record<br />
buffer from the SORT subroutines.<br />
subtype Identifies the format of the data to be<br />
inserted by the SORT subroutines at<br />
record_address based upon the type<br />
field.<br />
record_length When the type field is sm_single_record,<br />
this field has no meaning on entry to the<br />
linkage.<br />
When the type field indicates a<br />
sm_blocked_records and the subtype is<br />
sm_fixed_records, the length in terms of<br />
the record_gran field of each record<br />
requested. Otherwise, this field has no<br />
meaning.<br />
buffer_length The maximum length in terms of the<br />
buffer_gran field of data that can be<br />
placed in the record_address parameter<br />
for either a sm_single_record or a<br />
sm_blocked_records interface.<br />
pad_word Defined only when the version field is 2.<br />
It defines the bit string that sort should<br />
use to pad records when required.<br />
1 or 2<br />
0 – sm_word<br />
1 – sm_6bit<br />
2 – sm_9bit or sm_char<br />
3 – sm_bit<br />
0 – sm_word<br />
1 – sm_6bit<br />
2 – sm_9bit or sm_char<br />
3 – sm_bit<br />
0 – single record (constant sm_single_record)<br />
1– record buffer (constant sm_blocked_records)<br />
When the type field is sm_single_ record the<br />
only valid value is 0.<br />
When the type field is sm_blocked_records, the<br />
valid values are:<br />
0 – sm_fixed_records<br />
1 – sm_variable1_ records<br />
2 – sm_variable2_records<br />
1 to 07777777777 (2**30–1 = 1,073,741,823)<br />
1 to 07777777777 (2**30–1 = 1,073,741,823)<br />
Any valid bit/character string.<br />
7831 0687–010 8–19
SORT Subroutine Linkages for UCS C Programs<br />
Exit Conditions<br />
The results returned by the UCS C <strong>Sort</strong> Return Linkage are returned in the result_status<br />
and the record_information_packet. The record information packet fields that contain<br />
information returned by the UCS C <strong>Sort</strong> Return Linkage are identified in Table 8–8. All<br />
other fields remain unchanged from their input state.<br />
Table 8–8. <strong>Sort</strong> Return Record Information Packet Exit Conditions<br />
Field Return Value<br />
buffer_gran Identifies the granularity of the buffer_length field. This field may be<br />
changed from its input state.<br />
record_gran Identifies the granularity of the record_length field. This field may be<br />
changed from its input state.<br />
record_length For any format of a sm_blocked_records interface, this field is not altered<br />
from its input state. For the sm_single_record interface, this field is set<br />
to the length in terms of the record_gran field of the record returned.<br />
buffer_length For any format of a sm_blocked_records interface, the buffer_length field<br />
contains the length of the data that was inserted into the buffer by the<br />
SORT subroutines in terms of the buffer_gran field. For the<br />
sm_single_record interface, this field is not altered from its input state.<br />
number_of_records For any format of a sm_blocked_records interface, this field will be set to<br />
the number of records inserted into the buffer by the SORT subroutines.<br />
For the sm_single_record interface, this field is not used.<br />
Padding Situations<br />
When records are returned from the SORT subroutines by the UCS C <strong>Sort</strong> Return<br />
Linkage, some records may require padding. If padding is required, the value contained<br />
in the pad_word field of the record information packet will be used when the version<br />
field of the record information packet is 2. If the version field is 1, ASCII spaces are used<br />
to pad the record. Padding occurs only when requesting a fixed records buffer format<br />
with a record_length field that is greater than the length of the record being returned by<br />
the SORT subroutines. Whenever padding occurs, the result_status parameter is set<br />
with a warning severity and a message_id of 10000 to indicate that a record was padded.<br />
Truncating Situations<br />
When records are returned from the SORT subroutines by the UCS C <strong>Sort</strong> Return<br />
Linkage, some records are truncated to the record_length field of the record information<br />
packet. Truncation occurs when requesting a fixed records buffer format where the<br />
length of the record being returned is greater than the record_length field of the record<br />
information packet. When truncation occurs, the result_status parameter is set with a<br />
minor severity and a message_id of 10003 to indicate that a record was truncated.<br />
When requesting a single record from a variable1 records buffer format or a variable2<br />
records buffer format, truncation never occurs. If the size of a storage area is insufficient<br />
to contain one record, a major result_status is returned.<br />
8–20 7831 0687–010
8.4.5. UCS C <strong>Sort</strong> Close Linkage<br />
SORT Subroutine Linkages for UCS C Programs<br />
The sort close linkages terminates the return record phase of a sort before all the<br />
records have been returned.<br />
Also, this linkage can be called after an error return from any other sort linkage to release<br />
data areas allocated by SORT subroutines that may still exist.<br />
Format<br />
SRTCLOSE(&result_status, &dbank_address);<br />
Required Input<br />
result_status<br />
is the address of a 1-word storage area that contains the status returned by the<br />
SORT subroutines (see 8.2.1).<br />
dbank_address<br />
is the address of a 1-word storage area that contains the value assigned during the<br />
sort open phase, which uniquely identifies the sort operation (see 8.2.2).<br />
Exit Conditions<br />
The storage area associated with result_status contains the status returned by the SORT<br />
subroutines.<br />
8.5. UCS C <strong>Merge</strong> Program Linkages<br />
The following four linkages are available to perform a merge operation:<br />
• Open the merge operation with the MRGOPEN linkage.<br />
• Release the first record of each input file to the merge operation with the<br />
MRGRELEASE linkage.<br />
• Request a record from and release the next input record to the merge operation with<br />
the MRGREQUEST linkage.<br />
• Close the merge operation with the MRGCLOSE linkage.<br />
From a UCS C program, you can perform these merge functions by using the UCS C<br />
<strong>Merge</strong> Linkages. Descriptions of the SORT subroutines UCS C <strong>Merge</strong> program linkages<br />
follow.<br />
8.5.1. UCS C <strong>Merge</strong> Open Linkage<br />
The merge open linkage initializes a merge operation. The linkage must be the first<br />
linkage to the SORT subroutines from every user merge program.<br />
Format<br />
MRGOPEN(&result_status, &dbank_address, ¶meter_table);<br />
7831 0687–010 8–21
SORT Subroutine Linkages for UCS C Programs<br />
Required Input<br />
result_status<br />
is the address of a 1-word storage area that contains the status returned by the<br />
SORT subroutines (see 8.2.1).<br />
dbank_address<br />
is the address of a 1-word storage area that contains a value that uniquely identifies<br />
the newly opened merge operation (see 8.2.2).<br />
parameter_table<br />
is the address of a storage area that contains the parameter table that is used to<br />
define the merge operation (see 8.2.3).<br />
Exit Conditions<br />
The storage area associated with result_status contains the status returned by the SORT<br />
subroutines.<br />
The storage area associated with dbank_address contains a value that uniquely identifies<br />
the merge operation. On subsequent calls to the SORT subroutines, this value is used<br />
to identify this merge operation.<br />
8.5.2. UCS C <strong>Merge</strong> Release Linkage<br />
The merge release linkage releases the first record of an input file to the SORT<br />
subroutines. This linkage must be entered once for each input file being merged.<br />
Format<br />
MRGRELEASE(&result_status, &dbank_address, &record_information_packet,<br />
&record_address);<br />
Required Input<br />
result_status<br />
is the address of a 1-word storage area that contains the status returned by the<br />
SORT subroutines (see 8.2.1).<br />
dbank_address<br />
is the address of a 1-word storage area that contains the value assigned during the<br />
merge open phase, which uniquely identifies the merge operation (see 8.2.2).<br />
record_information_packet<br />
is the address of a storage area that contains the record packet. The format of the<br />
record packet is described in 8.2.4. The required fields of the record packet for<br />
releasing records to a merge operation are described in the table that follows.<br />
8–22 7831 0687–010
SORT Subroutine Linkages for UCS C Programs<br />
Field Field Purpose Valid Contents<br />
version Identifies the version of<br />
the record information<br />
packet being used.<br />
record_gran Identifies the granularity<br />
of the record_length<br />
field.<br />
type Identifies how records<br />
are being released<br />
subtype A further identification of<br />
how the record is being<br />
released<br />
record_length The length in terms of<br />
the record_gran field of<br />
the record being passed<br />
at sm_record_address.<br />
file_id A user-defined value that<br />
uniquely identifies the<br />
input file of the record<br />
being released<br />
record_address<br />
1 or 2<br />
0 – sm_word<br />
1 – sm_6bit<br />
2 – sm_9bit or sm_char<br />
3 – sm_bit<br />
0 – single record (constant sm_single_record)<br />
0 – single record (constant sm_single_record)<br />
1 to 07777777777 (2**30 –1 = 1,073,741,823)<br />
Any unique value. A different value must be<br />
specified for each file being released.<br />
is the address of a storage area that contains the record being released to the merge<br />
operation (see 8.2.5).<br />
Exit Conditions<br />
The storage area associated with result_status contains the status returned by the SORT<br />
subroutines.<br />
8.5.3. UCS C <strong>Merge</strong> Request Linkage<br />
The merge request linkage requests a record from the SORT subroutines and also enters<br />
the next input record into the merge operation.<br />
Format<br />
MRGREQUEST(&result_status, &dbank_address, &record_information_packet,<br />
&in_record_address, &out_record_address);<br />
Required Input<br />
result_status<br />
is the address of a 1-word storage area that contains the status returned by the<br />
SORT subroutines (see 8.2.1).<br />
7831 0687–010 8–23
SORT Subroutine Linkages for UCS C Programs<br />
dbank_address<br />
is the address of a 1-word storage area that contains the value assigned during the<br />
merge open phase, which uniquely identifies the merge operation (see 8.2.2).<br />
record_information_packet<br />
is the address of a storage area that contains the record packet. The format of the<br />
record packet is described in 8.2.4. The required fields of the record information<br />
packet when requesting records from a merge operation are shown in the table that<br />
follows.<br />
Field Field Purpose Valid Contents<br />
version Identifies the version of<br />
the record information<br />
packet being used.<br />
buffer_gran Identifies the granularity<br />
of the buffer_length field.<br />
record_gran Identifies the granularity<br />
of the record_length field.<br />
type Identifies how record is<br />
being passed to the SORT<br />
subroutines and how the<br />
record should be returned.<br />
subtype A further identification of<br />
how the record is being<br />
passed.<br />
record_length The length in terms of the<br />
record_gran field of the<br />
record being passed at<br />
record_address.<br />
file_id A user-defined value that<br />
uniquely identifies the<br />
input file of the record<br />
being released<br />
buffer_length The length in terms of the<br />
buffer_gran field of the<br />
storage area<br />
out_record_address.<br />
1 or 2<br />
0 – sm_word<br />
1 – sm_6bit<br />
2 – sm_9bit or sm_char<br />
3 – sm_bit<br />
0 – sm_word<br />
1 – sm_6bit<br />
2 – sm_9bit or sm_char<br />
3 – sm_bit<br />
0 – single record (sm_single_record)<br />
0 – single record (sm_single_record)<br />
1 to 07777777777 (2**30 –1 = 1,073,741,823)<br />
The value must be the same as the value set<br />
into it on the last call to MRGREQUEST. For the<br />
first call to MRGREQUEST this field is ignored.<br />
1 to 07777777777 (2**30 –1 = 1,073,741,823)<br />
8–24 7831 0687–010
in_record_address<br />
SORT Subroutine Linkages for UCS C Programs<br />
is the address of a storage area that contains the record being released to the merge<br />
operation. The first time the merge request linkage is called, in_record_address is<br />
ignored. On all subsequent calls, the next input record and last record returned must<br />
be from the same input file. If all records from an input file have been released to<br />
the merge operation, in_record_address should be set to NULL to inform the SORT<br />
subroutines that the input file is exhausted.<br />
out_record_address<br />
is the address of a storage area where the SORT subroutines are to move the record<br />
being returned.<br />
Exit Conditions<br />
The storage area associated with result_status contains the status returned by the SORT<br />
subroutines. If all the records have been returned<br />
• The severity_code field of the result_status parameter contains the informational (2)<br />
code.<br />
• The message_id field of the result_status parameter contains the sm_eof (0777776)<br />
value.<br />
• The merge operation has been closed (that is, a call to the merge close linkage is not<br />
required).<br />
If all of the records have not been returned<br />
• The storage area associated with the out_record_address parameter contains the<br />
record returned by the SORT subroutines.<br />
• The file_id field of the record information packet contains the value that identifies the<br />
input file of the record being returned.<br />
• The record_gran field of the record information packet contains the granularity of the<br />
record_length field.<br />
• The record_length field of the record information packet contains the length of the<br />
record being returned in terms of the record_gran field.<br />
8.5.4. UCS C <strong>Merge</strong> Close Linkage<br />
The merge close linkage terminates a merge operation before all the records have been<br />
returned.<br />
You can also call this linkage after an error return from any merge linkage to release data<br />
areas allocated by the SORT subroutines that may still exist.<br />
Format<br />
MRGCLOSE(&result_status, &dbank_address);<br />
7831 0687–010 8–25
SORT Subroutine Linkages for UCS C Programs<br />
Required Input<br />
result_status<br />
is the address of a one-word storage area that contains the status returned by the<br />
SORT subroutines. (See 8.2.1.)<br />
dbank_address<br />
is the address of a one-word storage area that contains the value assigned during the<br />
merge open phase, which uniquely identifies the merge operation. (See 8.2.2.)<br />
Exit Conditions<br />
The storage area associated with result_status contains the status returned by the SORT<br />
subroutines.<br />
8–26 7831 0687–010
Section 9<br />
Configuration Parameters<br />
This section describes the <strong>Sort</strong>/<strong>Merge</strong> configuration parameters. The default value, the<br />
possible settings for the parameter, and the configuration menu where the parameter is<br />
defined are stated for each configuration parameter. The system administrator can<br />
change these parameters at the time of installation using the COMUS CONFIGURE<br />
command. Appendix E contains information about the <strong>Sort</strong>/<strong>Merge</strong> COMUS CONFIGURE<br />
process. The configuration parameters are found in the source element<br />
SYS$*SRT$PAR.SORTDEFAULTS/SORT22R2.<br />
9.1. AUTOMATIC Configuration Parameter<br />
Description<br />
AUTOMATIC indicates whether the SORT processor can perform an extended mode<br />
sort if it is not instructed to perform an extended mode sort. Instructions to perform an<br />
extended mode sort can be specified with the ESORT processor parameter, or the<br />
CORE parameter with a size greater than 210000.<br />
AUTOMATIC affects the SORT processor when a CORE parameter has not been<br />
specified and the SORT processor has not encountered any parameters or situations that<br />
prevent the selection of an extended mode sort.<br />
COMUS Configuration Menu<br />
CORE CONTROL<br />
Default Setting<br />
YES<br />
Possible Settings<br />
AUTOMATIC can be set to NO or YES.<br />
If AUTOMATIC is set to YES, the SORT processor can perform an extended mode sort<br />
even without explicit instructions, as long as no condition has been specified that would<br />
prevent the extended mode sort from occurring.<br />
If AUTOMATIC is set to NO, the SORT processor does not perform an extended mode<br />
sort unless an ESORT processor parameter is specified or a CORE processor parameter<br />
with a value greater than 210000 is specified.<br />
7831 0687–010 9–1
Configuration Parameters<br />
9.2. CCSLOCNUM Configuration Parameter<br />
Description<br />
CCSLOCNUM controls the setting of the locale number and code-type numbers for files<br />
created by the SORT processor.<br />
This parameter is overridden by the LOCALE and CODE-TYPE processor parameters.<br />
COMUS Configuration Menu<br />
INTERNATIONALIZATION (I18N) CONTROL<br />
Default Setting<br />
DEFAULT<br />
Possible Settings<br />
CCSLOCNUM can be set to PREI18N, DEFAULT, or INPUTDATA.<br />
If CCSLOCNUM is PREI18N, the SORT processor writes the same value in the codetype<br />
field or locale field as was written on SORT levels before <strong>Sort</strong>/<strong>Merge</strong> level 19R1.<br />
If CCSLOCNUM is DEFAULT, the SORT processor uses the DEFLOCALE configuration<br />
parameter to determine what is written to the file created by the SORT processor.<br />
If CCSLOCNUM is INPUTDATA, the SORT processor sets the code-type and locale fields<br />
based on the code-type and locale settings of the input files.<br />
9.3. CCSLOCNUMCHK Configuration Parameter<br />
Description<br />
CCSLOCNUMCHK indicates whether the SORT processor should perform code-type and<br />
locale conflict checking.<br />
COMUS Configuration Menu<br />
INTERNATIONALIZATION (I18N) CONTROL<br />
Default Setting<br />
ON<br />
Possible Settings<br />
CCSLOCNUMCHK can be set to ON or OFF.<br />
If CCSLOCNUMCHK is ON, the SORT processor checks for conflicts between the codetype<br />
and locale settings that are being used.<br />
If CCSLOCNUMCHK is OFF, the SORT processor does not check for conflicts between<br />
the code-type and locale settings.<br />
9–2 7831 0687–010
9.4. CONSOLE Configuration Parameter<br />
Description<br />
Configuration Parameters<br />
CONSOLE indicates whether or not the SORT processor and the SORT subroutines<br />
issue informational messages to the operator console. The CONSOLE configuration<br />
parameter is used unless a CONSOLE or DELCON SORT processor or SORT subroutines<br />
parameter is specified.<br />
CONSOLE affects the SORT processor and the SORT subroutines.<br />
COMUS Configuration Menu<br />
MESSAGE CONTROL<br />
Default Setting<br />
OFF<br />
Possible Settings<br />
CONSOLE can be set to OFF or ON.<br />
If CONSOLE is set to OFF, the SORT processor and SORT subroutines do not send<br />
informational messages to the operator console.<br />
If CONSOLE is set to ON, the SORT processor and SORT subroutines send informational<br />
messages to the operator console.<br />
9.5. DEFBMCORE Configuration Parameter<br />
Description<br />
DEFBMCORE indicates the maximum number of words of memory that can be used by<br />
the SORT processor for the core area when a basic mode sort is selected and no CORE<br />
parameter is specified. If the calculated input volume is greater than or equal to the<br />
DEFBMCORE value, the DEFBMCORE value is used as the core size. If the calculated<br />
input volume is less than DEFBMCORE, the calculated volume is used as the core size.<br />
This parameter affects the Basic Mode disk, M1, M1–M2, and tape sorts.<br />
COMUS Configuration Menu<br />
CORE CONTROL<br />
Default Setting<br />
210000<br />
Possible Settings<br />
DEFBMCORE can be set in the range 50000 to 210000.<br />
7831 0687–010 9–3
Configuration Parameters<br />
9.6. DEFDK Configuration Parameter<br />
Description<br />
DEFDK defines a default assign mnemonic used when the SORT processor assigns disk<br />
scratch files for a disk sort and an assign mnemonic is not specified in the DISKS SORT<br />
processor parameter.<br />
DEFDK affects the SORT processor parameter DISKS.<br />
COMUS Configuration Menu<br />
DEVICE DEFAULTS<br />
Default Setting<br />
F<br />
Possible Settings<br />
DEFDK can be set to any valid sector-formatted disk assign mnemonic.<br />
9.7. DEFLOCALE Configuration Parameter<br />
Description<br />
DEFLOCALE defines the default locale name to be used for internationalization<br />
operations. The locale name must contain from 1 to 16 characters. The locale name in<br />
the configuration element can consist of ASCII characters in the range 041 to 0176,<br />
except for the quotation mark (042), apostrophe (047), and slash (057) characters. Locale<br />
names are case-sensitive. Two locale names, _DEFAULT and _QUERY, are predefined<br />
and have special meanings.<br />
This configuration parameter can be overridden by the LOCALE SORT processor<br />
parameter.<br />
COMUS Configuration Menu<br />
INTERNATIONALIZATION (I18N) CONTROL<br />
Default Setting<br />
_QUERY<br />
Possible Settings<br />
DEFLOCALE can be set to any valid locale name, _QUERY, or _DEFAULT.<br />
If DEFLOCALE is _QUERY, the SORT processor uses the current locale of the program.<br />
The processor retrieves the locale name by calling the I18NLIB SETLOCALE routine with<br />
a requested locale of _QUERY.<br />
If DEFLOCALE is _DEFAULT, the SORT processor uses the system default locale. The<br />
processor retrieves the locale name by calling the I18NLIB SETLOCALE routine with a<br />
requested locale of _DEFAULT.<br />
9–4 7831 0687–010
9.8. DEFTP Configuration Parameter<br />
Description<br />
Configuration Parameters<br />
DEFTP defines the default assign mnemonic used when the SORT processor assigns<br />
tape scratch files for a tape sort and an assign mnemonic is not specified in the TAPES<br />
SORT processor parameter.<br />
DEFTP affects the SORT processor parameter TAPES.<br />
COMUS Configuration Menu<br />
DEVICE DEFAULTS<br />
Default Setting<br />
T<br />
Possible Settings<br />
DEFTP can be set to any valid tape assign mnemonic.<br />
9.9. DEFXA Configuration Parameter<br />
Description<br />
DEFXA defines the default assign mnemonic used when the SORT processor assigns<br />
the M1 scratch file for an M1 or M1–M2 sort and an assign mnemonic is not specified in<br />
the DRUM SORT processor parameter.<br />
DEFXA affects the SORT processor parameter DRUM.<br />
COMUS Configuration Menu<br />
DEVICE DEFAULTS<br />
Default Setting<br />
F40<br />
Possible Settings<br />
DEFXA can be set to any valid word-addressable drum, word-addressable mass-storage,<br />
sector-formatted mass-storage, or sector-formatted disk assign mnemonic.<br />
7831 0687–010 9–5
Configuration Parameters<br />
9.10. DEFXB Configuration Parameter<br />
Description<br />
DEFXB defines the default assign mnemonic used when the SORT processor assigns<br />
the M2 scratch file for an M1–M2 sort and an assign mnemonic is not specified in the<br />
FAST SORT processor parameter.<br />
DEFXB affects the SORT processor parameter FAST.<br />
COMUS Configuration Menu<br />
DEVICE DEFAULTS<br />
Default Setting<br />
F40<br />
Possible Settings<br />
DEFXB can be set to any valid sector-formatted mass-storage or sector-formatted disk<br />
assign mnemonic.<br />
9.11. LOG Configuration Parameter<br />
Description<br />
LOG indicates whether or not the SORT processor and the SORT subroutines send<br />
informational and statistical messages to the run log. The LOG configuration parameter<br />
is used unless a DELLOG or LOG SORT processor or SORT subroutines parameter is<br />
specified.<br />
LOG affects the SORT processor and the SORT subroutines.<br />
COMUS Configuration Menu<br />
MESSAGE CONTROL<br />
Default Setting<br />
ON<br />
Possible Settings<br />
LOG can be set to OFF or ON.<br />
If LOG is set to OFF, the SORT processor and SORT subroutines do not send<br />
informational and statistical messages to the run log.<br />
If LOG is set to ON, the SORT processor and SORT subroutines send informational and<br />
statistical messages to the run log.<br />
9–6 7831 0687–010
9.12. MAXIMUM Configuration Parameter<br />
Description<br />
Configuration Parameters<br />
MAXIMUM indicates the maximum number of words of memory used for an extended<br />
mode sort for the core area when the SORT subroutines allocate the memory. If the<br />
size of the requested core area is greater than MAXIMUM, the request is reduced to the<br />
value of the MAXIMUM configuration parameter.<br />
MAXIMUM affects the SORT processor and the SORT subroutines.<br />
COMUS Configuration Menu<br />
CORE CONTROL<br />
Default Setting<br />
1000000<br />
Possible Settings<br />
MAXIMUM can be in the range 262144 to 16777216. However, MAXIMUM must be<br />
greater than or equal to the value of the MINIMUM configuration parameter (see 9.14).<br />
9.13. MINIMUM Configuration Parameter<br />
Description<br />
MINIMUM indicates the minimum number of words of memory used for an extended<br />
mode sort for the core area when the SORT subroutines allocate the memory. If the<br />
size of the requested core area is less than MINIMUM, the request will be increased to<br />
the value of MINIMUM.<br />
MINIMUM affects the SORT processor and the SORT subroutines.<br />
COMUS Configuration Menu<br />
CORE CONTROL<br />
Default Setting<br />
262144<br />
Possible Settings<br />
MINIMUM can be in the range 262144 to 16777216. However, MINIMUM must be<br />
less than or equal to the value of the MAXIMUM configuration parameter (see 9.12).<br />
7831 0687–010 9–7
Configuration Parameters<br />
9.14. MSAMBLOCK Configuration Parameter<br />
Description<br />
MSAMBLOCK affects the block size used to create MSAM files for all SORT processor<br />
operations. The setting of this parameter can be reversed with a SORT processor<br />
runstream by the specification of the SORT processor FILEOUT local parameter<br />
REVMSAMBLK.<br />
COMUS Configuration Menu<br />
INPUT/OUTPUT FILE CONTROL<br />
Default Setting<br />
DEFAULTCALC<br />
Possible Settings<br />
MSAMBLOCK can be set to DEFAULTCALC or BLOCKPARAM.<br />
If MSAMBLOCK is set to DEFAULTCALC, the block size used by the SORT processor to<br />
create MSAM files will be the greater of<br />
• The block size specified by the BLOCK parameter associated with the FILEOUT<br />
parameter file rounded to the next prep size<br />
• The minimum block size calculation rounded to the next prep size<br />
The SORT processor uses the greater of the following formulas as the calculation of the<br />
minimum block size:<br />
or<br />
10 * (maximum record word length + number of MSKEYs with duplicates + 2) + 6<br />
200 * (maximum MSKEY word length + number of alternate MSKEYs + 1) + 8<br />
If MSAMBLOCK is set to BLOCKPARAM, the block size used by the SORT processor to<br />
create MSAM files is the block size specified by the BLOCK parameter associated with<br />
the FILEOUT parameter file rounded to the next prep size.<br />
If a BLOCK parameter is not applicable to the FILEOUT parameter, the block size used to<br />
read the first input file is substituted for the block size specified by the BLOCK<br />
parameter associated with the FILEOUT file.<br />
9.15. NUMRECWARN Configuration Parameter<br />
Description<br />
NUMRECWARN indicates whether or not the SORT processor issues a warning when<br />
the number of records specified by a local NUMREC parameter has been processed and<br />
more records exist in the input file controlled by the local NUMREC parameter. The<br />
SORT processor may also issue a warning when the number of records specified by a<br />
global NUMREC parameter has been processed and more records exist in the input file<br />
currently being processed or in an unopened input file.<br />
9–8 7831 0687–010
COMUS Configuration Menu<br />
INPUT/OUTPUT FILE CONTROL<br />
Default Setting<br />
NONE<br />
Possible Settings<br />
NUMRECWARN can be set to ALL, GLOBAL, LOCAL, or NONE.<br />
Configuration Parameters<br />
If NUMRECWARN is set to ALL, the SORT processor issues a warning when the<br />
number of records specified by a local NUMREC parameter has been processed and<br />
more records exist in the input file controlled by the local NUMREC parameter. If a<br />
global NUMREC parameter is specified, the SORT processor issues a warning when the<br />
number of records specified by the global NUMREC parameter has been processed and<br />
more records exist in the input file currently being processed or in an unopened input<br />
file.<br />
If NUMRECWARN is set to GLOBAL, the SORT processor issues a warning when the<br />
number of records specified by a global NUMREC parameter have been processed and<br />
more input records exist in the input file currently being processed or in an unopened<br />
input file. No warning is issued if the number of records specified by a local NUMREC<br />
parameter has been processed and more records exist in the input file controlled by the<br />
local NUMREC parameter.<br />
If NUMRECWARN is set to LOCAL, the SORT processor issues a warning when the<br />
number of records specified by a local NUMREC parameter has been processed and<br />
more input records exist in the input file controlled by the local NUMREC parameter. No<br />
warning is issued if the number of records specified by a global NUMREC parameter has<br />
been processed and more records exist in the input file currently being processed or in<br />
an unopened input file.<br />
If NUMRECWARN is set to NONE, the SORT processor does not issue a warning when<br />
the number of records specified by a local or a global NUMREC parameter has been<br />
processed and more input records exist.<br />
9.16. PRCERRCONS Configuration Parameter<br />
Description<br />
PRCERRCONS controls the issuance of nonsyntax SORT processor error messages to<br />
the operator console.<br />
COMUS Configuration Menu<br />
MESSAGE CONTROL<br />
Default Setting<br />
OFF<br />
7831 0687–010 9–9
Configuration Parameters<br />
Possible Settings<br />
PRCERRCONS can be set to OFF or ON.<br />
If PRCERRCONS is set to OFF, SORT processor nonsyntax error messages are not sent<br />
to the operator console. All SORT processor error messages are printed to the run's<br />
print file.<br />
If PRCERRCONS is set to ON, SORT processor nonsyntax error messages are sent to<br />
the operator console. Errors detected before the first processor parameter is requested<br />
and errors detected after the @EOF terminating the processor parameter input are sent<br />
to the system console. Errors detected after the first processor parameter is entered and<br />
before the @EOF terminating the processor parameter input are not sent to the system<br />
console. In addition, all error messages are printed to the run's print file.<br />
9.17. PROCESSING Configuration Parameter<br />
Description<br />
PROCESSING indicates whether SORT should process records on a word or<br />
nonword-oriented basis. This configuration parameter can be overridden by the<br />
SORT processor global parameter PROCESSING.<br />
The effects of the PROCESSING configuration parameter are undefined when you are<br />
creating a MODE ANSI or MSAM file. The PROCESSING configuration parameter has<br />
no meaning when you are creating a file with a MODE of ACOB, CARDS, CFH, or PRINT,<br />
as these files are word oriented.<br />
COMUS Configuration Menu<br />
INPUT/OUTPUT FILE CONTROL<br />
Default Setting<br />
NONWORD<br />
Possible Settings<br />
PROCESSING can be set to WORD or NONWORD.<br />
When PROCESSING is set to NONWORD, SORT processes (that is, releases and<br />
returns) records according to a nonword length and causes SORT to set an output files<br />
significant bits in the last word field to a value in the octal range 01-044. The primary<br />
purpose of this configuration parameter setting is to provide a means to enable this<br />
functionality without having to modify all existing runstreams.<br />
When PROCESSING is set to WORD, SORT processes (that is, releases and returns)<br />
records on a word-oriented basis, thus causing SORT to set an output files significant<br />
bits in the last word field to octal 044. The primary purpose of this configuration<br />
parameter setting is to disable the nonword processing functionality without having to<br />
modify all existing runstreams.<br />
9–10 7831 0687–010
Configuration Parameters<br />
9.18. PREPDEFAULT Configuration Parameter<br />
Description<br />
PREPDEFAULT defines the mass-storage prep size used by the SORT processor for<br />
mass-storage MODE ACOB or COBOL File Handler (CFH) files when the PREP<br />
processor parameter is not specified.<br />
PREPDEFAULT affects the SORT processor when reading and writing mass-storage<br />
MODE ACOB and CFH files.<br />
COMUS Configuration Menu<br />
INPUT/OUTPUT FILE CONTROL<br />
Default Setting<br />
28<br />
Possible Settings<br />
PREPDEFAULT can be set to the values 28, 56, or 112.<br />
9.19. RBSIZE Configuration Parameter<br />
Description<br />
RBSIZE defines for both the SORT processor and the SORT subroutines the record bank<br />
size for an internationalization sort. It is more of an internal parameter than most of the<br />
other configuration parameters. In an internationalization sort, the SORT subroutines can<br />
no longer translate the key in place within the record, because the transformation may<br />
exceed the original key size. To accommodate this, the SORT subroutines creates a<br />
new bank (the record bank), which will hold the original records released by the user.<br />
COMUS Configuration Menu<br />
INTERNATIONALIZATION (I18N) CONTROL<br />
Default Setting<br />
16777216<br />
Possible Settings<br />
The RBSIZE configuration parameter value must be in the range 4194304 to 16777216.<br />
7831 0687–010 9–11
Configuration Parameters<br />
9–12 7831 0687–010
Section 10<br />
<strong>Sort</strong> Types and Variable-Length <strong>Sort</strong>ing<br />
Considerations<br />
This section describes<br />
• The CORE parameter<br />
• The sort types<br />
• Variable-length sorting considerations<br />
10.1. The CORE Parameter<br />
The CORE parameter specifies the size of the core area to be allocated by the SORT<br />
processor. If the SORT subroutines are used and you do not specify a CORE parameter,<br />
the following control statement must be executed before the SORT subroutine open call:<br />
@ASG,T R$CORE.,F///n<br />
The SORT subroutines use the maximum assignment n to determine the size of the core<br />
area with the following computation:<br />
core size (in words) = 1000 * n<br />
The minimum value allowed for n is 1.<br />
See Section 2 for more information on core size and its effect on the selection of a basic<br />
mode or an extended mode main-storage-only sort.<br />
Note: The SORT processor does not recognize the R$CORE assignment.<br />
7831 0687–010 10–1
<strong>Sort</strong> Types and Variable-Length <strong>Sort</strong>ing Considerations<br />
10.2. <strong>Sort</strong> Types<br />
The following is a list of the <strong>Sort</strong> types:<br />
• Basic mode main storage only<br />
• Extended mode main storage only<br />
• Basic mode disk<br />
• Extended mode disk<br />
• One-level mass storage (M1)<br />
• Two-level mass storage (M1–M2)<br />
• Tape<br />
10.2.1. Basic Mode or Extended Mode Main-Storage-Only <strong>Sort</strong>s<br />
A main-storage-only sort is attempted if no scratch files are assigned or if the Y<br />
processor option is specified on the SORT processor call statement. The only facility<br />
required for this type of sort is main storage. Generally, main-storage-only sorts provide<br />
the best performance. See Section 2 for more information on whether a basic mode or<br />
an extended mode main-storage-only sort is executed. In basic mode or extended mode<br />
main-storage-only sorts, the following formulas should be used as guidelines when<br />
calculating the amount of main storage used:<br />
• Basic mode fixed-length records<br />
main storage = safety-factor * (record-size + 1) *<br />
(number-of-records) + key-overhead<br />
where key-overhead equals 6 + 10 * (number of words in each record that contains<br />
key fields).<br />
As an example of the key-overhead calculation, the key-overhead is 36 for<br />
'KEY',1,9,S,A.<br />
If the PRESERVE parameter is specified, add 1 to the record size.<br />
• Extended mode fixed-length records<br />
main storage = safety-factor * (record-size + 2) *<br />
(number-of-records) + key-overhead<br />
where key-overhead equals 9 + (9 * number of keys).<br />
If the PRESERVE parameter is specified, then add 1 to the number of keys and add 1<br />
to the record size.<br />
10–2 7831 0687–010
• Basic mode variable-length records<br />
<strong>Sort</strong> Types and Variable-Length <strong>Sort</strong>ing Considerations<br />
First, you must round the record-size up to a multiple of link-size.<br />
main storage = safety-factor * (record-size +<br />
(record-size/link-size) + 1) *<br />
(number-of-records) + key-overhead<br />
where key-overhead equals 8 + 14 * (number of words in each record that contains<br />
key fields).<br />
As an example of the key-overhead calculation, the key-overhead is 50 for<br />
'KEY',1,9,S,A.<br />
• Extended mode variable-length records<br />
First, you must round the record-size up to a multiple of link-size.<br />
main storage = safety-factor * (record-size +<br />
(record-size/link-size) + 2) *<br />
(number-of-records) + key-overhead<br />
where key-overhead equals 9 + (9* number-of-keys).<br />
If the PRESERVE parameter is specified, add 1 to the number of keys and add 1 to the<br />
record size.<br />
Use a safety factor between 1.1 and 1.3 for both the fixed-length and variable-length<br />
formulas.<br />
10.2.2. Basic Mode and Extended Mode Disk <strong>Sort</strong>s<br />
The assignment of three or more sector-formatted scratch files causes a disk sort to be<br />
performed. A maximum of 26 scratch files can be used for a basic mode or extended<br />
mode disk sort. Use the scratch file names XA through XZ.<br />
If your sort volume is too large for a main-storage-only sort, use a disk sort. Generally,<br />
an extended mode disk sort is more efficient than a basic mode disk sort. See Section 2<br />
to determine when a basic mode or extended mode disk sort is executed.<br />
7831 0687–010 10–3
<strong>Sort</strong> Types and Variable-Length <strong>Sort</strong>ing Considerations<br />
Disk sorts are not dependent on a bias factor and are the safest and most efficient way<br />
to sort. They use the sequential data for producing fewer number of strings. Providing<br />
that a sufficient number of scratch files exist, disk sorts always complete the sort<br />
operation regardless of the bias factor because they use an intermediate merge<br />
technique that reduces the number of strings. This technique makes the strings<br />
manageable so they can be handled in the main storage (core) provided. Consider the<br />
following when assigning the scratch files:<br />
• All scratch files should be assigned with the same maximum reserve.<br />
• The greater the number of scratch files assigned, the smaller the total amount of<br />
mass storage required.<br />
• Control the placement of the sort scratch files. Removable disk packs are the most<br />
desirable for sort scratch files. However, if removable disk packs are not available,<br />
use the logical or absolute placement field in the facility assignment statement to<br />
ensure that no two sort scratch files are allocated on the same physical disk unit.<br />
• For the best results, core size should be less than 25% of the size of a sort scratch<br />
file.<br />
• For an efficient determination of the internal merge power and block size, use the<br />
VOL and BIAS parameters through the SORT subroutines and use the RECORD and<br />
BIAS parameters through the SORT processor.<br />
• For a basic mode sort, the size of a scratch file must be greater than the size of the<br />
core. For an extended mode sort, the size of the scratch file must be at least 36<br />
tracks.<br />
To determine the size of each scratch file, use the following formula:<br />
file size = (sort-volume) * (safety-factor)/(total-number-of-files - 1)<br />
where safety-factor should be between 1.1 and 1.3.<br />
Note: If user compare code is present or if the key fields are not at the beginning of<br />
the records, then use the larger safety-factor value.<br />
Example<br />
For a sort involving 100,000 records at 100 words per record using six mass storage<br />
files, the size of each scratch file is determined as follows:<br />
• 100,000 records * 100 words per record equals 10,000,000 words of total sort-volume.<br />
• Apply the file size formula to get the following expression:<br />
file size = (1.3) * (10,000,000)/5 = 2,600,000 words per file<br />
• Convert the file size to tracks or positions<br />
2,600,000 / 1,792 = 1451 tracks per file or<br />
2,600,000 /114,688 = 23 positions per file<br />
10–4 7831 0687–010
<strong>Sort</strong> Types and Variable-Length <strong>Sort</strong>ing Considerations<br />
10.2.3. One-Level (M1) and Two-Level (M1–M2) Mass Storage<br />
<strong>Sort</strong>s<br />
If you cannot use a main-storage-only sort or a disk sort, then use either a one-level (M1)<br />
or two-level (M1–M2) mass storage sort.<br />
A one-level mass storage sort assigns one mass storage scratch file only. In a two-level<br />
mass storage sort, the smaller file assigned is always used by the SORT subroutines as<br />
file M1, and the larger file is file M2. The M1 file can be assigned to a word-addressable<br />
drum device, a sector-formatted mass storage device, or a disk storage device. The M2<br />
file can be assigned for a sector-formatted mass-storage device or a disk storage device.<br />
When using a two-level mass storage sort, assign the M1 file to the faster device.<br />
Use the guidelines in Table 10–1 and Table 10–2 when assigning M1 and M2 files and<br />
reserving main storage.<br />
Table 10–1. M1 Main Storage Assignment and Reservation <strong>Guide</strong>lines<br />
Mass Storage Storage <strong>Guide</strong>line<br />
M1 for fixed-length records M1 > sort-volume<br />
M1 for variable-length records M1 > (record-size + 1) * (number-of-records)<br />
Main storage Main storage < M1/3<br />
Table 10–2. M1–M2 Main Storage Assignment and Reservation<br />
<strong>Guide</strong>lines<br />
Mass Storage Assignment <strong>Guide</strong>line<br />
M2 for fixed-length records M2 > sort-volume<br />
M2 for variable-length records M2 > (record-size + 1) * (number-of-records)<br />
M1 M1 < M2/2<br />
Main storage Must be < M1/3 or a K3 error occurs<br />
If the parameter table contains a PRESERVE entry, then add 1 to the record size in the<br />
previous formulas.<br />
For a one-level mass storage sort, the M1 file should be assigned 10 to 15 percent larger<br />
than the sort-volume. If the size of main storage (core) is greater than M1/3, the M1<br />
mass storage file is not used and the sort becomes a basic mode main-storage-only sort.<br />
For a two-level mass storage sort, the M2 file should be assigned 10 to 15 percent larger<br />
than the sort volume. If M1 is greater than M2/2, the sort remains a two-level mass<br />
storage sort that uses only the M2/2 portion of M1.<br />
7831 0687–010 10–5
<strong>Sort</strong> Types and Variable-Length <strong>Sort</strong>ing Considerations<br />
10.2.4. Tape <strong>Sort</strong>s<br />
Assign the scratch files to tape devices only if the other sort types are not feasible. A<br />
minimum of 3 and a maximum of 24 tape units can be used. Use of the scratch file<br />
names XC through XZ is recommended.<br />
A tape sort can be performed in conjunction with a main storage, an M1, or an M1–M2<br />
sort. The following size restrictions apply to tape sorts according to the type of storage<br />
medium preceding the tape.<br />
Storage Medium Size Restriction<br />
Main storage to tape Main storage size < capacity of one tape reel<br />
M1 to tape M1 size < capacity of one tape reel<br />
M1–M2 to tape M2 size < capacity of one tape reel<br />
See Section 12 for tape sort considerations and console messages.<br />
10.3. Variable-Length Record Considerations<br />
The VRSZ, VRSZA, and VRSZW parameters inform the SORT subroutines of a<br />
variable-length record sort and the LINKSZ parameter informs the SORT processor of a<br />
variable-length record sort. In the absence of these parameters, a fixed-length record<br />
sort is assumed.<br />
Variable-length record sorting is not as efficient in the SORT subroutines as fixed-length<br />
record sorting. However, with some knowledge of the input data, the efficiency of a<br />
variable length record sort can be increased. During the main storage string generation<br />
phase of a sort, each record is broken into links. Each link has a control word and the<br />
link containing the last portion of the record is padded to the size of the link. You can<br />
adjust the link size so that a minimum amount of main storage is wasted on either<br />
padding or control words. Thus, more records fit into main storage and longer strings<br />
are generated, which causes greater efficiency in the merge phases of the sort.<br />
Please note that when performing an extended mode sort with records greater than 500<br />
words in length, the SORT subroutines may implicitly reduce the link size to improve<br />
efficiency and reduce main storage waste.<br />
In the absence of any information about the input file, the LINKSZ parameter should be<br />
as large as the smallest variable length record and close to a number of which the largest<br />
record is a multiple. The smallest variable length record must contain all the keys.<br />
Failure to ensure this condition results in error termination.<br />
10–6 7831 0687–010
<strong>Sort</strong> Types and Variable-Length <strong>Sort</strong>ing Considerations<br />
The following discussion shows how different link sizes can affect a sort. Assume that a<br />
data file consists of records varying in length from 30 words to 200 words and that there<br />
are 10,000 words of main storage available to the sort for the record area after control,<br />
key, generated code, and output buffers are allocated.<br />
• If the majority of the records are 80 to 100 words in length and very few of the<br />
records are less than 90 words, a link size of 100 would probably be most efficient<br />
as one link would hold most of the records and padding would be held to a<br />
minimum. If a link size of 5 were used, which would be possible only if all the keys<br />
are in the first five words, 20 control words would be generated for every 100 words<br />
of data.<br />
• If the majority of the records were 30 to 50 words in length, a link size of 100 would<br />
cause almost all records to be padded to 100 words. In this case, a link size of 50<br />
would probably be most efficient.<br />
• If the majority of records are 130 to 150 words in length, a link size of 100 would be<br />
very inefficient. The second link would contain at least as many pad words as actual<br />
data. A link size of 150 would be more efficient than a link size of 100, but<br />
depending upon the number of records less than 100 words, a link size of 50 words<br />
might be most efficient. With a link size of 50, only three control words are<br />
generated for most records and padding could be held to a minimum.<br />
Take into account control words and padding caused by the link size when calculating<br />
main storage requirements if a main-storage-only sort is to be attempted. Refer to<br />
10.2.1.<br />
7831 0687–010 10–7
<strong>Sort</strong> Types and Variable-Length <strong>Sort</strong>ing Considerations<br />
10–8 7831 0687–010
Section 11<br />
Key Field Translation<br />
This section explains how each key type is translated and describes the result of the key<br />
field translation for either a basic mode or an extended mode sort.<br />
11.1. Using MASM Compare Instructions<br />
The MASM compare instructions compare the words in two key fields. To make the<br />
MASM compare instructions work with any of the key types that the <strong>Sort</strong>/<strong>Merge</strong> product<br />
allows, some of the key fields need to be translated. <strong>Sort</strong>/<strong>Merge</strong> uses the following<br />
compare instructions.<br />
If you are performing ... Then the MASM compare instructions ...<br />
A basic mode sort TG, TE, and TLE compare the key fields<br />
An extended mode sort BIC and BICL compare the key fields<br />
Any key fields that need translation are translated when your program releases the<br />
record to SORT subroutines. The key fields are returned to their original form before the<br />
SORT subroutines pass the sorted records back to your program, except where noted.<br />
Note: For all key types, bit positions in a word are numbered from 1 to 36 from most<br />
significant to least significant.<br />
7831 0687–010 11–1
Key Field Translation<br />
11.2. <strong>Sort</strong>/<strong>Merge</strong> Key Fields<br />
This subsection describes each <strong>Sort</strong>/<strong>Merge</strong> key field and the method used for translating<br />
the key field. The key field formats in Table 11–1 are included.<br />
Table 11–1. <strong>Sort</strong>/<strong>Merge</strong> Key Field Translation<br />
Key Field Translation<br />
A Fieldata alphanumeric format.<br />
B OS 2200 signed binary format.<br />
D Fieldata sign-leading separate-decimal format.<br />
DATE ASCII alphanumeric date leading 18-bit year format.<br />
G Fieldata sign-trailing separate-decimal format.<br />
I International character set format.<br />
J Packed decimal format.<br />
L Fieldata sign-leading overpunch format.<br />
M IBM signed binary format.<br />
P Fieldata sign-trailing overpunch format.<br />
Q ASCII sign-trailing overpunch format.<br />
R ASCII sign-leading separate-decimal format.<br />
S ASCII alphanumeric format.<br />
T ASCII sign-trailing separate-decimal format.<br />
U Unsigned binary format.<br />
V ASCII sign-leading overpunch format.<br />
11.2.1. A - Fieldata Alphanumeric Format<br />
Description<br />
The key field contains alphanumeric characters 6 bits in length and sorted as unsigned<br />
binary numbers.<br />
To change the sorting order, create a Fieldata collating sequence table. The<br />
alphanumeric key field must start at a character boundary. Possible start bits for this key<br />
are 1, 7, 13, 19, 25, or 31.<br />
11–2 7831 0687–010
Translation Method<br />
Key Field Translation<br />
The following describes the result of the key field translation for both a basic mode and<br />
an extended mode sort:<br />
• If you specify an alternate collating sequence, the characters are translated to the<br />
ordinal in the sequence.<br />
• If you do not specify an alternate collating sequence, no translation occurs.<br />
11.2.2. B - OS 2200 Signed Binary Format<br />
Description<br />
The key field contains a number in OS 2200 fixed-point or single-precision floating-point<br />
notation.<br />
• A positive number is denoted by a 0 in the leftmost bit position with the magnitude<br />
in binary notation in the remaining bit positions.<br />
• A negative number is represented by a 1 in the leftmost bit position and the<br />
complement of the binary representation of a positive number of the same<br />
magnitude in the remaining bit positions.<br />
Translation Method<br />
If you are performing a basic mode sort, no translation occurs.<br />
If you are performing an extended mode sort, the sign bit is complemented and the<br />
remaining bit positions are left unchanged.<br />
11.2.3. D - Fieldata Sign-Leading Separate-Decimal Format<br />
Description<br />
The key field contains a signed number represented in Fieldata characters.<br />
• The leftmost character of the field is the sign.<br />
− For negative numbers, the character must be a Fieldata minus (-)<br />
− For positive numbers, the character should be a Fieldata space or a Fieldata plus<br />
(+).<br />
− Any character other than a Fieldata minus (-) as the leftmost character is<br />
assumed to represent a positive number.<br />
• The remaining characters can be any of the Fieldata integers, 0 through 9.<br />
• Possible start bits for this key are 1, 7, 13, 19, 25, or 31.<br />
7831 0687–010 11–3
Key Field Translation<br />
Translation Method<br />
The following describes the key field translation method for both a basic mode and an<br />
extended mode sort:<br />
• If the value of the key is positive, no translation occurs.<br />
• If the value of the key is negative, the entire key, excluding the sign character, is<br />
complemented.<br />
11.2.4. DATE - ASCII Alphanumeric Date Leading 18-Bit Year<br />
Format<br />
Description<br />
The key field contains an ASCII alphanumeric date where the first 18 bits represent a 2digit<br />
year. Each 9-bit field in the year portion of the key must be one of the ASCII<br />
characters 0 to 9.<br />
Possible start bits for this key are 1, 10, 19, or 28.<br />
Translation Method<br />
For a basic mode and an extended mode sort, replace the first 18 bits of the key field by<br />
the least significant 18 bits of the following calculation: (first 18 bits of key field +<br />
01000000) - (18-bit representation of the DEFYEAR parameter value).<br />
For example, assume that DEFYEAR=28 and that KEY=1,2,DATE,A. Table 11–2 shows<br />
the steps of the key field translation for key values of 96 and 02.<br />
First 18 Bits<br />
of the Key<br />
Field, in<br />
Decimal<br />
Table 11–2. Example of Steps in Key Field Translation<br />
First 18 Bits<br />
of the Key<br />
Field, in<br />
Octal<br />
First 18 Bits<br />
of the Key<br />
Field +<br />
01000000, in<br />
Octal<br />
DEFYEAR<br />
Value, in<br />
Octal<br />
Arithmetic<br />
Difference, in<br />
Octal<br />
Least<br />
Significant 18<br />
Bits of the<br />
Translated Key<br />
Field,<br />
in Octal<br />
96 071066 01071066 062070 01006776 006776<br />
02 060062 01060062 062070 0775772 775772<br />
To restore the translated portion of the key field, replace the first 18 bits of the key field<br />
by the least significant 18 bits of the following calculation: (first 18 bits of key field) +<br />
(18-bit representation of the DEFYEAR parameter value)<br />
For example, using the translated key fields described above for the key values 96 and<br />
02, Table 11–3 shows the steps in restoring the key field.<br />
11–4 7831 0687–010
Key Field Translation<br />
Table 11–3. Example of Steps in Restoring Translated Key Fields<br />
First 18 Bits of<br />
the Translated<br />
Key Field,<br />
in Octal<br />
DEFYEAR Value,<br />
in Octal<br />
Arithmetic Sum,<br />
in Octal<br />
Least<br />
Significant 18<br />
Bits of the<br />
Restored Key<br />
Field, in Octal<br />
First 18 Bits of<br />
the Restored<br />
Key Field, in<br />
Decimal<br />
006776 062070 071066 071066 96<br />
775772 062070 01060062 060062 02<br />
No translation occurs for the remainder of the key which is considered as unsigned<br />
binary (that is, a U key).<br />
11.2.5. G - Fieldata Sign-Trailing Separate-Decimal Format<br />
Description<br />
The key field contains a signed number represented in Fieldata characters:<br />
• The rightmost character of the field is the sign.<br />
− For negative numbers, the character must be a Fieldata minus (-).<br />
− For positive numbers, the character should be a Fieldata space or a Fieldata plus<br />
(+).<br />
− Any character other than a Fieldata minus (-) as the rightmost character is<br />
assumed to represent a positive number.<br />
• The remaining characters can be any of the Fieldata integers 0 through 9.<br />
• Possible start bits for this key are 1, 7, 13, 19, 25, or 31.<br />
Translation Method<br />
The following describes the result of the key field translation for both a basic mode and<br />
an extended mode sort:<br />
• If the value of the key is positive, no translation occurs.<br />
• If the value of the key is negative, the entire key, excluding the sign character, is<br />
complemented.<br />
11.2.6. I - International Character Set Format<br />
Description<br />
The key field is in international characters. The collating sequence of this key field is<br />
determined by the locale currently in force or the locale specified by the LOCALE<br />
parameter. Depending on the specification of the subtype associated with this key field,<br />
trailing spaces within the key field are either ignored or included in the translation<br />
process. The inclusion of trailing spaces can affect the order sequence of the fields. An<br />
I key can only be specified for an extended mode sort or merge operation.<br />
7831 0687–010 11–5
Key Field Translation<br />
Translation Method<br />
The key field is translated into a binary-comparable format by the I18NLIB<br />
string_transform service routine.<br />
11.2.7. J - Packed Decimal Format<br />
Description<br />
The key is made up of quarter-word bytes. The leftmost bit of each byte is a slack bit<br />
and is not used. All slack bits are cleared.<br />
The remaining eight bits are used to represent two 4-bit decimal digits:<br />
• The rightmost byte consists of one slack bit and<br />
− One 4-bit decimal digit<br />
− One 4-bit sign field<br />
• The positive sign values are<br />
− Decimal: 0, 2, 4, 8, 10, 12, 14, and 15<br />
− Binary: 0000, 0010, 0100, 1000, 1010, 1100, 1110, and 1111<br />
• The negative sign values are<br />
− Decimal: 1, 3, 5, 7, 9, 11, and 13<br />
− Binary: 0001, 0011, 0101, 0111, 1001, 1011, and 1101<br />
• The number of bits in the key length must be a multiple of 9:<br />
− Calculate the start character field (sc) or character position field (char-pos) as the<br />
starting byte.<br />
− Use the number of characters field (nc) to specify the number of quarter-word<br />
bytes.<br />
Possible start bits for this key are 1, 10, 19, or 28.<br />
Translation Method<br />
For a basic mode sort, if the last four bits of the key represent a negative number, the<br />
entire key is complemented.<br />
For an extended mode sort, the leftmost bit is complemented. If the last four bits of the<br />
key represent a negative number, the key, excluding the four sign bits, is<br />
complemented.<br />
11–6 7831 0687–010
11.2.8. L - Fieldata Sign-Leading Overpunch Format<br />
Description<br />
Key Field Translation<br />
The key field contains a decimal number represented in Fieldata characters. If present,<br />
the sign is represented by an overpunch character in the leftmost Fieldata character<br />
position. The overpunch character is restored only for negative representations. If the<br />
key field contains incompatible (illegal) characters, the results from the sort are<br />
undefined and the field may be altered and not restored to its initial state.<br />
Possible start bits for this key are 1, 7, 13, 19, 25, or 31.<br />
Translation Method<br />
For a basic mode sort, the overpunch character is replaced with its appropriate numeric<br />
representation.<br />
For an extended mode sort, the overpunch character is replaced with its appropriate<br />
numeric representation. If the value of the key is negative, the key is complemented.<br />
See the ASCII COBOL <strong>Programming</strong> Reference Manual for additional information on<br />
overpunch characters.<br />
11.2.9. M - IBM Signed Binary Format<br />
Description<br />
The key field contains a number in the IBM 7090 fixed-point binary notation.<br />
• The leftmost bit is the sign bit, where<br />
− 0 indicates a positive number<br />
− 1 indicates a negative number<br />
• The remaining bit positions contain the magnitude of the number in binary notation.<br />
Translation Method<br />
The following describes the result of the key field translation for both a basic mode and<br />
an extended mode sort:<br />
• If the value of the key is positive, the leftmost bit is complemented.<br />
• If the value of the key is negative, the entire key is complemented.<br />
11.2.10. P - Fieldata Sign-Trailing Overpunch Format<br />
Description<br />
The key field contains a decimal number represented in Fieldata characters. If present,<br />
the sign is represented by an overpunch character in the rightmost Fieldata character<br />
position. The overpunch character is restored only for negative representations. If the<br />
key field contains incompatible (illegal) characters, the results from the sort are<br />
undefined and the field may be altered and not restored to its initial state.<br />
Possible start bits for this key are 1, 7, 13, 19, 25, or 31.<br />
7831 0687–010 11–7
Key Field Translation<br />
Translation Method<br />
For a basic mode sort, the overpunch character is replaced with its appropriate numeric<br />
representation.<br />
For an extended mode sort, the overpunch character is replaced with its appropriate<br />
numeric representation. If the value of the key is negative, the key is complemented.<br />
See the ASCII COBOL <strong>Programming</strong> Reference Manual for additional information on<br />
overpunch characters.<br />
11.2.11. Q - ASCII Sign-Trailing Overpunch Format<br />
Description<br />
The key field contains a decimal number represented in ASCII characters. If present, the<br />
sign is represented by an overpunch in the rightmost character position. The overpunch<br />
character is restored only for negative representations. If the key field contains<br />
incompatible (illegal) characters, the results from the sort are undefined and the field<br />
may be altered and not restored to its initial state.<br />
Possible start bits for this key are 1, 10, 19, or 28.<br />
Translation Method<br />
For a basic mode sort, the overpunch character is replaced with its appropriate numeric<br />
representation.<br />
For an extended mode sort, the overpunch character is replaced with its appropriate<br />
numeric representation. If the value of the key is negative, the key is complemented.<br />
See the ASCII COBOL <strong>Programming</strong> Reference Manual for additional information on<br />
overpunch characters.<br />
11.2.12. R - ASCII Sign-Leading Separate-Decimal Format<br />
Description<br />
The key field contains a signed number represented in ASCII characters.<br />
• The leftmost character of the field is the sign.<br />
− For negative numbers, the character must be an ASCII minus (-).<br />
− For positive numbers, the character should be an ASCII space or an ASCII plus<br />
(+).<br />
− Any character other than an ASCII minus (-) as the leftmost character is assumed<br />
to represent a positive number.<br />
• The remaining characters can be any of the ASCII integers, 0 through 9.<br />
• Possible start bits for this key are 1, 10, 19, or 28.<br />
11–8 7831 0687–010
Translation Method<br />
Key Field Translation<br />
For a basic mode sort, if the key field has an ASCII minus sign as the leftmost character,<br />
the entire key field is complemented. If the key field has an ASCII plus sign as the<br />
leftmost character, the leftmost character is translated to an ASCII space before<br />
returning to the user.<br />
For an extended mode sort, the leftmost bit is complemented. If the value of the key is<br />
negative, the key, excluding the sign character, is complemented.<br />
11.2.13. S - ASCII Alphanumeric Format<br />
Description<br />
The key field is in ASCII characters. If you desire a format other than a normal ASCII<br />
order, one of the various sequence parameters for this key must be used.<br />
Possible start bits for this key are 1, 10, 19, or 28.<br />
Translation Method<br />
The following describes the result of the key field translation for both a basic mode and<br />
an extended mode sort:<br />
• If you specify an alternate collating sequence, the characters are translated to the<br />
ordinal in the sequence. Depending on the translation table specified, the key field is<br />
translated in 7 or 8 bit fields.<br />
• If the character exceeds a 7 bit field ( greater than 0177) or an 8 bit field (greater than<br />
0377), no translation occurs.<br />
If you do not specify an alternate collating sequence, no translation occurs.<br />
11.2.14. T - ASCII Sign-Trailing Separate-Decimal Format<br />
Description<br />
The key field contains a signed number represented in ASCII characters.<br />
• The rightmost character of the field is the sign.<br />
− For negative numbers, the character must be an ASCII minus (-).<br />
− For positive numbers, the character should be an ASCII space or an ASCII plus<br />
(+).<br />
− Any character other than an ASCII minus as the rightmost character is assumed<br />
to represent a positive number.<br />
• The remaining characters can be any of the ASCII integers 0 through 9.<br />
Possible start bits for this key are 1, 10, 19, or 28.<br />
7831 0687–010 11–9
Key Field Translation<br />
Translation Method<br />
For a basic mode sort, if the key value of the field is negative, the entire key field is<br />
complemented.<br />
For an extended mode sort, the leftmost bit is complemented. If the value of the key is<br />
negative, the key, excluding the sign character, is complemented.<br />
11.2.15. U - Unsigned Binary Format<br />
Description<br />
The key field contains the magnitude of a number in unsigned binary notation.<br />
Translation Method<br />
For a basic mode sort, the leftmost bit is complemented during translation.<br />
For an extended mode sort, no translation occurs.<br />
11.2.16. V - ASCII Sign-Leading Overpunch Format<br />
Description<br />
The key field contains a decimal number represented in ASCII characters. If present, the<br />
sign is represented by an overpunch character in the leftmost ASCII character position.<br />
The overpunch is restored only for negative representations. If the key field contains<br />
incompatible (illegal) characters, the results from the sort are undefined and the field<br />
may be altered and not restored to its initial state.<br />
Possible start bits for this key are 1, 10, 19, or 28.<br />
Translation Method<br />
For a basic mode sort, the overpunch character is replaced with its appropriate numeric<br />
representation.<br />
For an extended mode sort, the overpunch character is replaced with its appropriate<br />
numeric representation. If the value of the key is negative, the key is complemented.<br />
See the ASCII COBOL <strong>Programming</strong> Reference Manual for additional information on<br />
overpunch characters.<br />
11–10 7831 0687–010
Section 12<br />
Tape <strong>Sort</strong> Operations<br />
This section discusses special considerations for performing tape sorts. This section<br />
explains the following:<br />
• The two types of sort operations<br />
• The tape merge power calculations<br />
• The console messages that may appear when you perform a sort/merge operation<br />
from tape input<br />
12.1. SORT Subroutines Tape <strong>Sort</strong> Operations<br />
The SORT subroutines handles two types of tape sort operations<br />
• Automatic<br />
In an automatic tape sort, your program does not control the three phases of the sort<br />
(distribution, intermediate merge, and final merge) and all three phases are<br />
completed in a single SORT subroutines activation.<br />
• Nonautomatic<br />
In a nonautomatic tape sort, the three phases of the sort are controlled by the<br />
PARTA, PARTB, and PARTC parameters, and only one of these phases can be<br />
performed in any one SORT subroutines activation.<br />
12.1.1. Automatic Tape <strong>Sort</strong>s<br />
The SMRG parameter and a minimum of three tape units are required to perform an<br />
automatic tape sort. The following SORT subroutines linkages are also required (see<br />
6.2):<br />
• ROPN$<br />
• RREL$<br />
• RSORT$<br />
• RRET$<br />
In addition, three optional linkages can be used:<br />
• RENCY$<br />
• RINFO$<br />
• IPURI$<br />
7831 0687–010 12–1
Tape <strong>Sort</strong> Operations<br />
RINFO$ or IPURI$ are useful only when the tape sort has reached the final merge phase.<br />
This can be determined by the messages that the SORT subroutines print on the output<br />
listing. If the tape sort fails during final merge, the RINFO$ or IPURI$ information can be<br />
submitted to the SORT subroutines in another run with a CONTC parameter also being<br />
present.<br />
The SORT subroutines control dismounting, labeling, and remounting of tapes through<br />
operator console messages.<br />
12.1.2. Nonautomatic Tape <strong>Sort</strong>s<br />
Nonautomatic tape sorts are performed in the following three parts:<br />
• PARTA Distribution on tape<br />
• PARTB Intermediate merge on tape<br />
• PARTC Final tape merge to user program<br />
PARTA Tape <strong>Sort</strong><br />
A PARTA sort requires the PARTA parameter; the FINAL parameter can also be used.<br />
The required SORT subroutines linkages are ROPN$, RREL$, and RSORT$. The<br />
RENCY$ linkage can also be used. A PARTA sort is executed only once for a given<br />
volume of data. If the sort program is interrupted during PARTA, it can be continued by<br />
adding the CONTA parameter to the original PARTA program and reexecuting it. To recreate<br />
a tape produced during a PARTA sort, a REDOA parameter must be added to the<br />
original PARTA program and the program reexecuted.<br />
PARTB Tape <strong>Sort</strong><br />
A PARTB sort requires the PARTB parameter; the FINAL parameter can also be used.<br />
The only SORT subroutines linkage required is ROPN$. The PARTB sort must be<br />
executed until the number of tapes is reduced to the number that can be handled by a<br />
PARTC sort. If the sort program is interrupted during PARTB, it can be continued by<br />
adding the CONTB parameter to the original PARTB program and reexecuting it. To re–<br />
create a tape produced during a PARTB sort, a REDOB parameter must be added to the<br />
original PARTB program and the program must then be reexecuted.<br />
PARTC Tape <strong>Sort</strong><br />
A PARTC sort requires the PARTC parameter. The required SORT subroutines linkages<br />
are ROPN$ and RRET$. The RINFO$ or IPURI$ linkages can also be used. If a sort<br />
program is interrupted during PARTC, it can be continued, provided the RINFO$ linkage<br />
or the IPURI$ linkage was in the original PARTC program. If the RINFO$ linkage is used,<br />
the PARTC sort may be continued by adding the CONTC parameter to the original<br />
program and then reexecuting it. If the IPURI$ linkage is used, the program can be<br />
continued by submitting the restart deck through an @XQT,P of the original PARTC<br />
program.<br />
12–2 7831 0687–010
12.2. Tape <strong>Merge</strong> Power Calculations<br />
Tape <strong>Sort</strong> Operations<br />
The distribution phase of a tape sort produces one or more files, with each file consisting<br />
of one or more tape reels.<br />
The files created by the distribution phase are then used as the input for the<br />
intermediate merge phase. The intermediate merge phase consists of a partial merge<br />
operation (only if needed) followed by one or more successive merge operations.<br />
Nonautomatic Tape <strong>Sort</strong><br />
For a nonautomatic tape sort, you must calculate how many files must be merged by the<br />
first PARTB run and how many files must be merged on successive PARTB runs. These<br />
two values are termed the initial merge power and the primary merge power<br />
respectively. They are calculated as follows:<br />
Step 1: Let T = the number of files produced by the PARTA run<br />
and let N = the number of tape units assigned for<br />
sorting.<br />
Step 2: Let P = the primary merge power (the number of tape<br />
units that can be used for merging), then P = N - 1<br />
since one must be saved for merged output.<br />
Note: If P is greater than or equal to T, a PARTB run is not needed and a<br />
PARTC run should be done instead.<br />
Step 3: If IP = the initial merge power, then<br />
IP = mod (T-1, P-1) + 1.<br />
Note: mod(A,B) is the remainder obtained when A is divided by B.<br />
If the IP calculated is zero, then an initial merge is not needed and the first PARTB run<br />
should merge P files.<br />
Automatic Tape <strong>Sort</strong><br />
For an automatic tape sort, the initial merge power and the primary merge power are<br />
calculated internally.<br />
When only P files remain to be merged, they are used as the input to a PARTC run.<br />
7831 0687–010 12–3
Tape <strong>Sort</strong> Operations<br />
12.3. Tape <strong>Sort</strong> Console Messages<br />
There are three phases during the operation of a tape sort<br />
• Distribution phase<br />
• Intermediate merge phase<br />
• Final merge phase<br />
During the operation of the tape sort, messages display on the operator console. The<br />
messages are also written into the system log file so that, if the sort is interrupted or a<br />
tape cannot be read, the information is available for the CONTA, CONTB, CONTC,<br />
REDOA, and REDOB parameters.<br />
The following is a breakdown of the console messages and appropriate response for<br />
each phase.<br />
12.3.1. Distribution Phase<br />
There are four distinct console messages displayed during the distribution phase. These<br />
messages are issued when<br />
1. The label block for an output reel is written.<br />
2. An end-of-reel or end-of-file block is written on an output reel.<br />
3. All reels of an output file are written.<br />
4. All the input data is distributed to PARTA files.<br />
The following are the specific console messages and the responses required.<br />
The Label Block for an Output Reel Message<br />
This message is displayed after the label block for an output reel is written.<br />
Message<br />
cc/uu LABEL: REEL n of //Accc<br />
where<br />
cc/uu<br />
n<br />
is the channel/unit.<br />
is the 6-digit reel number.<br />
12–4 7831 0687–010
Accc<br />
is the label, with the following components<br />
//<br />
A<br />
ccc<br />
Response<br />
is the user label prefix.<br />
is the PARTA output.<br />
is the cycle number.<br />
Tape <strong>Sort</strong> Operations<br />
The operator should prepare an external label for the designated reel. No response is<br />
necessary for this message.<br />
End-of-Reel or End-of-File Block for an Output Reel Message<br />
This message is displayed after a tape unit swap following an end-of-reel or end-of-file<br />
block is written to an output reel.<br />
Message<br />
cc/uu DISMOUNT REEL n OF //Accc + BLANK<br />
Response<br />
The operator should dismount the output reel and mount a blank tape on the specified<br />
unit. A response of any one character is required for this message.<br />
All Reels of an Output File Are Written Message<br />
This message is displayed after all reels of an output file are written.<br />
Message<br />
CYC NO. ccc RECORDS NOS.yyyyyy - zzzzzz<br />
where<br />
ccc<br />
yyyyyy<br />
zzzzzz<br />
is the cycle number.<br />
is the first input record number on the file.<br />
is the last input record number on the file.<br />
7831 0687–010 12–5
Tape <strong>Sort</strong> Operations<br />
Response<br />
This message requires no response and is displayed for CONTA and REDOA purposes.<br />
End of Distribution Phase Message<br />
This message is displayed after all the input data is distributed to PARTA files:<br />
Message<br />
END PART A<br />
Response<br />
No operator response is necessary. If this is an automatic tape sort, a listing is displayed<br />
of the merge operations needed to complete the sort. In a nonautomatic tape sort, the<br />
sort either terminates or returns control to a FINAL address.<br />
12.3.2. Intermediate <strong>Merge</strong> Phase<br />
There are seven distinct console messages displayed during the intermediate merge<br />
phase. These messages are issued when<br />
1. An optional automatic tape sort is performed.<br />
2. The label block for each output reel is written.<br />
3. An input reel is requested.<br />
4. A label check is performed on the input reel just mounted.<br />
5. An end-of-reel or end-of-file block is detected on an input reel.<br />
6. An end-of-reel or end-of-file sentinel block is written on an output reel.<br />
7. All intermediate merge operations are performed on an automatic tape sort, or the<br />
single merge operation is performed on a nonautomatic sort.<br />
The following subschemas describe the console messages and the required responses.<br />
An Optional Automatic Tape <strong>Sort</strong> Is Performed Message<br />
If an automatic tape sort is being performed, the following message is displayed at the<br />
start of each merge operation:<br />
Message<br />
START MRG NO. ppp<br />
where ppp is the merge number of the merge operation to be performed.<br />
Response<br />
No operator response is necessary for this message.<br />
12–6 7831 0687–010
The Label Block for Each Output Reel Is Written Message<br />
Tape <strong>Sort</strong> Operations<br />
After the label block for each output reel is written, the following message is displayed:<br />
Message<br />
cc/uu LABEL: REEL n of //xmmm<br />
where<br />
cc/uu<br />
n<br />
is the channel/unit.<br />
is the reel number.<br />
//xmmm<br />
is the label, with the following components:<br />
//<br />
x<br />
mmm<br />
Response<br />
User label prefix<br />
<strong>Merge</strong> level (B–Z)<br />
<strong>Merge</strong> number within the level<br />
The operator attaches the external label on the designated reel, and this tape is now<br />
available for use if a CONTB is necessary. No response is required for this message.<br />
An Input Reel Is Requested Message<br />
Message<br />
An input reel is requested by the following message:<br />
cc/uu MOUNT REEL n of //xmmm<br />
where<br />
cc/uu<br />
n<br />
is the channel/unit.<br />
is the reel number.<br />
7831 0687–010 12–7
Tape <strong>Sort</strong> Operations<br />
//xmmm<br />
is the label, with the following components:<br />
//<br />
x<br />
mmm<br />
Response<br />
User label prefix<br />
<strong>Merge</strong> level (B–Z)<br />
<strong>Merge</strong> number within the level<br />
After the input reel is mounted, the message can be answered with any character.<br />
A Label Check Is Performed on the Input Reel Just Mounted Message<br />
A label check is performed on the input reel just mounted. If the label or reel number<br />
does not agree with the label or reel requested, the input reel is rewound with interlock<br />
and the following message is displayed:<br />
Message<br />
cc/uu LABEL ERROR: REEL n of //xmmm<br />
where<br />
cc/uu<br />
n<br />
is the channel/unit.<br />
is the reel number.<br />
//xmmm<br />
is the label, with the following components:<br />
//<br />
x<br />
mmm<br />
Response<br />
is the user label prefix<br />
is the merge level (B–Z)<br />
is the merge number within the level<br />
This message requires no response, and the message to mount the requested reel is<br />
repeated. The invalid input reel should be dismounted and the correct reel mounted.<br />
12–8 7831 0687–010
Tape <strong>Sort</strong> Operations<br />
An End-of-Reel or End-of-File Block Detected on an Input Reel<br />
Message<br />
When an end-of-reel or end-of-file block is detected on an input reel, the input reel is<br />
rewound with interlock and a tape unit swap is performed. The following message is<br />
displayed:<br />
Message<br />
cc/uu DISMOUNT REEL n of //xmmm<br />
where<br />
cc/uu<br />
n<br />
is the channel/unit.<br />
is the reel number.<br />
//xmmm<br />
is the label, with the following components:<br />
//<br />
x<br />
mmm<br />
Response<br />
is the user label prefix<br />
is the merge level (B–Z)<br />
is the merge number within the level<br />
The operator should dismount the designated reel. No response is required for this<br />
message.<br />
An End-of-Reel or End-of-File Sentinel Block Is Written on an Output<br />
Reel Message<br />
After an end-of-reel or end-of-file sentinel block is written on an output reel, the output<br />
reel is rewound with interblock, a tape unit swap is performed, and the following<br />
message is displayed:<br />
Message<br />
cc/uu DISMOUNT REEL n of //xmmm + MOUNT BLANK<br />
where<br />
cc/uu<br />
is the channel/unit.<br />
7831 0687–010 12–9
Tape <strong>Sort</strong> Operations<br />
n<br />
is the reel number.<br />
//xmmm<br />
is the label, with the following components:<br />
//<br />
x<br />
mmm<br />
Response<br />
is the user label prefix<br />
is the merge level (B–Z)<br />
is the merge number within the level<br />
The operator should dismount the output reel and mount a blank tape on the designated<br />
tape unit. This message can be answered with any character.<br />
End of Intermediate <strong>Merge</strong> Phase Message<br />
After all intermediate merge operations are performed on an automatic tape sort, or the<br />
single merge operation is performed on a nonautomatic sort, the following message is<br />
displayed:<br />
Message<br />
END PART B<br />
Response<br />
No response is required for this message.<br />
12.3.3. Final <strong>Merge</strong> Phase<br />
If the user program employs the IPURI$ linkage, the following message displays each<br />
time that information is punched:<br />
Message<br />
CONTC RERUN INFORMATION ccc CYCLE nnn CARDS<br />
where<br />
ccc<br />
nnn<br />
is the deck number.<br />
is the number of cards punched.<br />
12–10 7831 0687–010
Response<br />
Tape <strong>Sort</strong> Operations<br />
No response is required for this message. The operator should remove the cards from<br />
the card punch hopper and mark them with the cycle number.<br />
12.3.4. CONTA – CONTB – CONTC<br />
The messages displayed for these runs are the same as those displayed for the<br />
distribution, intermediate merge, and final merge phase of the tape sort.<br />
12.3.5. REDOA – REDOB<br />
After the requested tape reel is re-created, one of the following messages is displayed<br />
depending on the phase of the tape sort being executed:<br />
or<br />
END REDO A<br />
END REDO B<br />
At this time, the PARTA or PARTB reel is re-created and the next phase of the tape sort<br />
can be executed.<br />
7831 0687–010 12–11
Tape <strong>Sort</strong> Operations<br />
12–12 7831 0687–010
Appendix A<br />
Summary and Diagnostic Messages<br />
This appendix lists error messages that occur in the SORT processor (see A.1) and in the<br />
SORT subroutines (see A.2). It also lists the SORT subroutines summary messages<br />
written to the system log file at sort completion (see A.3).<br />
An error message with a number less than 10000 indicates that the error was detected<br />
by the SORT processor. An error message with a letter prefix or a number greater than<br />
9999 indicates that an error occurred in the SORT subroutines.<br />
Note: On all internal errors, hardware errors, and I/O errors, you should rerun the sort<br />
program. If the error persists, submit a UCF and provide the following information to the<br />
<strong>Support</strong> Center via RSS, FTP, or send on an unlabeled half-inch cartridge tape in COPY,G<br />
format:<br />
1. A PMD,AL after the error has occurred.<br />
2. The trail sheet showing all file assignments and console messages.<br />
3. If applicable, the SORT processor runstream.<br />
4. When possible, all input data files.<br />
5. A list of all SORT CHGs applied to this level of <strong>Sort</strong>/<strong>Merge</strong>.<br />
A.1. SORT Processor Error Messages<br />
A SORT processor error message is displayed on the user’s batch listing or at the<br />
demand terminal. The message can be preceded by a file name or parameter name and<br />
followed by a status message if appropriate.<br />
An error message that contains a letter prefix or a number greater than 9999 indicates<br />
that the error was detected by the SORT subroutines and not by the SORT processor.<br />
Error messages issued by the SORT subroutines are shown in A.2.<br />
SORT processor error messages have the following format:<br />
error message description<br />
where nn is the error message number less than 10,000.<br />
7831 0687–010 A–1
Summary and Diagnostic Messages<br />
The following are the SORT processor error messages, listed by error number, along<br />
with the error message text and a description of the cause of the error.<br />
Error<br />
Number<br />
0<br />
1<br />
SORT PROCESSOR INTERNAL ERROR<br />
Message Text and Description<br />
The SORT processor has detected an impossible situation. This error should<br />
not be issued and a UCF should be submitted to correct this situation.<br />
SORT PROCESSOR INITIAL LOAD ERROR<br />
The SORT processor cannot be loaded properly. The SORT processor was<br />
improperly mapped or improperly installed on your OS 2200 system.<br />
2 INVALID PARAMETER SPECIFIED<br />
The input line does not contain a valid SORT processor parameter. Recheck<br />
input.<br />
3 THE FILE CANNOT BE ASSIGNED<br />
The SORT processor cannot assign a temporary file. The filename of the file<br />
and the facility status received are printed with this error.<br />
4 THE FILE MUST BE ASSIGNED<br />
The SORT processor needs the input or output file for further processing.<br />
5 THE PARAMETER SPECIFIED IS NOT A VALID LOCAL PARAMETER<br />
The parameter cannot be used as a local parameter.<br />
6 PARAMETER CAUSES AN OPERATION OR PROCESSING CONFLICT<br />
The parameter specified causes conflicts with another parameter or SORT<br />
processor call option.<br />
7 INVALID PARAMETER SYNTAX SPECIFIED<br />
An improper syntax structure was detected.<br />
8 TOO MANY INPUT FILES<br />
A maximum of 24 input files may be used.<br />
9 DECIMAL TO OCTAL CONVERSION ERROR<br />
An attempt was made to convert a number on the previous entry which<br />
contained a nonnumeric character. This error can occur if the SORT processor<br />
is given an incorrect MODE. The default mode is ACOB.<br />
A–2 7831 0687–010
Error<br />
Number<br />
10 AN INPUT FILE IS REQUIRED<br />
Summary and Diagnostic Messages<br />
Message Text and Description<br />
All operations require at least one input file.<br />
11 AN OUTPUT FILE IS REQUIRED<br />
The operation specified must have an output file.<br />
12 KEY DEFINITION OR USER COMPARE CODE IS REQUIRED<br />
A sort or merge operation requires a key definition (KEY parameter) or user<br />
compare code (OWN parameter).<br />
13 THE PARAMETER SPECIFIED IS NOT A VALID GLOBAL PARAMETER<br />
The parameter on the previous entry may only be used as a local parameter.<br />
14 A BLOCK-SIZE IS REQUIRED FOR THIS FILE<br />
The input file specified must have a block size specified. It cannot be<br />
obtained from the label information on the file.<br />
15 THE ACTUAL BLOCK-SIZE DOES NOT MATCH SPECIFIED BLOCK-SIZE<br />
The user input and label information do not agree.<br />
16 THE ACTUAL RECORD-SIZE DOES NOT MATCH SPECIFIED RECORD-SIZE<br />
The user input and label information do not agree.<br />
17 A RECORD-SIZE IS REQUIRED FOR THIS FILE<br />
The record size for the file cannot be obtained from the label information.<br />
18 SAVE/HOLD TAPE OPTION USED IMPROPERLY<br />
A conflict within the parameters or SORT processor call options has been<br />
detected.<br />
19 AN INDEX KEY IS REQUIRED FOR OUTPUT<br />
The file cannot be created without the index key.<br />
7831 0687–010 A–3
Summary and Diagnostic Messages<br />
Error<br />
Number<br />
20 I/O ERROR DETECTED<br />
Message Text and Description<br />
A hardware I/O error was detected during processing. Resubmit the run.<br />
21 INVALID EQUIPMENT TYPE ASSIGNED<br />
The file cannot be processed with the device it is assigned to.<br />
22 THE FILE IS ALREADY OPEN<br />
The file is still being processed.<br />
23 THE FILE WAS NOT OPENED BEFORE I/O REQUEST<br />
The SORT processor has detected an impossible situation. If this error is<br />
issued, submit a UCF.<br />
24 THE BLOCK-SIZE SPECIFIED IS TOO LARGE<br />
The block size given cannot be used because it is too large.<br />
25 THE FILE IS LOCKED AND CANNOT BE OPENED<br />
The file cannot be processed through the SORT processor.<br />
26 INVALID FILE STRUCTURE<br />
The file internally does not correspond with the mode specified.<br />
27 INVALID DATA BLOCK STRUCTURE<br />
The file internally does not correspond with the mode specified.<br />
28 INVALID LABEL STRUCTURE<br />
The file internally does not correspond with the mode specified.<br />
29 THE FILE IS NOT AN SDF FILE<br />
The mode specified is incorrect.<br />
30 INVALID INDEX KEY OR RECORD NUMBER USED IN DIRECT ACCESS<br />
An internal RETRIEVE error has been detected. Data corruption has occurred<br />
in the pointers used to retrieve records from the tag file. The tag file has been<br />
either modified or destroyed since its creation.<br />
This error may also be issued when an attempt is made to write beyond the<br />
externally defined boundaries of the file.<br />
31 FILE OUTPUT OVERFLOW - TOO MANY RECORDS<br />
A larger file is required for output.<br />
A–4 7831 0687–010
Error<br />
Number<br />
Summary and Diagnostic Messages<br />
Message Text and Description<br />
32 I/O INHIBITED FOR THIS FILE - CANNOT ACCESS<br />
The file has keys or is read/write protected.<br />
33 I/O WAS ATTEMPTED PAST THE END-OF-FILE<br />
A bad I/O was performed. May indicate an internal error. Resubmit the run.<br />
34 FILE FORMAT SPECIFIED IS NOT THE ACTUAL FORMAT TYPE<br />
The ANSI record/block structure of the input file differs from the structure<br />
specified or implied.<br />
35 BLOCK-SIZE MUST BE A MULTIPLE OF RECORD-SIZE<br />
A proper blocking factor cannot be calculated.<br />
36 ILLEGAL TAPE FORMAT FOR AN ANSI FILE<br />
The tape being accessed is not an ANSI tape.<br />
37 INCORRECT DATA BLOCK COUNT<br />
A bad blocking factor was calculated.<br />
38 UNIT ASSIGNMENT INCONSISTENT WITH FILE MODE<br />
The file specified may not reside on the medium it is assigned to.<br />
39 ERROR ON TLBL$ REQUEST<br />
An 8-bit label cannot be processed.<br />
40 TOO MANY LEVELS OF INDEX FOR FILE SIZE<br />
A larger file is needed for output. Assign a larger output file and resubmit the<br />
run.<br />
41 SPECIFIED INDEX KEY INCONSISTENT WITH ACTUAL INDEX KEY<br />
The index key specified is not the originally created index key.<br />
42 ACTUAL FILE MODE INCONSISTENT WITH MODE SPECIFICATION<br />
The file mode does not match specifications.<br />
43 A TAG AND/OR RETRIEVE SORT REQUIRES ONE AND ONLY ONE INPUT FILE<br />
Only one mass storage input file may be used.<br />
44 INVALID INPUT FILE FOR A TAG AND/OR RETRIEVE SORT<br />
The input file must be ACOB, CFH, DSDF, ISAM, or MSAM.<br />
7831 0687–010 A–5
Summary and Diagnostic Messages<br />
Error<br />
Number<br />
Message Text and Description<br />
45 THE FILE CANNOT BE RELEASED FROM THE RUN<br />
A bad status was received when trying to @FREE a file. Data corruption has<br />
occurred in the CSF$ image generated by <strong>Sort</strong>/<strong>Merge</strong>. Rerun and check for<br />
random stores caused by user own code or hardware error.<br />
47 PREP FACTOR CONFLICT<br />
The mass storage prepping factor specified either in the PREP parameter or in<br />
the <strong>Sort</strong> PREPDEFAULT configuration parameter does not match the actual<br />
prepping factor for this file. This error may also be issued while processing an<br />
ACOB file assigned to mass storage when the LINKSZ parameter is specified.<br />
48 LABEL TYPE INVALID FOR THIS FILE MODE<br />
The labels specified are not available for this file.<br />
49 ATTEMPTED LABELED OUTPUT TO AN UNLABELED TAPE<br />
The tape must have a label skeleton.<br />
50 INTERNAL BLOCK-SIZE GREATER THAN SIZE READ<br />
An I/O operation has been truncated. Recalculate and resubmit.<br />
51 INCONSISTENT RECORD CONTROL WORD<br />
The record control word does not agree with actual record length.<br />
52 INVALID RETURN CODE FROM USER EXIT<br />
The return cannot be processed; it is undefined.<br />
53 USER EXIT REQUIRED FOR PROCESSING<br />
User own code cannot be found; processing is halted.<br />
54 ESTIMATE IS NOT ALLOWED WITH THIS OPERATION<br />
An estimation can be performed only on a sort operation.<br />
55 INDEX KEYS ARE OUT OF SEQUENCE OR DUPLICATED<br />
Either of these conditions causes the processing to halt.<br />
56 DATA TYPE INVALID FOR THE OUTPUT FILE MODE<br />
When the mode of the output file is ANSI, the data type associated with this<br />
operation must be ASCII or 9-bit. When the mode of the output file is CFH,<br />
the data type associated with this operation must be Fieldata or 6-bit.<br />
A–6 7831 0687–010
Error<br />
Number<br />
57 ERROR ON @CKPT REQUEST<br />
Summary and Diagnostic Messages<br />
Message Text and Description<br />
The CKPT operation cannot be completed. Check register A0 for the status<br />
returned by Checkpoint/Restart (CKRS), remedy the problem, and rerun.<br />
58 DUPLICATE INPUT FILENAMES NOT ALLOWED<br />
A file name may be used for input only once.<br />
59 SCRATCH FACILITY CONFLICT FOR DISK SORT<br />
DISKS may not be used with TAPES or FAST.<br />
60 MAXIMUM CORE LIMIT HAS BEEN REACHED<br />
A core only sort has been specified via the Y processor option. The SORT<br />
processor has determined that the memory required to successfully perform<br />
the sort is greater than the size specified in the CORE parameter or is greater<br />
than the maximum that the SORT processor can use based upon the SORT<br />
configuration parameters.<br />
61 VOLUME GREATER THAN SORT ASSIGNMENT LIMIT<br />
The SORT processor cannot assign facilities because of the volume.<br />
62 NO SCRATCH FACILITIES ASSIGNED BY SORT<br />
An error condition was encountered while assigning facilities. Examine file<br />
assign statements and resubmit.<br />
63 ESTIMATION TERMINATED<br />
An error condition was encountered while estimating. The estimation has<br />
been terminated due to the error previously printed.<br />
64 SORT VOLUME CANNOT BE DETERMINED<br />
ESTIMATE requires some volume specification.<br />
65 SORT RECORD-SIZE CANNOT BE DETERMINED<br />
ESTIMATE requires RSZ specification.<br />
66 INSUFFICIENT SCRATCH FACILITIES FOR ESTIMATION<br />
The facilities specified or assigned won’t handle the sort volume.<br />
67 WRITE ATTEMPTED ON INPUT FILE<br />
An internal sort error has occurred.<br />
68 READ ATTEMPTED ON OUTPUT FILE<br />
An internal sort error has occurred.<br />
7831 0687–010 A–7
Summary and Diagnostic Messages<br />
Error<br />
Number<br />
Message Text and Description<br />
69 INVALID KEY CONDITION ON WRITE, FILE CAN'T BE RESTORED<br />
An invalid key condition occurred when attempting to write a record. The file<br />
is corrupted and cannot be restored.<br />
70 RANDOM READ ATTEMPTED ON SEQUENTIAL FILE OR VICE VERSA<br />
The type of read attempted does not agree with the access mode of the file.<br />
This is probably due to a sort internal error.<br />
71 THE SORT PROCESSOR DID NOT SUPPLY ENOUGH I/O BUFFERS<br />
An internal sort error has occurred.<br />
72 KEY OF REFERENCE GREATER THAN ANY KEY TYPE IN FILE<br />
An internal sort error has occurred. The specified key type (prime or alternate)<br />
for the read record function does not match that found in the MSAM file.<br />
Data corruption has probably occurred in the working area used by sort.<br />
73 BLOCK SIZE TOO SMALL<br />
The specified block size is smaller than the actual allowed size for the file.<br />
74 RECORD TO BE WRITTEN IS LESS THAN MINIMUM RECORD SIZE<br />
An internal sort error has occurred. The size of the MSAM record to be<br />
written is less than the minimum record size specified when the MSAM file<br />
was opened. Data corruption has probably occurred in the working area used<br />
by sort.<br />
75 RECORD TO BE WRITTEN EXCEEDS MAXIMUM RECORD SIZE<br />
An internal sort error has occurred. The size of ISAM or MSAM record to be<br />
written is greater than the maximum record size specified when the file was<br />
opened. Data corruption has probably occurred in the working area used by<br />
sort.<br />
76 KEY FIELD TYPE IS INCONSISTENT WITH THE DATA TYPE<br />
An ASCII or 9-bit key type (for example, S or T) was used with<br />
DATA=FIELDATA or DATA=6BIT, or a Fieldata or 6-bit key type (for example,<br />
A or D) was used with DATA=ASCII or DATA=9BIT.<br />
77 BLOCK SIZE MUST BE SPECIFIED FOR AN ESTIMATION<br />
The BLOCK parameter must be present for the input and output file during an<br />
estimate.<br />
78 INSUFFICIENT CORE FOR AN ESTIMATE<br />
CORE is less than the sort volume for a core-only sort estimation.<br />
A–8 7831 0687–010
Error<br />
Number<br />
Summary and Diagnostic Messages<br />
Message Text and Description<br />
79 CORE EXPANSION DENIED, D-BANK EXPANSION LIMITED TO 262K<br />
A request for additional core was attempted, however, the requested amount<br />
would have extended the D-bank beyond 262142 words. Immediately<br />
following this message, the processor will print a message indicating the core<br />
available and the core requested. This is for informational purposes.<br />
There are many conditions that can cause this error to be issued. Possible<br />
corrective actions include:<br />
• Decrease the amount of core specified by the CORE parameter.<br />
• Decrease the blocking factor specified by the BLOCK parameter.<br />
• Reduce the blocking factor if a RETRIEVE operation is performed since<br />
RETRIEVE uses 10 input buffers.<br />
• Reduce the number of additional MSAM buffers specified on a<br />
MODE=MSAM parameter.<br />
80 PARAMETER EXCEEDS MAXIMUM LENGTH<br />
Too many characters were used to specify a set of fields in the parameter.<br />
81 PARAMETER NOT ALLOWED WITH FILEIN OR FILESIN<br />
You specified a parameter not supported by FILEIN or FILESIN.<br />
The following parameters are valid for FILEIN: BLOCK, EQUIP, FILEID, JOIN,<br />
LABEL, MODE, MOVE, NUMREC, PREP, REELS, SELECT, SKIPL, and<br />
STOPAPP.<br />
The following parameters are valid for FILESIN: BLOCK, EQUIP, FILEID,<br />
JOIN, LABEL, MODE, MOVE, NUMREC, PREP, SELECT, SKIPL, and<br />
STOPAPP.<br />
82 PARAMETER NOT ALLOWED WITH FILEOUT<br />
You specified a parameter not supported by FILEOUT.<br />
The following parameters are valid for FILEOUT: BLOCK, BMBLOCK, CODE-<br />
TYPE, EQUIP, FILEID, LABEL, MODE, PREP, REELS, REUMSAMBLK, and<br />
SPLIT.<br />
83 SRT$PAR.SORTDEFAULTS CONTAINS AN ERRONEOUS OR ILLEGAL IMAGE<br />
The format of SRT$PAR.SORTDEFAULTS is incorrect. It may be an invalid<br />
name or the equal sign between the name and value is missing. See the site<br />
installation manager for resolution.<br />
7831 0687–010 A–9
Summary and Diagnostic Messages<br />
Error<br />
Number<br />
Message Text and Description<br />
84 THESE PARAMETERS MUST BE AN UNINTERRUPTED SET<br />
<strong>Sort</strong> can accumulate several of these parameters only if they are given as an<br />
uninterrupted set.<br />
85 DECIMAL DATA TYPE IS NOT ALLOWED FOR FIELD 1 WORD<br />
<strong>Sort</strong> cannot split decimal values across word boundaries.<br />
86 INCONSISTENT TEST VALUE LENGTH<br />
The test value length must match the number of characters specified on the<br />
ACCEPT parameter.<br />
87 ACCEPT CANNOT BE USED WITH ALLOW OR REJECT<br />
The ACCEPT parameter is an alternative to the ALLOW and REJECT<br />
parameters.<br />
88 ERROR UPON INFO$ REQUEST<br />
INFO$ request returned an error status due to an internal sort error.<br />
89 ONLY 1 PERMITTED. THE LAST WILL BE USED.<br />
You specified more than one ALLOW parameter. In this case, the system<br />
accepts the last ALLOW and ignores previous ALLOW parameters.<br />
90 ONLY 1 PERMITTED. THE LAST WILL BE USED.<br />
You specified more than one REJECT parameter. In this case, the system<br />
accepts the last REJECT and ignores previous REJECT parameters.<br />
91 TAPE LABEL AND OBSERVED BLOCK COUNTS DIFFER 'RUN ABORTED'<br />
The SORT processor counts the blocks as it processes ACOB and CFH<br />
labeled tapes. If the final block count differs from what was specified in the<br />
tape trailer label, the sort is aborted.<br />
92 WARNING - FILEIN WITHOUT MAY GET TRUNCATED RECORDS<br />
SELECT processing is active, but the designated FILEIN has no applicable RSZ<br />
or SELECT parameter. The largest SELECT record determines the size of the<br />
designated FILEIN. Longer records from this file are truncated.<br />
93 NUMBER OF WORDS WRITTEN BY EXEC ARE LESS THAN NUMBER REQUESTED<br />
This error is issued when an error code 75 is returned from PCIOS.<br />
97 WARNING - DUPLICATE PRIMARY KEYS NOT ALLOWED - OPTION IGNORED<br />
A duplicates allowed (D) option is found on the primary MSKEY/MSKEYW<br />
parameter. The option is ignored for that key, and processing continues.<br />
A–10 7831 0687–010
Error<br />
Number<br />
Summary and Diagnostic Messages<br />
Message Text and Description<br />
98 WARNING - FOR NON-PCIOS SDF FILE, DEFAULT RSZ=33 WORDS<br />
You did not specify the RSZ parameter for a non-PCIOS SDF file. Therefore,<br />
RSZ=33 words is assumed.<br />
99 WARNING - DUPLICATE RSZ PARAMETER NOT ALLOWED<br />
100 INPUT FILE CANNOT BE USED AS AN OUTPUT FILE FOR THIS OPERATION<br />
The input file specified in the FILEIN or FILESIN parameter cannot be the<br />
same physical file as the output file specified in the FILEOUT parameter for<br />
the COPY, MERGE, RETRIEVE, or TAG/RETRIEVE operations.<br />
102 CONFLICTING ASCII TRANSLATE TABLES SPECIFIED<br />
Two or more ASCII translation tables are specified by using the SEQX<br />
parameters for an estimate operation.<br />
104 THE PREPPING FACTOR IS TOO LARGE<br />
When creating an ACOB file assigned to mass storage, the prepping factor is<br />
not one of the valid prepping factors (28, 56, or 112). If the prepping factor<br />
exceeds 112, the <strong>Sort</strong> processor will use 28.<br />
105 WARNING - TOO MANY MSAM BUFFERS ARE BEING USED; MAX ASSUMED<br />
Too many MSAM buffers have been requested. The maximum number of<br />
MSAM buffers that can be used is 63. The number of buffers being used is<br />
equal to 4 plus the number of index keys specified on the MSKEY or<br />
MSKEYW parameter plus the number of additional buffers requested via the<br />
MODE parameter. You must either reduce the number of index keys or<br />
reduce the number of additional buffers being used. The maximum of 63<br />
buffers will be used and the operation will continue. Please note that using<br />
this many MSAM buffers may result in the processor issuing error 79.<br />
106 INVALID NUMBER OF BITS/CHARACTERS IN DATE KEY<br />
When using the DATE key type in the KEY parameter, the number of<br />
characters specified in the number of characters field must be at least 2.<br />
When using the DATE key type in the KEYW parameter, the number of bits<br />
specified in the number of bits field must be at least 18.<br />
107 DEFYEAR PARAMETER SPECIFIES AN INVALID VALUE<br />
The value specified in a DEFYEAR parameter must be in the range 0 to 99.<br />
7831 0687–010 A–11
Summary and Diagnostic Messages<br />
Error<br />
Number<br />
Message Text and Description<br />
108 ERROR ON TAPE SWAP (ER TSWAP$) REQUEST<br />
A tape swap was requested and an error status was returned from the<br />
TSWAP$ Executive Request. The file name was printed before this error<br />
message and the error status returned on the ER TSWAP$ is printed after this<br />
error message. Please refer to the Executive Requests <strong>Programming</strong><br />
Reference Manual for a further explanation of the TSWAP$ error code.<br />
110 THE MODE OF THIS FILE SHOULD BE CARDS NOT SDF<br />
The label control word indicates that this input file is a CARD file, not a PCIOS<br />
SDF file (for example, H1 contains 0502410). Please specify MODE=CARDS<br />
for this file.<br />
111 THE MODE OF THIS FILE SHOULD BE PRINT NOT SDF<br />
The label control word indicates that this input file is a PRINT file, not a PCIOS<br />
SDF file (for example, H1 contains 0502425). Please specify MODE=PRINT<br />
for this file.<br />
112 SPECIFIED RSZ LESS THAN ACTUAL RECORD SIZE - FILE CLOSED<br />
The specified RSZ parameter or default record size is less than the actual<br />
record size for this alternate symbiont input file. This causes the ER SYMB$<br />
to do a partial read of the input image. This alternate symbiont input file has<br />
been closed using a @BRKPT file name.<br />
113 I/O BUFFER SIZE IS TOO SMALL TO ALLOW MSAM FILE TO BE BUILT<br />
This error is issued when PCIOS has returned a 26 error status to SORT. The<br />
I/O buffer size is too small to allow the MSAM file to be created. You must<br />
make the input record size large enough to hold the record. Consider<br />
changing the RSZ or BLOCK parameters.<br />
114 ILLEGAL FILENAME FOR SYMBIONT IO<br />
This file name should not be specified as an input or output file name when<br />
the MODE of the file is PRINT or CARDS.<br />
115 THE ACTUAL FILE-ID IN LABEL DOES NOT MATCH SPECIFIED FILEID<br />
The file-id in the label does not match the FILEID parameter. If the file<br />
identifier was specified as a character string, registers A5, A6, and A7 will<br />
contain the Fieldata equivalent of the ASCII file-id in the label. If the file<br />
identifier was specified as a nonnumeric literal, registers A5, A6, A7, A8, and<br />
A9 will contain the ASCII file-id in the label.<br />
116 THE FILEID PARAMETER NOT ALLOWED WITH THIS FILE TYPE<br />
The FILEID parameter is not allowed with this file type. Allowed file types are<br />
ACOB, ANSI, DSDF, MSAM, or SDF.<br />
A–12 7831 0687–010
Error<br />
Number<br />
Summary and Diagnostic Messages<br />
Message Text and Description<br />
117 THE PROCESSOR CANNOT PROCESS THIS ANSI RECORD FORMAT<br />
The SORT processor has encountered an invalid record format for an ANSI<br />
file.<br />
118 FILE SIZES GREATER THAN 262143 TRACKS NOT SUPPORTED BY FILE<br />
MODE<br />
An input or output file that has a size greater than 262143 tracks has been<br />
specified. The MODE associated with that file, either ACOB, CFH, ISAM, or<br />
MSAM, does not support such a file.<br />
119 WARNING - MAXIMUM FILE SIZE EXCEEDED, CONVERTED TO POSITIONS<br />
The maximum value that may be specified for a file size has been exceeded.<br />
When the granularity of the associated file is tracks, the file size and<br />
granularity are changed to positions.<br />
120 WARNING - PARAMETER VALUE EXCEEDS MAXIMUM, MAXIMUM ASSUMED<br />
The SORT processor has determined that the maximum value that may be<br />
specified for one or more of the fields in the current parameter has been<br />
exceeded. The maximum value for those fields will be used.<br />
121 ZERO LENGTH RECORD ENCOUNTERED<br />
A zero length record has been encountered during record processing. This<br />
error is known to occur as a result of describing a fixed unblocked or fixed<br />
blocked ANSI tape file as a variable unblocked or variable blocked file.<br />
122 MAXIMUM RECORD LENGTH EXCEEDED FOR ANSI OUTPUT FILE<br />
The maximum record length for a variable blocked or variable unblocked ANSI<br />
file is 9,999 (9-bit) characters. This limit includes the 4-character record<br />
control word.<br />
123 UNKNOWN OR INVALID EQUIPMENT TYPE SPECIFIED<br />
The ESTIMATE operation has encountered a scratch file assigned to an<br />
unknown device or the assign mnemonic specified on a scratch file facility<br />
parameter is unknown to the SORT processor. If you have not specified an<br />
incorrect assign mnemonic in a scratch file facility parameter, please submit a<br />
UCF so that this device or assign mnemonic can be added to the recognized<br />
list within the SORT processor.<br />
124 RECORD LENGTH MUST EQUAL MAXIMUM RECORD LENGTH<br />
All records that are being written on to a fixed formatted output ANSI file<br />
must be equal to the maximum record length.<br />
7831 0687–010 A–13
Summary and Diagnostic Messages<br />
Error<br />
Number<br />
Message Text and Description<br />
125 WARNING - FILEOUT LOCAL PARAMETER CONFLICTS WITH THE FILE MODE<br />
A local parameter associated with the FILEOUT parameter is not appropriate<br />
with the mode of the output file. For example, you have used the<br />
REVMSAMBLK parameter and the mode of the output file is not MSAM. The<br />
local parameter is ignored.<br />
126 LABEL RECORD CANNOT BE READ BY EXPIPE<br />
ExPipe returned an error to the SORT processor indicating that it was unable<br />
to read the label record for this ExPipe file.<br />
127 EXPIPE REQUEST IS NOT ALLOWED<br />
ExPipe returned an error to the SORT processor indicating that an illegal<br />
function was requested. This is an internal error and you should submit a<br />
UCF.<br />
128 ERROR IN ER SYMB$ REQUEST<br />
An error was returned after the SORT processor performed an ER SYMB$.<br />
129 THE LENGTH OF THE FILE IDENTIFIER IS INVALID<br />
The value specified for the file-id parameter must be 1 to 17 characters in<br />
length. The length does not include the delimiters when a nonnumeric literal<br />
is used.<br />
130 WARNING - NONNUMERIC LITERAL IS MISSING THE CLOSING DELIMITER<br />
A nonnumeric literal is a character string delimited on both ends with<br />
apostrophes or quotation marks. Both delimiters must be the same. The<br />
character string being processed has been recognized as a nonnumeric literal,<br />
but a closing delimiter is missing.<br />
131 AN I KEY MUST NOT BE SPECIFIED FOR THIS OPERATION<br />
This error is issued for a TAG, TAG/RETRIEVE, or a RETRIEVE operation. This<br />
error will not be issued for a copy or estimate operation. An I key type is<br />
meaningful only for a sort or merge operation.<br />
132 WARNING - A CODE-TYPE DOES NOT EXIST FOR THIS MODE<br />
The CODE-TYPE parameter should only be specified for files with a mode of<br />
CARDS, PRINT, SDF, or DSDF. These are the only file modes where a code<br />
type has meaning.<br />
133 WARNING - CODE-TYPE EXCEEDS THE MAXIMUM ALLOWED VALUE<br />
The CODE-TYPE value exceeded the maximum allowed value of 63 (077). A<br />
code type 01 will be assumed.<br />
A–14 7831 0687–010
Error<br />
Number<br />
Summary and Diagnostic Messages<br />
Message Text and Description<br />
134 CODE-TYPE SPECIFIED IS A UNISYS RESERVED CHARACTER SET VALUE<br />
A <strong>Unisys</strong> reserved character set value was specified in the CODE-TYPE<br />
parameter. Update the CODE-TYPE parameter with a valid value and rerun<br />
the job.<br />
135 DATA PARAMETER CONFLICTS WITH OTHER PARAMETERS OR OPTIONS<br />
The value specified on the DATA parameter conflicts with another parameter<br />
or with a processor call option. Potential parameter conflicts include<br />
specifying DATA=FIELDATA or DATA=6BIT with<br />
• An I key<br />
• A CODE-TYPE parameter with a value not equal to zero<br />
• A LOCALE parameter<br />
Or specifying DATA=ASCII or DATA=9BIT with<br />
• A CODE-TYPE parameter with a value equal to zero<br />
• Processor call option C or M<br />
136 WARNING - THE LENGTH OF THE LOCALE NAME IS INVALID<br />
The name specified on the LOCALE parameter contains an incorrect number<br />
of characters. The locale name must contain at least one character but no<br />
more than 16 characters. If the locale name contains more than 16<br />
characters, the locale name is truncated to 16 characters.<br />
137 I KEY NOT ALLOWED WITH THIS MODE<br />
An I key can only be specified when the mode of the output file is CARDS,<br />
PRINT, SDF, DSDF, MSAM, or ANSI.<br />
140 THE CODE-TYPE CONFLICTS WITH THE INPUT FILE(S) CODE TYPE<br />
A conflict exists between the code type specified on the FILEOUT parameter<br />
and the code type of the input files. The code type of the input files must<br />
either be 01 or match the code type specified on the FILEOUT parameter.<br />
One way to prevent this error is to ensure that the CCSLOCNUMCHK<br />
configuration parameter is set to OFF.<br />
141 I KEY TYPE CANNOT BE USED WITH A BASIC MODE SORT<br />
An I key type can be used only with an extended mode sort.<br />
7831 0687–010 A–15
Summary and Diagnostic Messages<br />
Error<br />
Number<br />
Message Text and Description<br />
142 WARNING - CODE-TYPE CONFLICTS WITH THE CODE TYPE OF LOCALE<br />
The value specified in the CODE-TYPE parameter does not match the code<br />
type associated with the locale that is in force. The value specified in the<br />
CODE-TYPE parameter is ignored, and any code-type number written to the<br />
output file will be the code type associated with the locale in force for this<br />
operation.<br />
One way to prevent this error is to ensure that the CCSLOCNUMCHK<br />
configuration parameter is set to OFF.<br />
143 LOCALE CONFLICT WITH MSAM FILES<br />
A conflict has been encountered involving the locale for an MSAM input file<br />
and the locale for the MSAM output file. This error may be issued when<br />
multiple input MSAM files exist and their respective locales are not the same.<br />
One way to prevent this error is to ensure that the CCSLOCNUMCHK<br />
configuration parameter is set to OFF.<br />
144 CODE-TYPE OF AN INPUT FILE AND MSAM OUTPUT FILE CONFLICT<br />
A conflict has been encountered between the code type associated with the<br />
locale for the MSAM output file and the code type of a non-MSAM input file.<br />
This error may be caused by the setting of the DEFCTYPE and DEFLOCALE<br />
configuration parameters.<br />
One way to prevent this error is to ensure that the CCSLOCNUMCHK<br />
configuration parameter is set to OFF.<br />
145 ERROR RETURNED BY I18NLIB SERVICE ROUTINE<br />
An I18NLIB service routine encountered an error that SORT did not expect.<br />
This error may be due to an internal sort error and you should submit a UCF.<br />
146 LOCALE NOT FOUND<br />
The desired locale for the operation could not be found on the system. Please<br />
verify that the name of the locale you specified is correct and that it is<br />
installed on the system. Remember that locale names are case sensitive.<br />
160 TOO MANY STOP PARAMETERS SPECIFIED<br />
The maximum number of STOP parameters is 50. This runstream exceeds<br />
the maximum number allowed. Reduce the number of STOP parameters and<br />
resubmit the run.<br />
A–16 7831 0687–010
Error<br />
Number<br />
Summary and Diagnostic Messages<br />
Message Text and Description<br />
161 WARNING - ACCESS MODE CHANGED FROM SEQUENTIAL TO RANDOM<br />
The SORT mode of the MSAM output file was changed from sequential to<br />
random by the SORT processor. Please refer to the MODE parameter in the<br />
<strong>Sort</strong>/<strong>Merge</strong> <strong>Programming</strong> <strong>Guide</strong> for conditions that cause the processor to<br />
issue this error.<br />
162 WARNING - SEQUENTIAL ACCESS SPECIFIED ON COPY<br />
An ACCESS mode of SEQUENTIAL has been specified for the MSAM output<br />
file. Please be positive that the records in the input files are in ascending<br />
order. If not you may encounter additional errors such as processor error<br />
. The default access mode specification for a COPY operation is<br />
RANDOM.<br />
163 WARNING - NUMREC RECORDS PROCESSED, MORE INPUT RECORDS MAY<br />
EXIST<br />
The number of records specified by a local NUMREC parameter have been<br />
processed and more records may exist in the file named immediately before<br />
this error message. The file is closed and processing continues.<br />
This error will also be issued when the number of records specified by a<br />
global NUMREC parameter have been processed and more records exist in<br />
the current input file or in an unopened input file. Input is terminated and<br />
processing continues.<br />
164 RECORD LENGTH EXCEEDS MAXIMUM RECORD LENGTH<br />
PCIOS has returned error code 59 to the SORT processor. This error code<br />
indicates that a record has been encountered with a length that exceeds the<br />
maximum record length that this file was expecting.<br />
165 WARNING - AN INPUT RECORD TRUNCATED ON OUTPUT<br />
The input file identified contains a record longer than the record length that<br />
SORT was expecting. Some records in the resultant output file have been<br />
truncated. The bit length of the record causing this warning and the current<br />
maximum bit length are stated in a subsequent message. To avoid receiving<br />
this warning, specify an RSZ parameter with a record length equal to or<br />
greater than the maximum record length from all input files.<br />
7831 0687–010 A–17
Summary and Diagnostic Messages<br />
Error<br />
Number<br />
INCONSISTENT BLOCK SIZES<br />
Message Text and Description<br />
The block size on the file does not agree with the block size supplied by the<br />
BLOCK parameter.<br />
INCONSISTENT RECORD SIZES<br />
CURRENT SIZE:xxxxxx CONFLICTING SIZE:xxxxxx<br />
The record size (xxxxxx) on the file does not agree with the record size<br />
supplied by the RSZ parameter.<br />
A.2. SORT Subroutine Error Messages<br />
SORT subroutine error messages are displayed in three ways<br />
• On the operator console<br />
• On the user’s batch listing<br />
• On the demand terminal<br />
SORT subroutine errors can also be returned to the program without being displayed on<br />
the operator’s console, user’s listing, or the demand terminal. For the basic mode<br />
MASM linkages, the 2-Fieldata-character error indicator for the error is returned to the<br />
error routine indicated by the ERROR parameter.<br />
For the UCS C linkages, most errors are returned as an integer value in the message_id<br />
field of the result status parameter (see 8.2.1). In some instances where the error<br />
cannot be returned via the result status parameter, the error message will be issued to<br />
either the user’s listing or the demand terminal.<br />
SORT subroutines error messages that appear on the operator’s console consist of the<br />
following types of errors:<br />
• Nonrecoverable errors<br />
The format of a nonrecoverable error is the following:<br />
SORT ERROR CODE = xx<br />
where xx is the 2-character alphanumeric error indicator.<br />
• Recoverable errors<br />
The format of a recoverable error is the following:<br />
SORT ERROR CODE = xx cc/uu ss GN<br />
A–18 7831 0687–010
where<br />
xx<br />
is the 2-character alphanumeric error indicator.<br />
cc/uu ss<br />
GN<br />
Summary and Diagnostic Messages<br />
are the 2-character indicators for channel/unit and status of the device on which<br />
the error occurred.<br />
specifies the two possible operator responses:<br />
G = go<br />
N = no go<br />
The severity of an error message issued affects the status of the operation being<br />
performed. The operation is identified by basic mode MASM linkage sort dbank address<br />
or the UCS C linkage dbank address parameter. If multiple errors are encountered on<br />
one call to a SORT subroutines linkage, only the most severe error is returned. Major or<br />
failure severity errors are always returned. The following lists and describes the<br />
meaning and affect of each error severity in order from least severe to most severe:<br />
Warning The requested operation performed an action that it determined the caller<br />
requested. The action taken, such as padding a record, should be harmless.<br />
If the caller did not intend for this action to occur, the current operation must<br />
be restarted to correct the situation. If the caller intended this action to<br />
occur, the operation can continue.<br />
Minor The requested operation performed an action that it determined the caller<br />
requested. The action taken, such as truncating a record, could be<br />
detrimental to the operation or the data. If the caller did not intend for this<br />
action to occur, the current operation must be restarted to correct the<br />
situation. If the caller intended this action to occur, the operation can<br />
continue.<br />
Major A situation has been encountered that prevents the requested call from<br />
continuing without being corrected. The caller can attempt to correct the<br />
situation and perform the call again. The operation is in a state that can be<br />
resumed.<br />
Failure A situation has been encountered that prevents the requested call and<br />
operation from continuing. The caller cannot resume this operation and the<br />
operation must be closed. The caller must restart the operation from the<br />
beginning.<br />
The following are the SORT subroutine error messages with the UCS C linkage<br />
message_id, the basic mode MASM 2-character error indicator, the severity of the error,<br />
the text of the error message, and an explanation of the error message. The messages<br />
are listed in alphabetic/numerical error code order. If an error message is not issued by<br />
the basic mode MASM linkages or the UCS C linkages, the error code for that message<br />
is indicated by none in the appropriate column.<br />
7831 0687–010 A–19
Summary and Diagnostic Messages<br />
UCS C<br />
Linkage<br />
BM<br />
Linkage<br />
Severity<br />
Message Text and Description<br />
10000 None Warning RECORD PADDING OCCURRED<br />
When releasing records via the SORT subroutines UCS C <strong>Sort</strong><br />
Release Linkage, one or more of the records was padded to the size<br />
specified in the RSZ parameter. The padding occurred because a<br />
fixed length sort was requested and the record was shorter than the<br />
record size defined by the RSZ parameter.<br />
When returning records in the fixed records formatted buffer via the<br />
SORT subroutines UCS C <strong>Sort</strong> Return Linkage, one or more of the<br />
records placed into the buffer was padded. The padding occurred<br />
because the length of the record was shorter than the length of the<br />
records requested as stated in the record_length field of the<br />
record_information_packet parameter.<br />
10001 None Warning NUMBER OF RECORDS OVERRODE BUFFER LENGTH<br />
When releasing a record buffer via the SORT subroutines UCS C<br />
<strong>Sort</strong> Release Linkage with a nonzero number_of_records field in the<br />
record_information_packet, the requested number of records have<br />
been released prior to the end of the buffer as specified by the<br />
buffer_length field of the record_information_packet. This is the<br />
defined situation; however, this status is being returned in case an<br />
inconsistency between the number_of_records and buffer_length<br />
fields should not have occurred.<br />
10002 None Warning RESERVED FIELD IN RECORD CONTROL WORD IS NONZERO<br />
When releasing records via the SORT subroutines UCS C <strong>Sort</strong><br />
Release Linkage, at least one the records in the variable1 records<br />
formatted buffer had a record control word with a reserved field<br />
being nonzero. All reserved fields should be zero to eliminate future<br />
incompatibilities if the reserved field needs to be defined. The data<br />
in the reserved field has been ignored.<br />
10003 None Minor RECORD TRUNCATED<br />
The single record released or one or more of the records released in<br />
a record buffer call to the SORT subroutines UCS C <strong>Sort</strong> Release<br />
Linkage is longer than the maximum record size as stated in the RSZ<br />
parameter. The records longer than the maximum record size were<br />
truncated to the maximum size. All data beyond that point has been<br />
lost.<br />
When returning a fixed records formatted buffer, one or more of the<br />
records placed into the buffer was longer than the requested record<br />
length as specified in the record_length field of the<br />
record_information_packet. The records longer than record_length<br />
were truncated to that size and all data beyond that point has been<br />
lost.<br />
A–20 7831 0687–010
UCS C<br />
Linkage<br />
BM<br />
Linkage<br />
Severity<br />
Summary and Diagnostic Messages<br />
Message Text and Description<br />
10004 None Major RECORD BUFFER TOO SMALL<br />
When returning records via the SORT subroutines UCS C <strong>Sort</strong><br />
Return Linkage, the length of the record buffer defined by the<br />
record_address parameter (buffer_length field of the<br />
record_information_packet) is smaller than the length of the next<br />
record to be returned. A larger buffer should be allocated and the<br />
call to the UCS C <strong>Sort</strong> Return Linkage should be attempted again<br />
with the larger buffer.<br />
10005 None Major COMPLETE RECORD NOT CONTAINED WITHIN RECORD BUFFER<br />
When releasing records via the SORT subroutines UCS C <strong>Sort</strong> Release<br />
Linkage, the current record is not completely contained within the<br />
buffer. The entire record must be contained within a buffer. The<br />
record_length field of the record_information_packet defines the offset<br />
within the buffer where the error was detected. All prior records have<br />
been released to the SORT subroutines. The operation can be<br />
continued by placing the entire record in the next buffer along with<br />
any additional records of the same record buffer format.<br />
10006 None Major ZERO LENGTH SPECIFIED IN RECORD CONTROL WORD<br />
When releasing records in a variable1 records formatted buffer or<br />
variable2 records formatted buffer, a record control word with a<br />
length field of zero (0) was encountered. The record_length field of<br />
the record_information_packet defines the offset within the buffer<br />
where the error was detected. All prior records have been released<br />
to the SORT subroutines.<br />
10007 None Major END OF BUFFER ENCOUNTERED BEFORE PROCESSING<br />
REQUESTED RECORD COUNT<br />
When releasing records in any buffer format, the end of the buffer<br />
as defined by the record_address parameter plus the buffer_length<br />
field of the record_information_packet was encountered before<br />
processing the number of records specified in the<br />
number_of_records field of the record_information_packet. All<br />
complete records have been processed.<br />
10008 None Major RETURN OF A VARIABLE2 RECORDS FORMATTED BUFFER<br />
ILLEGAL<br />
The request for returning records via a variable2 records formatted<br />
buffer is rejected since the requirements for returning that buffer<br />
format are not satisfied. To return records via a variable2 records<br />
formatted buffer the following conditions must be satisfied:<br />
• All records must be released via a variable2 records formatted<br />
buffer.<br />
• When the records were released, no record truncation or record<br />
padding occurred.<br />
7831 0687–010 A–21
Summary and Diagnostic Messages<br />
UCS C<br />
Linkage<br />
BM<br />
Linkage<br />
Severity<br />
Message Text and Description<br />
10009 None Warning GRANULARITY FIELD CHANGED<br />
The record_gran field or the buffer_gran field or both have changed.<br />
In order to return the correct information in the record_length or<br />
buffer_length fields, the requested or stated granularity of one or<br />
both of these fields has been changed. The data records released or<br />
returned are not affected<br />
10010 None Major INVALID GRANULARITY FIELD SPECIFICATION<br />
The value contained in the record_gran or the buffer_gran field of<br />
the Record Information Packet (RIP) is invalid or the granularity field<br />
in a variable1 records formatted buffer record control word (RCW)<br />
contains an invalid value. If the RIP is in error, no records have been<br />
released or returned. If a variable1 records formatted buffer RCW is<br />
in error, all records preceding the invalid RCW have been released.<br />
None A0 Failure SCRATCH TAPE TOO SHORT<br />
You must provide a larger capacity scratch tape or multiple volumes.<br />
None A1 Failure SEQUENCE ERROR ON TAPE<br />
An internal SORT subroutine error has occurred. If this error is<br />
issued, submit a UCF.<br />
None A2 Warning ILLEGAL NUMBER OF WORDS ON TAPE<br />
A discrepancy between words written and words read has been<br />
found. Data corruption has occurred in the working area used by<br />
<strong>Sort</strong>/<strong>Merge</strong>.<br />
None A3 Warning CHECKSUM ERROR ON TAPE<br />
A possible hardware malfunction has been detected. Examine the<br />
run termination messages for data check errors.<br />
None A4 Failure ER TINTL$, TLBL$, TSWAP$, OR CSF$ RETURNED AN ERROR<br />
An ER TINTL$, ER TLBL$, ER TSWAP$, or ER CSF$ returned an error for a<br />
tape sort scratch file. <strong>Sort</strong> was unable to recover from this error.<br />
None A5 Warning READ ERROR ON TAPE<br />
An I/O error has been detected by the Exec.<br />
None A6 Failure WRITE ERROR ON TAPE<br />
An I/O error has been detected by the Exec.<br />
None A7 Warning BLOCK COUNT ERROR ON TAPE<br />
A possible hardware malfunction or SORT subroutine internal error<br />
has been detected. Data corruption may have occurred in the<br />
working area used by <strong>Sort</strong>/<strong>Merge</strong>.<br />
None A8 Failure ERROR ON TAPE RECOVERY ATTEMPT<br />
The attempt to recover from a tape error has been aborted.<br />
A–22 7831 0687–010
UCS C<br />
Linkage<br />
BM<br />
Linkage<br />
Severity<br />
Summary and Diagnostic Messages<br />
Message Text and Description<br />
None A9 Failure INVALID DEVICE NAME FOR A TAPE SCRATCH FILE<br />
A tape sort obtained an invalid device name or the tape module<br />
corrupted the device name. This error is an internal error to the tape<br />
module. Please submit a UCF if this error is issued.<br />
33840 B0 Failure PARAMETER TABLE FORMAT ERROR<br />
The SORT subroutines have detected that the parameter table has<br />
an incorrect format.<br />
33841 B1 Failure NO RECORD SIZE SPECIFIED<br />
33842 B2 Failure INVALID 'CORE' SIZE<br />
You must define record size in the parameter table.<br />
The CORE parameter has been specified with one of the following<br />
conditions:<br />
1. The size of the specified basic mode core area does not fit in the<br />
basic mode address range.<br />
2. The size of the specified extended mode core area is less than<br />
210000.<br />
33843 B3 Failure NO ‘CORE' SPECIFIED AND NO R$CORE ASSIGNMENT<br />
You must define a CORE parameter of at least 1000 or assign the<br />
file R$CORE.<br />
None B4 Failure INVALID 'CONTA' OR 'REDOA' PARAMETER<br />
An invalid CONTA or REDOA parameter was detected. Ensure that<br />
all required parameter entries have been specified.<br />
33845 B5 Failure LINK SIZE IS LARGER THAN RECORD SIZE<br />
You cannot define a link size larger than the record size.<br />
None B6 Failure INCONSISTENCY IN CONTROL PARAMETERS<br />
You cannot define more than one parameter from each of the<br />
following:<br />
SMRG, PARTA, PARTB, PARTC, or<br />
REDOA, REDOB, CONTA, CONTB, CONTC<br />
7831 0687–010 A–23
Summary and Diagnostic Messages<br />
UCS C<br />
Linkage<br />
BM<br />
Linkage<br />
Severity<br />
Message Text and Description<br />
33847 B7 Major RECORD LENGTH LESS THAN MINIMUM OR GREATER THAN<br />
MAXIMUM<br />
The length of a record released to sort was less than the minimum<br />
allowed or greater than the maximum. For any operation, the record<br />
must be long enough to contain all keys. For the basic mode sort<br />
release linkage, the length of a record cannot exceed the maximum<br />
record size defined by the RSZ parameter.<br />
33848 B8 Failure SCRATCH FILE FACILITY TYPE IMPROPERLY ASSIGNED<br />
You must assign scratch files on tape or mass storage.<br />
33849 B9 Failure INSUFFICIENT CORE FOR MERGE<br />
Main storage amount specified by the CORE parameter or R$CORE<br />
is insufficient for merge. Recalculate the main storage.<br />
34352 C0 Failure SORT ENCOUNTERED AN INVALID ADDRESS<br />
The <strong>Sort</strong>/<strong>Merge</strong> subroutines encountered an invalid address for a<br />
parameter table or a parameter that contains an address.<br />
None C1 Failure ATTEMPT TO REFERENCE AN ELEMENT NOT COLLECTED<br />
Reassemble your sort program with the appropriate R$FILE<br />
parameters.<br />
None C2 Failure NOT ENOUGH D-BANK PROVIDED FOR SORT OR MERGE<br />
The amount of D-bank space required by <strong>Sort</strong>/<strong>Merge</strong> has not been<br />
sufficiently allocated<br />
34355 C3 Failure PROPER D-BANK NOT PROVIDED FOR SORT OR MERGE<br />
D-bank area was not provided for <strong>Sort</strong>/<strong>Merge</strong>.<br />
None C4 Failure VARIABLE LENGTH RECORDS NOT ALLOWED WITH DATA<br />
REDUCTION<br />
Variable-length records are not allowed when data-reduction own<br />
code (DROC) is specified.<br />
34357 C5 Failure EXEC RETURNED AN ERROR STATUS TO CONTINGENCY<br />
REGISTRATION<br />
During the initialization of an extended mode sort, the Exec returned<br />
an error status while trying to register for extended mode<br />
contingencies.<br />
None C6 Failure MIXED MODE ENVIRONMENT DOES NOT FOLLOW URTS<br />
CONVENTIONS<br />
The UCS Runtime System (URTS) conventions were not followed<br />
when an extended mode sort was attempted using the basic mode<br />
entry points.<br />
A–24 7831 0687–010
UCS C<br />
Linkage<br />
BM<br />
Linkage<br />
Severity<br />
Summary and Diagnostic Messages<br />
Message Text and Description<br />
34359 C7 Major SORT SUBROUTINE CALLED WITH INVALID PARAMETER LIST<br />
Either an incorrect number of parameters were specified or <strong>Sort</strong><br />
determined that one of the parameters specified in the parameter<br />
list was invalid on the call to the SORT subroutines.<br />
34360 C8 Failure INCORRECT NUMBER OF RECORDS RETURNED<br />
The SORT subroutine has detected a difference between the<br />
number of records released and the number of records returned.<br />
Any records removed by data reduction have been taken into<br />
account.<br />
34361 C9 Failure ILLEGAL PARAMETER FOR RDMS SORT<br />
The <strong>Sort</strong> parameter table contains an OPTION parameter indicating<br />
that RDMS has initiated the sort (bit 33 set) with one of the<br />
following illegal conditions:<br />
1. The CORE parameter indicates a basic mode sort.<br />
2. A COMP, a KEY, or a sequence parameter (for example, SEQ or<br />
SEQA) is specified.<br />
3. A MERGE operation is specified.<br />
4. The OPTION parameter indicates that the SORT subroutines<br />
were called by the SORT processor.<br />
None D0 Failure LOGICAL ERROR IN M1 MODULE<br />
An internal SORT subroutine error has occurred. If this error is<br />
issued, submit a UCF.<br />
None D4 Failure SEQUENCE ERROR IN M1 MODULE<br />
An internal SORT subroutine error has occurred. If this error is<br />
issued, submit a UCF.<br />
None D5 Failure READ/WRITE ERROR ON M1<br />
An I/O error has been detected by the Exec.<br />
None D6 Failure CHECKSUM ERROR ON M1<br />
A possible hardware malfunction has been detected. Examine the<br />
run termination messages for data check errors.<br />
None D7 Failure BLOCK COUNT ERROR ON M1<br />
A possible hardware malfunction or SORT subroutine internal error<br />
has been detected. Data corruption may have occurred in the<br />
working area used by <strong>Sort</strong>/<strong>Merge</strong>.<br />
None D8 Failure M1 BLOCK SIZE IS LESS THAN MINIMUM<br />
Calculated block size is less than minimum allowed by LIMDRM<br />
specification.<br />
7831 0687–010 A–25
Summary and Diagnostic Messages<br />
UCS C<br />
Linkage<br />
BM<br />
Linkage<br />
Severity<br />
Message Text and Description<br />
None E0 Failure INSUFFICIENT CORE ALLOCATED OR BLOCK SIZE SPECIFIED TOO<br />
SMALL<br />
You must increase either main storage or block size.<br />
None E1 Failure INSUFFICIENT CORE ALLOCATED TO PERFORM TAPE MERGE<br />
You must define larger main storage size.<br />
None E2 Failure OUTPUT TAPE FOR ‘REDOB' IS TOO SMALL<br />
You need a larger capacity tape.<br />
None E3 Failure NO RERUN INFORMATION ON ‘REDOB' OUTPUT TAPE<br />
You have a bad rerun tape. The REDOB must be re-executed<br />
because the output tape has been corrupted.<br />
None E4 Failure INSUFFICIENT NUMBER OF TAPES TO MERGE<br />
You need at least two tapes to do a tape merge.<br />
None E5 Failure INCORRECT ADDRESS OF ‘CONTC' INFORMATION<br />
You must check your parameter table.<br />
None E6 Failure REEL TABLE OR LABEL TABLE ENTRY MISSING<br />
The tape module internally maintains two tables, a label table and a<br />
reel table to identify and maintain a record of the tape scratch files.<br />
An entry in one of the tables is missing. This error is an internal<br />
error to the tape module. Please submit a UCF if this error is issued.<br />
None E7 Failure A PARAMETER TABLE 012 ENTRY IS REQUIRED<br />
A 012 entry is required following a 030, 031, or 032 to indicate the<br />
2-character prefix for tape labels.<br />
None E8 Failure REEL TABLE OR LABEL TABLE OVERFLOW<br />
The tape module internally maintains two tables, a label table and a<br />
reel table, to identify and maintain a record of the tape scratch files.<br />
One of the tables overflowed. For this sort to complete, the size of<br />
the table that overflowed must be increased. Please submit a UCF<br />
if this error is issued.<br />
None F0 Failure LOGICAL ERROR IN M2 MODULE<br />
An internal SORT subroutine error has occurred. If this error is<br />
issued, submit a UCF.<br />
None F4 Failure SEQUENCE ERROR IN M2 MODULE<br />
An internal SORT subroutine error has occurred. If this error is<br />
issued, submit a UCF.<br />
None F5 Failure READ/WRITE ERROR ON M2<br />
An I/O error has been detected by the Exec.<br />
A–26 7831 0687–010
UCS C<br />
Linkage<br />
BM<br />
Linkage<br />
Severity<br />
None F6 Failure CHECKSUM ERROR ON M2<br />
Summary and Diagnostic Messages<br />
Message Text and Description<br />
A possible hardware malfunction has been detected.<br />
None F7 Failure BLOCK COUNT ERROR ON M2<br />
A possible hardware malfunction or SORT subroutine internal error<br />
has been detected. Data corruption may have occurred in the<br />
working area used by <strong>Sort</strong>/<strong>Merge</strong>.<br />
None F8 Failure M2 BLOCK SIZE IS LESS THAN MINIMUM<br />
Calculated block size is less than minimum allowed by LIMFST<br />
parameter.<br />
None G1 Failure PARAMETER CARD INCORRECT<br />
This is not a legal runtime parameter or the syntax is incorrect.<br />
None G2 Failure CARD TABLE OVERFLOWED<br />
There is not enough room in the runtime parameter table.<br />
37424 I0 Failure INVALID USER CORE AREA START ADDRESS AND LENGTH<br />
COMBINATION<br />
All or a part of the user core area provided is not within the current<br />
assigned address range.<br />
37425 I1 Failure ERROR STATUS RETURNED BY EXEC WHILE PROCESSING CORE<br />
The Exec was unable to create, delete, or inspect the core area as<br />
requested and has returned a failure status.<br />
37426 I2 Failure INVALID USER CORE ADDRESS<br />
The core area address provided is invalid or the core area is<br />
corrupted. The Exec returned an error status in specific_status.<br />
37427 I3 Failure INVALID ACCESS PERMISSION FOR USER CORE AREA<br />
The core area provided has an invalid general access permission.<br />
The core area must allow read and write permission and not allow<br />
execute permission.<br />
37428 I4 Failure INVALID BANK TYPE FOR USER CORE AREA<br />
The bank type of the core area provided has an incorrect type. The<br />
core area cannot be part of a code, SPSU (scientific processor<br />
storage unit), or contiguous BDI bank.<br />
7831 0687–010 A–27
Summary and Diagnostic Messages<br />
UCS C<br />
Linkage<br />
BM<br />
Linkage<br />
Severity<br />
Message Text and Description<br />
37429 I5 Failure THIS RUN WOULD EXCEED ITS MEMORY QUOTA LIMIT<br />
An extended mode sort was unable to allocate the core area as<br />
requested. The Exec returned a failure status which indicated that<br />
the size of the core area to be allocated would cause the run to<br />
exceed its memory quota limit.<br />
Possible corrective actions include:<br />
• Reduce the CORE parameter if one was specified.<br />
• Specify a CORE parameter if one was not specified.<br />
• Reduce the MAXIMUM configuration parameter.<br />
37430 I6 Failure TIP MEMORY TRANSACTION UNABLE TO ALLOCATE THE CORE<br />
AREA<br />
An extended mode sort was unable to allocate the core area as<br />
requested. The Exec returned a failure status which indicated that<br />
this transaction resided in TIP memory.<br />
37431 I7 Failure MEMORY IS NOT AVAILABLE TO ALLOCATE THE CORE AREA<br />
An extended mode sort was unable to allocate the core area as<br />
requested. The Exec returned a failure status which indicated that<br />
memory was not available to allocate the core area. <strong>Sort</strong> made<br />
multiple attempts to allocate the core area. However, sufficient<br />
memory never became available.<br />
Possible corrective actions include:<br />
• Reduce the CORE parameter if one was specified.<br />
• Specify a CORE parameter if one was not specified.<br />
• Reduce the MAXIMUM configuration parameter.<br />
None K0 Failure SORT UNABLE TO ALLOCATE REQUESTED CORE - INSUFFICIENT<br />
ADDRESS SPACE<br />
The basic mode SORT subroutines cannot allocate the core requested by<br />
the assignment of the file R$CORE. The allocation requested would cause<br />
the basic mode D-bank to exceed the maximum address of 0777776.<br />
Resolution of this error may be achieved by any of the following steps:<br />
1. If the program is using the common-banked SORT subroutines, convert<br />
the sort operation to an extended mode sort by increasing the<br />
maximum reserve of the file R$CORE to a value greater than 210. If an<br />
Extended Mode sort is not available, error K5 is issued.<br />
2. Reduce the requested CORE size by reducing the maximum reserve of<br />
the file R$CORE.<br />
3. Recollect the absolute with a lower D-bank start address.<br />
Please note that for some specific cases, options 2 and 3 may both be<br />
required to permit the execution of the sort operation.<br />
A–28 7831 0687–010
UCS C<br />
Linkage<br />
BM<br />
Linkage<br />
Severity<br />
Summary and Diagnostic Messages<br />
Message Text and Description<br />
38449 K1 Failure INSUFFICIENT SCRATCH FILES PROVIDED<br />
You must assign more scratch space.<br />
None K2 Failure ACTUAL BIAS DOES NOT MATCH EXPECTED BIAS<br />
Your input data requires that you supply a bias parameter according<br />
to the bias estimate provided with this message.<br />
This error can occur if the volume of data is greater than expected. You can<br />
assign more core or use the disk sort. The disk sort does not require using<br />
the BIAS parameter.<br />
None K3 Failure CORE MUST NOT BE GREATER THAN 1/3 OF M1 FILE SIZE<br />
You must assign a larger M1 file or less main storage.<br />
38452 K4 Failure CORE AMOUNT IS INSUFFICIENT<br />
You must supply more main storage.<br />
None K5 Failure EXTENDED MODE SORT IS UNAVAILABLE<br />
An extended mode sort was requested but is unavailable since the<br />
common-banked SORT subroutines were not used. Extended mode<br />
<strong>Sort</strong> requires that the SORT subroutines be invoked through the<br />
common-banked interfaces.<br />
38454 K6 Failure INCORRECT SCRATCH FILE FOR EXTENDED MODE SORT<br />
If an extended mode sort has been selected, it is illegal to also<br />
specify a tape, one-level (M1), or a two-level (M1-M2) sort either by<br />
parameters or scratch file assignment.<br />
None K7 Failure SORT VOLUME TOO LARGE FOR THE FACILITIES PROVIDED<br />
<strong>Sort</strong> is unable to continue sorting this data set with the facilities<br />
provided. This error is dependent upon the sort volume, the order of<br />
the input data, the core size, and the number of scratch files.<br />
This error can be avoided by increasing the core size, using a<br />
different number of disk scratch files, or using an extended mode<br />
disk sort.<br />
38456 K8 Failure DEFYEAR PARAMETER SPECIFIES AN INVALID VALUE<br />
The value specified in a DEFYEAR parameter must be in the range 0<br />
to 99.<br />
None K9 Failure INCORRECT ‘CONTC' INPUT CARD DECK<br />
You must define correct ‘CONTC’ input parameters.<br />
7831 0687–010 A–29
Summary and Diagnostic Messages<br />
UCS C<br />
Linkage<br />
BM<br />
Linkage<br />
Severity<br />
Message Text and Description<br />
38960 L0 Failure INVALID MIXING OF SORT/MERGE LINKAGE TYPES<br />
The SORT subroutines do not allow mixing of some linkage types.<br />
You cannot use both the MASM linkages and the UCS C linkages for<br />
the same sort or merge operation. You cannot use the MASM<br />
standard or extended linkages and the MASM common bank<br />
linkages in the same merge operation.<br />
38961 L1 Failure RREL$ LINKAGE ERROR<br />
This entry point used illegally. Check the sort program logic.<br />
None L2 Failure RENCY$ LINKAGE ERROR<br />
This entry point used illegally. Check the sort program logic.<br />
38963 L3 Failure RSORT$ LINKAGE ERROR<br />
38964 L4 Failure RRET$ LINKAGE ERROR<br />
This entry point used illegally. Check the sort program logic.<br />
This entry point used illegally. Check the sort program logic.<br />
None L5 Failure RQEND$ LINKAGE ERROR<br />
This entry point used illegally. Check the sort program logic.<br />
38966 L6 Failure MERGE IS NOT INITIALIZED<br />
<strong>Merge</strong> must be initialized using an RMGOPN$, RMGOPN$X,<br />
RMRGOPN$CB, or RMGOPEN call before any other calls to the<br />
SORT subroutines. Data corruption may have occurred in the<br />
working area or the parameter table used by <strong>Sort</strong>/<strong>Merge</strong>.<br />
38967 L7 Failure SORT IS NOT INITIALIZED<br />
<strong>Sort</strong> must be initialized through an ROPN$, RGOPN$X, ROPN$CB,<br />
or SRTOPEN call before any other calls to the SORT subroutines.<br />
Data corruption may have occurred in the working area or the<br />
parameter table used by <strong>Sort</strong>/<strong>Merge</strong>.<br />
39472 M0 Failure ILLEGAL KEY PARAMETER TYPE OR SUBTYPE FIELD<br />
A key parameter specified an invalid key type or key subtype. The<br />
valid key types are: A, B, D, G, I, J, L, M, P, Q, R, S, T, U, V, and<br />
DATE (which is represented by 040 or the character ‘)’). When the<br />
key type is I, the valid key subtypes are 0 and 1. The key subtype<br />
field is not used for other key types.<br />
39473 M1 Failure NO ‘COMP', ‘KEY' OR ‘KEYW' SPECIFIED<br />
You must specify one of the above parameters.<br />
A–30 7831 0687–010
UCS C<br />
Linkage<br />
BM<br />
Linkage<br />
Severity<br />
Summary and Diagnostic Messages<br />
Message Text and Description<br />
39474 M2 Failure INVALID STARTING BIT OR NUMBER OF BITS IN KEY<br />
You must define number of bits as nonzero and starting bit in the<br />
range 0 to 35. When specifying a DATE key type, the number of<br />
bits must be at least 18 and the key start bit must be 35, 26, 17, or<br />
8.<br />
39475 M3 Failure NUMBER OF KEYS SPECIFIED EXCEEDS 64<br />
You cannot define over 64 keys for the SORT subroutine.<br />
39476 M4 Failure INVALID COLLATING SEQUENCE SPECIFIED<br />
You cannot duplicate a code on a sequence parameter.<br />
39477 M5 Failure KEY FALLS OUTSIDE RECORD RANGE<br />
You must define your keys within the record size or specify LINKSZ<br />
parameter if sorting variable length records.<br />
39478 M6 Failure DUPLICATED OR MISSING KEY NUMBER<br />
You must be consistent in key sequencing.<br />
39479 M7 Failure CONFLICTING ASCII TRANSLATE TABLES SPECIFIED<br />
You cannot define both 7-bit and 8-bit ASCII collating tables in the<br />
same sort program.<br />
39480 M8 Failure INCOMPATIBLE KEY TYPES FOR OVERLAPPING KEYS<br />
Keys overlap and the key type specified for the minor key is not<br />
compatible with the key type specified for the major key.<br />
39481 M9 Failure UNKNOWN RDMS ITEM DATA TYPE<br />
RDMS has initiated an extended mode sort and the RDMS item data<br />
type is unknown to <strong>Sort</strong>/<strong>Merge</strong>. This error may indicate that RDMS<br />
passed an unknown item data type or that a system incompatibility<br />
exists between the installed levels of RDMS and <strong>Sort</strong>/<strong>Merge</strong>.<br />
41008 P0 Failure SEQUENCE ERROR IN CORE MODULE<br />
An internal SORT subroutine error has occurred or a user COMP<br />
routine has returned inconsistent results.<br />
42545 S1 Failure SEQUENCE ERROR ON INPUT FILE TO MERGE<br />
The merge input is not in sorted order.<br />
44592 W0 Failure ERROR RETURNED BY SERVICE ROUTINE<br />
An I18NLIB service routine encountered an error.<br />
7831 0687–010 A–31
Summary and Diagnostic Messages<br />
UCS C<br />
Linkage<br />
BM<br />
Linkage<br />
Severity<br />
44593 W1 Failure LOCALE NOT FOUND<br />
Message Text and Description<br />
The desired locale for the sort or merge operation could not be<br />
found on the system. Please verify that the name of the locale you<br />
specified is correct and that it is installed on the system.<br />
Remember that locale names are case sensitive.<br />
44594 W2 Failure I KEY NOT ALLOWED WITH DATA REDUCTION OR USER<br />
COMPARE ROUTINE<br />
An I key type is not allowed when a data-reduction own code<br />
(DROC) or a user compare (COMP) routine is specified.<br />
44595 W3 Failure I KEY TYPE CANNOT BE USED WITH BASIC MODE SORT<br />
An I key type can only be used with an extended mode sort.<br />
44596 W4 Failure INSUFFICIENT SCRATCH FILES FOR I18N SORT<br />
The scratch files are not large enough for this I18N sort operation.<br />
The scratch file size for an I18N sort should be larger than 36 tracks.<br />
44597 W5 Failure INSUFFICIENT RECORD BANK FOR CORE ONLY I18N SORT<br />
The record bank is not large enough for this I18N core-only sort.<br />
Increase the size of the RBSIZE configuration parameter or change<br />
the operation to an extended mode disk sort.<br />
45104 X0 Failure LOGICAL ERROR IN DISK MODULE<br />
This is an internal error that indicates the <strong>Sort</strong> Subroutines have<br />
encountered an unexpected situation during a disk sort. Changing<br />
the CORE size and/or the number or size of the scratch files may<br />
avoid this situation.<br />
If you receive this error, please inform your <strong>Unisys</strong> <strong>Support</strong> Center<br />
so that this condition can be reported and potentially resolved.<br />
Please provide the runstream, input data files, and any information<br />
necessary to reproduce this problem.<br />
45105 X1 Failure STRING CONTROL TABLE BANK OVERFLOW<br />
The Extended Mode sort internal String Control Table (SCT) has<br />
overflowed. This condition is a limitation with the current design of<br />
<strong>Sort</strong>/<strong>Merge</strong> and may be avoided by increasing the CORE parameter<br />
specified or by not specifying a CORE parameter for the SORT<br />
processor. If the size specified in the CORE parameter is greater<br />
than or equal to the SORT MAXIMUM configuration parameter, that<br />
parameter must be changed before any change of the CORE<br />
parameter.<br />
If you receive this error, please inform your <strong>Unisys</strong> <strong>Support</strong> Center<br />
so that this condition can be reported and potentially resolved.<br />
Please provide the runstream, input data files, and any information<br />
necessary to reproduce this problem.<br />
45108 X4 Failure READ/WRITE ERROR ON DISK<br />
An I/O error has been detected by the Exec.<br />
A–32 7831 0687–010
UCS C<br />
Linkage<br />
BM<br />
Linkage<br />
Severity<br />
None X5 Failure CHECKSUM ERROR ON DISK<br />
Summary and Diagnostic Messages<br />
Message Text and Description<br />
A possible hardware malfunction has been detected.<br />
None X6 Failure BLOCK COUNT ERROR ON DISK<br />
A possible hardware error or a SORT subroutine internal error has<br />
been detected. Data corruption may have occurred in the working<br />
area by <strong>Sort</strong>/<strong>Merge</strong>.<br />
45111 X7 Failure SEQUENCE ERROR IN DISK MODULE<br />
An internal SORT subroutine error has occurred. Data corruption<br />
has occurred in the working area used by <strong>Sort</strong>/<strong>Merge</strong>.<br />
45112 X8 Failure INSUFFICIENT CORE FOR DISK FILES<br />
EOF CARD MISSING<br />
Increase your main storage allocation.<br />
An EOF card was not found after all the parameters had been read. The sort<br />
will continue.<br />
I/O STATUS (0xx) ON SCR FILE (file-name ) DURING A (0yy) FUNCTION<br />
Notes:<br />
where:<br />
xx<br />
is the octal I/O status.<br />
file-name<br />
yy<br />
is the internal scratch file name.<br />
is the octal function code value.<br />
1. On all internal errors, hardware errors, and I/O errors, you should rerun the sort<br />
program. If the error persists, a dump of the program, including the sort library plus<br />
any pertinent information, should be submitted as a user communication form (UCF).<br />
2. On all internal errors, hardware errors, and I/O errors, you should rerun the sort<br />
program. If the error persists, submit a UCF and provide the following information to<br />
the <strong>Support</strong> Center via RSS or FTP, or send it on an unlabeled half-inch cartridge tape<br />
in COPY,G format:<br />
• A PMD,AL after the error has occurred.<br />
• The trail sheet showing all file assignments and console messages.<br />
7831 0687–010 A–33
Summary and Diagnostic Messages<br />
• If applicable, the program and all COPY/INCLUDE procedures calling the SORT<br />
subroutines.<br />
• When possible, all input data files.<br />
• A list of all <strong>Sort</strong> CHGs applied to this level of SORT.<br />
A.3. SORT Subroutine Summary Messages<br />
The following messages are written to the system log file at sort completion.<br />
Message 1<br />
Format<br />
SORT: T/R = ttttt.tMS BIAS= bbbb.b IC= iiiiiiiiiiii OC= oooooooooooo<br />
where<br />
ttttt.t<br />
bbbb.b<br />
iiiiiiiiiiii<br />
is the wall clock time per record for this run in milliseconds.<br />
is the bias factor of the input data.<br />
is the input record count for this run.<br />
oooooooooooo<br />
is the output record count for this run.<br />
Message 2<br />
Format<br />
M1 BLOCK SIZE: xxxx MERGE POWER: yyy EQU TYPE zz<br />
M2 BLOCK SIZE: xxxx MERGE POWER: yyy EQU TYPE zz<br />
where<br />
xxxx<br />
yyy<br />
zz<br />
is the block size used in I/O operations.<br />
is the maximum merge power at the given block size.<br />
is the equipment code for the file.<br />
If only one mass storage file is assigned, only the M1 message will appear.<br />
A–34 7831 0687–010
Message 3<br />
Format<br />
tt DISK BLOCK SIZE xxxxx, yyyyy EQUIPMENT: eeee<br />
tt DISK MERGE POWER aaaa, bbbb<br />
where<br />
tt<br />
xxxxx<br />
yyyyy<br />
aaaa<br />
bbbb<br />
eeee<br />
Summary and Diagnostic Messages<br />
is either BM or EM to indicate a basic mode (BM) or extended mode (EM) disk sort.<br />
is the intermediate disk block size.<br />
is the final disk block size.<br />
is the intermediate merge power.<br />
is the final merge power.<br />
is the disk equipment type.<br />
This message occurs if three or more mass storage files are used during the sort.<br />
Message 4<br />
Format<br />
xx SORT, CORE: yyyyyyyy TOURNAMENT: zzzzzzzz ORIG RUNID: oooooo RUNID: rrrrrr<br />
where<br />
xx<br />
is BM if a basic mode sort is performed or EM if an extended mode sort is<br />
performed.<br />
yyyyyyyy<br />
zzzzzzzz<br />
is the actual amount of memory area used by the SORT subroutines.<br />
is the amount of memory in yy allocated to the sort tournament.<br />
7831 0687–010 A–35
Summary and Diagnostic Messages<br />
oooooo<br />
rrrrrr<br />
is the original run-id specified on the @RUN statement. For transactions, it is the<br />
transaction name.<br />
is the system generated run-id for the run. For transactions, it is the TIP generated<br />
run-id.<br />
A–36 7831 0687–010
Appendix B<br />
Examples of Processor Usage<br />
This appendix consists of examples using the SORT processor with various<br />
combinations of parameters to accomplish typical <strong>Sort</strong>/<strong>Merge</strong> operations.<br />
B.1. Printing the Contents of a File<br />
These examples indicate that the SORT processor can be used to print the contents of a<br />
file. The type of file is indicated by the MODE statement or by the option on the call line.<br />
Example 1<br />
The following example shows how to print a variable–blocked ANSI file:<br />
Format<br />
@SORT,K<br />
FILEIN=file-name-1 MODE=ANSI<br />
BLOCK=2<br />
RSZ=11<br />
LINKSZ=3<br />
COPY<br />
@EOF<br />
Example 2<br />
The following example shows how to print an SDF file:<br />
Format<br />
@SORT,KS<br />
FILEIN=file-name-1<br />
COPY<br />
@EOF<br />
7831 0687–010 B–1
Examples of Processor Usage<br />
B.2. <strong>Sort</strong>ing a File and Producing the Resulting<br />
Output File<br />
These examples indicate that files used as input can be sorted or merged and sent to an<br />
output file of another type.<br />
Example 1<br />
The following example shows how to create an ISAM output file sorted in ascending<br />
order from an SDF file:<br />
Format<br />
@SORT,E . E option echoes parameters<br />
FILEIN=file-name-1 MODE=SDF<br />
RSZ=120<br />
KEY=1,6,S,A<br />
DATA=ASCII<br />
FILEOUT=file-name-2 MODE=ISAM<br />
ISKEY=1,6 . Indicates the file index key<br />
@EOF<br />
Example 2<br />
The following example shows how to create an SDF file and guarantee that records with<br />
equal keys are output in the same order in which they were entered:<br />
Format<br />
@SORT,E . E option echoes parameters<br />
FILEIN=file-name-1 MODE=CARDS<br />
RSZ=120<br />
KEY=1,6,S,D<br />
DATA=ASCII<br />
FILEOUT=file-name-2 MODE=SDF<br />
PRESERVE . Preserve order of duplicate keys.<br />
@EOF<br />
Example 3<br />
The following example shows how to sort a very large variable–blocked ANSI file that is<br />
approximately in inverse order and to create an ACOB file; the records will be sorted in<br />
ascending order in the sequence: space, letters (A,a,B,b, ... ,Z,z), and numbers, followed<br />
by special characters from 0 to 0177:<br />
B–2 7831 0687–010
Format<br />
Examples of Processor Usage<br />
@SORT,E<br />
FILEIN=file-name-1 MODE=ANSI<br />
BLOCK=10 . Block size is 10 records<br />
RSZ=120 . Record size is 120 characters<br />
LINKSZ=20 . Variable-length records<br />
KEY=1,20,S,A<br />
VOLUME=LARGE<br />
SEQX=SEQB . Sequence used for ordering<br />
BIAS=INV . Records are close to inverse order<br />
FILEOUT=file-name-2 MODE=ACOB<br />
FILEID=file-id-value . Value for file-id for ACOB file<br />
LABEL=STANDARD . Standard labels are to be produced<br />
@EOF<br />
Example 4<br />
The following example shows how to sort a card file and produce an alternate print file<br />
as the output file:<br />
Format<br />
@SORT,E<br />
FILEIN=CARDS MODE=CARDS<br />
KEY=1,10,S,A<br />
FILEOUT=file-name-1 MODE=PRINT<br />
@EOF<br />
data cards to be used as input<br />
@EOF<br />
Example 5<br />
This example shows how to sort a card file containing ASCII dates in the format yymmdd<br />
(the dates 280607, 010101 and 271130 are in the 21st century).<br />
Format<br />
@SORT,E<br />
FILEIN=CARDS MODE=CARDS<br />
KEY=1,6,DATE,A .Uses the default DEFYEAR value of 28<br />
FILEOUT=file-name-1 MODE=SDF<br />
@EOF<br />
941005<br />
991231<br />
280607<br />
271130<br />
910201<br />
010101<br />
940812<br />
@EOF<br />
7831 0687–010 B–3
Examples of Processor Usage<br />
Output records<br />
280607<br />
910201<br />
940812<br />
941005<br />
991231<br />
010101<br />
271130<br />
Example 6<br />
The following example shows how to sort a card file containing ASCII dates in the format<br />
yyddd with DEFYEAR specified as 92:<br />
Format<br />
@SORT,E<br />
FILEIN=CARDS MODE=CARDS<br />
KEY=1,5,DATE,A<br />
DEFYEAR=92<br />
FILEOUT=file-name-1 MODE=SDF<br />
@EOF<br />
99231<br />
97018<br />
91365<br />
96209<br />
01001<br />
87286<br />
92001<br />
@EOF<br />
Output records<br />
92001<br />
96209<br />
97018<br />
99231<br />
01001<br />
87286<br />
91365<br />
B–4 7831 0687–010
B.3. Merging Files into One Output File<br />
Example 1<br />
Examples of Processor Usage<br />
The following example shows how to merge three MSAM input files and create an<br />
ACOB output file:<br />
Format<br />
@SORT,E<br />
FILESIN=file-name-1,file-name-2,file-name-3 MODE=MSAM<br />
RSZ=33,WORDS<br />
KEY=10,20,S,A,1 . Multiple keys are defined<br />
KEY=1,8,S,A,2<br />
KEY=30,34,S,A,3<br />
FILEOUT=file-name-4 MODE=ACOB<br />
MERGE<br />
@EOF<br />
Example 2<br />
The following example shows how to merge an ACOB file and a MSAM file into a<br />
PRINT$ output file:<br />
Format<br />
@SORT,E<br />
FILEIN=file-name-1 MODE=ACOB<br />
FILEIN=file-name-2 MODE=MSAM<br />
KEY=1,8,S,A<br />
RSZ=33,WORDS . Record size is in words<br />
FILEOUT=PRINT MODE=PRINT<br />
MERGE<br />
@EOF<br />
B.4. Selecting a Certain Classification of Records<br />
These examples demonstrate ways the SORT processor can be used to sort, merge, or<br />
copy selected records that meet specific criteria from the input file.<br />
Example 1<br />
The following example shows how to print records 5 through 20 of an ACOB file:<br />
Format<br />
@SORT,K<br />
FILE=file-name-1 MODE=ACOB<br />
SKIPL=4 . Skip first 4 records<br />
NUMREC=16 . Process 16 records<br />
COPY<br />
@EOF<br />
7831 0687–010 B–5
Examples of Processor Usage<br />
Example 2<br />
The following example shows how to sort the records from an ACOB file whose value in<br />
word 3 of the record is less than or equal to 126894 and greater than 11000; the<br />
selected records will be sorted on the Fieldata key in word 1 and output to another<br />
ACOB file:<br />
Format<br />
@SORT,E<br />
FILEIN=file-name-1 MODE=ACOB<br />
ALLOW=3,G,11000,D<br />
REJECT=3,G,126894,D<br />
KEY=1,6,A,A<br />
DATA=FIELDATA<br />
FILEOUT=file-name-2 MODE=ACOB<br />
@EOF<br />
Example 3<br />
The ACCEPT parameter can perform the same type of record selection as ALLOW and<br />
REJECT but is more powerful and flexible. The following example sorts the ASCII<br />
records between 21000 and 80000 or less than 10000:<br />
Input records<br />
00021132<br />
00010321<br />
00092997<br />
00003776<br />
00086344<br />
00054942<br />
00062734<br />
00021195<br />
00072649<br />
00016150<br />
Format<br />
@SORT<br />
FILEIN=file-name-1 MODE=SDF<br />
FILEOUT=file-name-2 MODE=SDF<br />
ACCEPT=4,2,ASC,G,20,AND<br />
ACCEPT=4,2,ASC,L,80,OR<br />
ACCEPT=4,1,ASC,E,0<br />
KEY=1,8,S,A<br />
@EOF<br />
Output records<br />
00003776<br />
00021132<br />
00021195<br />
00054942<br />
00062734<br />
00072649<br />
B–6 7831 0687–010
Example 4<br />
Examples of Processor Usage<br />
SORT can be used to reduce records to significant fields before they are used as input to<br />
the sort phase. The fields are specified with the SELECT parameter. The output records<br />
contain only the extracted fields.<br />
The following are the input records for the SELECT examples that follow them:<br />
abcdefghijklmnopqrstuvwxyz<br />
12345678901234567890123456<br />
ABCDEFGHIJKLMNOPQRSTUVWXYZ<br />
fthkiswixsiutqhemreigsurlt<br />
AAAAAA<br />
FFFFFF<br />
Example 4a<br />
@SORT<br />
DATA=ASCII<br />
FILEIN=IN MODE=CARDS<br />
FILEOUT=PRINT MODE=PRINT<br />
SELECT=2,2:5,2:8,1,6:10,1:13,1,9:15,2:18,2,13:22,2:25,2<br />
KEY=1,6,S,A<br />
@EOF<br />
Output records<br />
2356 80 356 892356<br />
AAAA<br />
BCEF HJ MOP RSVWYZ<br />
FFFF<br />
bcef hj mop rsvwyz<br />
this is the result<br />
Example 4b<br />
@SORT<br />
DATA=ASCII<br />
FILEIN=IN MODE=CARDS<br />
FILEOUT=PRINT MODE=PRINT<br />
SELECT=1,1,10:3,1:5,1:6,1,18:9,1:18,3<br />
KEY=1,6,S,A<br />
@EOF<br />
Output records<br />
135 69890<br />
AAA A<br />
ACE FIRST<br />
FFF F<br />
ace first<br />
fhi sxrei<br />
7831 0687–010 B–7
Examples of Processor Usage<br />
B.5. Determining or Assigning Scratch Facilities<br />
Example 1<br />
The following example shows how to perform a main–storage–only sort of a small SDF<br />
file by the first word of each record:<br />
Format<br />
@SORT,Y . Y option causes a main-storage-only sort<br />
FILE=file-name-1<br />
FILEOUT=file-name-2<br />
MODE=SDF<br />
KEY=1,4,S,A<br />
SORT . <strong>Sort</strong> operation is the default.<br />
@EOF<br />
Example 2<br />
The following example shows how to perform the same job as the previous example,<br />
explicitly specifying 24,000 words of main storage:<br />
Format<br />
@SORT,Y<br />
FILEIN=file-name-1<br />
FILEOUT=file-name-2<br />
MODE=SDF<br />
KEY=1,4,S,A<br />
SORT<br />
CORE=24K . K causes multiplication by 1000.<br />
@EOF<br />
Example 3<br />
The following example shows how to sort an SDF file that contains approximately 8<br />
million words of data:<br />
Format<br />
@SORT<br />
FILEIN=file-name-1<br />
FILEOUT=file-name-2<br />
MODE=SDF<br />
KEY=1,4,S,A . 8 million is MEDIUM. <strong>Sort</strong> will<br />
SORT . assign scratch files based on<br />
VOLUME=MEDIUM . this VOLUME parameter.<br />
@EOF<br />
B–8 7831 0687–010
Example 4<br />
Examples of Processor Usage<br />
The following example shows how to perform the same job as in the preceding<br />
example, with 400,000 records of 20 words each:<br />
Format<br />
@SORT<br />
FILEIN=file-name-1<br />
FILEOUT=file-name-2<br />
MODE=SDF<br />
KEY=1,4,S,A<br />
SORT . <strong>Sort</strong> will calculate volume from<br />
RSZ=20,WORDS . RSZ and RECORD parameters.<br />
RECORD=400 . (thousands of records)<br />
@EOF<br />
Example 5<br />
The following example shows how to perform a similar sort of 15,000 records by using<br />
one–level mass storage (M1) sort:<br />
Format<br />
@SORT,X . X option for M1 only.<br />
FILEIN=file-name-1<br />
FILEOUT=file-name-2<br />
MODE=SDF<br />
KEY=1,3,S,A<br />
DRUM=F . <strong>Sort</strong> will determine size needed.<br />
RECORD=15 . Provides sort with volume information.<br />
RSZ=20,WORDS<br />
@EOF<br />
Example 6<br />
The following example shows how to perform a disk sort with four disk files, each file 45<br />
tracks. <strong>Sort</strong> assigns the files according to the optional size specification and frees the<br />
files before terminating.<br />
Format<br />
@SORT<br />
FILEIN=file-name-1<br />
FILEOUT=file-name-2<br />
MODE=SDF<br />
KEY=1,3,S,A<br />
DISKS=4,F33,TRK,45<br />
RSZ=80,CHARACTERS<br />
@EOF<br />
7831 0687–010 B–9
Examples of Processor Usage<br />
Example 7<br />
The following example has the same effect as the previous example except that sort<br />
does not free the scratch files:<br />
Format<br />
@ASG,T XC.,F33//TRK/45<br />
@ASG,T XD.,F33//TRK/45<br />
@ASG,T XE.,F33//TRK/45<br />
@ASG,T XF.,F33//TRK/45<br />
@SORT<br />
FILEIN=file-name-1<br />
FILEOUT=file-name-2<br />
MODE=SDF<br />
KEY=1,3,S,A<br />
RSZ=80,CHARACTERS<br />
@EOF<br />
B.6. Performing a TAG/RETRIEVE <strong>Sort</strong><br />
Example 1<br />
The following example shows how to do a tag sort on an ACOB file. The tag file<br />
produced is later referenced by a RETRIEVE operation to produce the final output file.<br />
Format<br />
@SORT,EA<br />
FILEIN=file-name-1 BLOCK=4<br />
TAGFILE=tag-file-name<br />
RSZ=800<br />
KEY=8,10,S,A<br />
TAG=8,10<br />
BIAS=AVG<br />
VOLUME=SMALL<br />
DISKS=3<br />
@EOF<br />
Example 2<br />
The following example shows how to do the RETRIEVE operation of the tag file created<br />
in the preceding example and produce the sorted file. Note that neither the input file nor<br />
the tag file is changed from the TAG operation.<br />
Format<br />
@SORT,EA<br />
FILEIN=file-name-1 BLOCK=4<br />
TAGFILE=tag-file-name<br />
RSZ=800<br />
KEY=8,10,S,A<br />
FILEOUT=file-name-2<br />
RETRIEVE<br />
@EOF<br />
B–10 7831 0687–010
Examples of Processor Usage<br />
The TAG and RETRIEVE operations can both be within the same sort execution. If this is<br />
the case, then the FILEIN, the TAGFILE (unless the default of the temporary tag file<br />
TAG$FILE is used), and the FILEOUT parameters should all be used.<br />
B.7. Creating or Reading Indexed Files<br />
Example 1<br />
The following example creates an ISAM file with the index keys extracted from the<br />
records:<br />
Input records<br />
123456789012<br />
RECKKKKRRRRR<br />
Format<br />
@SORT<br />
FILEIN=file-name-1 MODE=CARDS<br />
FILEOUT=file-name-2 MODE=ISAM SPLIT . Separate key from record<br />
ISKEY=4,4<br />
KEY=4,4,S,A<br />
RSZ=12,CHARACTERS . Use input-record size<br />
LINKSZ=12,CHARACTERS<br />
@EOF<br />
Output records<br />
12389012<br />
RECRRRRR<br />
Example 2<br />
The following example reads the ISAM file created in the preceding example and creates<br />
a new file with the index keys replaced in the records:<br />
Input records<br />
12389012<br />
RECRRRRR<br />
Format<br />
@SORT<br />
FILEIN=file-name-2 MODE=ISAM JOIN . Replace keys in records<br />
FILEOUT=file-name-3 MODE=CARDS<br />
COPY<br />
RSZ=12,CHARACTERS . Use size of record<br />
LINKSZ=12,CHARACTERS . Combined with key<br />
@EOF<br />
Output records<br />
456712389012<br />
KKKKRECRRRRR<br />
7831 0687–010 B–11
Examples of Processor Usage<br />
B.8. Dynamically Assigning the Output File<br />
Example 1<br />
The following example dynamically assigns the output file:<br />
Format<br />
@SORT<br />
FILEIN=INFILE<br />
FILEOUT=OUTFILE,FREE,CP,F30/100/TRK/1000 . Assign syntax for output file<br />
KEY=9,4,S,A<br />
MODE=SDF<br />
RSZ=80,CHARACTERS<br />
@EOF<br />
The output file, OUTFILE, is assigned by the SORT processor in the following manner:<br />
@ASG,CP OUTFILE.,F30/100/TRK/1000<br />
The output file is not assigned until the records are returned from the sort. The FREE<br />
option means that OUTFILE is freed (@FREE) when the sort completes.<br />
B.9. Specifying Overlapping Keys<br />
The following example performs a sort in which three overlapping keys are specified:<br />
Format<br />
@SORT<br />
FILEIN=IN1 MODE=SDF<br />
FILEOUT=OUT1 MODE=SDF<br />
KEY=9,4,S,A:5,16,S,A:17,8,U,A<br />
RSZ=10,WORDS<br />
@EOF<br />
All three of the specified keys overlap. This is allowable when the key types are<br />
compatible.<br />
B.10. Performing an Extended Mode <strong>Sort</strong><br />
Example 1<br />
The following example shows how to perform a main–storage–only sort using 1,048,576<br />
words of main storage:<br />
Format<br />
@SORT,Y<br />
FILEIN=file-name-1<br />
FILEOUT=file-name-2<br />
MODE=SDF<br />
RSZ=20,WORDS . Records are 20 words in length<br />
KEY=1,4,S,A<br />
CORE=1M . Specify 1,048,576 words of main-storage<br />
@EOF . End of SORT parameters<br />
B–12 7831 0687–010
Example 2<br />
Examples of Processor Usage<br />
Let the processor determine the CORE amount by volume calculations. This example<br />
assumes that the AUTOMATIC configuration parameter is set to YES. A basic mode sort<br />
is performed if AUTOMATIC is set to NO.<br />
Format<br />
@SORT<br />
FILEIN=file-name-1<br />
FILEOUT=file-name-2<br />
MODE=SDF<br />
RSZ=20,WORDS . Records are 20 words in length<br />
KEY=1,4,S,A<br />
RECORD=100 . Large volume causes extended mode CORE to be used.<br />
@EOF . End of SORT parameters<br />
Example 3<br />
This example is the same as the previous example but with the AUTOMATIC<br />
configuration parameter set to NO. A basic mode CORE amount would be determined<br />
based on volume calculations, however the ESORT parameter is specified to force the<br />
extended mode sort.<br />
Format<br />
@SORT<br />
FILEIN=file-name-1<br />
FILEOUT=file-name-2<br />
MODE=SDF<br />
RSZ=20,WORDS . Records are 20 words in length<br />
KEY=1,4,S,A<br />
RECORD=100 . Indicate sort volume.<br />
ESORT . Perform Extended Mode sort.<br />
@EOF . End of SORT parameters<br />
7831 0687–010 B–13
Examples of Processor Usage<br />
B–14 7831 0687–010
Appendix C<br />
Sample Programs Using Common Bank<br />
Interface<br />
This appendix contains a sample MASM program that uses the common bank interface<br />
to access the SORT subroutines as a common bank.<br />
Basically, this program reads records from READ$ (a symbiont file), then sorts and<br />
displays these records at PRINT$ (also a symbiont file). It also specifies a disk sort using<br />
the FILES parameters since this is more efficient than specifying a mass storage sort.<br />
Before you view the actual program, a brief explanation follows to help you to<br />
understand how the common bank is used to access SORT subroutines.<br />
Explanation<br />
When you access SORT subroutines using the common bank interface, you have the<br />
following advantages:<br />
• SORT subroutine modifications are easier to apply because calling programs do not<br />
need to be re–collected.<br />
• Universal compiling systems and object modules have access to the SORT<br />
subroutine common bank.<br />
The standard and extended sort linkages (described in Section 6) access the sort<br />
relocatable subroutines while the common bank sort linkages access the common bank<br />
entry points.<br />
While existing programs need no change to access the sort relocatable subroutines,<br />
MASM procedures should be used to access the sort common bank. Using these<br />
procedures generates the calls needed to access the SORT subroutine. Using a<br />
$INCLUDE 'RPROC$' MASM statement makes the procedures available.<br />
7831 0687–010 C–1
Sample Programs Using Common Bank Interface<br />
When working with the sort common data bank you must<br />
• Add the $INCLUDE 'RPROC$' MASM statement.<br />
• Use the following sort procedures:<br />
− R$MGOPNCB<br />
− R$MGRELCB<br />
− R$MGREQCB<br />
− R$OPNCB<br />
− R$QENDCB<br />
− R$RELCB<br />
− R$RETCB<br />
− R$SORTCB<br />
• Reserve a minimum of 02200 words for the D–bank before using the R$OPNCB<br />
procedure. Register X9 must point to this D–bank on each sort call.<br />
Sample Program<br />
The following sample program uses the SORT common-banked MASM linkages:<br />
--------------------------------------------------------------------------------------------------------<br />
1000. /<br />
1010. AXR$<br />
1020. $INCLUDE 'RPROC$'<br />
1030. PF $FORM 12,6,18<br />
1040. .<br />
1050. $(1),START<br />
1060. .******************************************************<br />
1070. .** R$OPNCB initializes the sort and loads the X9 **<br />
1080. .** register with the Dbank size and address. **<br />
1090. .** Register A3 is loaded with the parameter table **<br />
1100. .** address. This is the only call requiring the **<br />
1110. .** Dbank size to be specified in X9. **<br />
1120. .******************************************************<br />
1130. .<br />
1140. R$OPNCB,DBANKSIZE,DBANK PARAMS . INITIALIZE SORT SUBROUTINES<br />
1150. .<br />
1160. . ********************************************************<br />
1170. . **The RELEASE routine reads records from READ$ and **<br />
1180. . **releases them to the sort. **<br />
1190. . **The same Dbank address is specified in X9 - Notice **<br />
1200. . **that no size value is required. A0 is loaded with **<br />
1210. . **the record size and address. **<br />
1220. . ********************************************************<br />
1230. RELEASE<br />
1240. . GET INPUT RECORD.<br />
1250. R$EAD (SORT,BUF) . ON END-OF-FILE, GO TO SORT.<br />
1260. R$RELCB,DBANK (RSZ,BUF) . PASS RECORD TO SORT<br />
1270. J RELEASE . GET ANOTHER RECORD.<br />
1280. /<br />
1290. . ********************************************************<br />
1300. . **The SORT routine takes the records released to it **<br />
1310. . **through the RELEASE routine and begins sorting. **<br />
1320. . **Again, only the Dbank address is specified through **<br />
C–2 7831 0687–010
Sample Programs Using Common Bank Interface<br />
1330. . **the X9 register. **<br />
1340. . ********************************************************<br />
1350. SORT<br />
1360. P$RINT (PF 1,MSG1L,MSG1) . PRINT 'ALL RECORDS RELEASED'<br />
1370. R$SORTCB,DBANK . BEGIN SORTING<br />
1380. RETRIEVE<br />
1390. . ********************************************************<br />
1400. . **Here, in the RETRIEVE routine, the sort returns the **<br />
1410. . **sorted output records. At the end-of-file, control **<br />
1420 . **is passed to the EOF routine. **<br />
1430. . ********************************************************<br />
1440. R$RETCB,DBANK EOF . RECORD IS RETURNED FROM SORT.<br />
1450. LXI,U A0,0 . PREPARE TO PRINT RECORD.<br />
1460. AA A0,((01*/24)++(RSZ*/18)) . SET LINE SPACE AND RECSIZE.<br />
1470. ER PRINT$ . DISPLAY RECORD TO PRINT$.<br />
1480. J RETRIEVE . GO GET NEXT RECORD FROM SORT.<br />
1490. .<br />
1500. EOF<br />
1510. P$RINT (PF 1,MSG2L,MSG2) . PRINT 'SORT END-OF-FILE'<br />
1520. ER EXIT$<br />
1530. $(2)<br />
1540. RSZ $EQU 13 . RECSIZE IN WORDS<br />
1550. . ******************************************************************<br />
1560. . **The PARAMS statement performs the following: **<br />
1570. . ** **<br />
1580. . **Builds the sort parameter table using the R$FILE procedure **<br />
1590. . ** **<br />
1600. . **Establishes the FPOC and LPOC labels as user-program **<br />
1610. . **entry points. **<br />
1620. . ** **<br />
1630. . **Generates a BDIREF$ allowing FPOC and LPOC to be collected **<br />
1640. . **into different banks. **<br />
1650. . ** **<br />
1660. . **Reserves 50000 words (via the CORE parameter) in the user's **<br />
1670. . **Dbank for sort work area. **<br />
1680. . ** **<br />
1690. . **Establishes the FILES parameter used to specify 3 scratch **<br />
1700. . **files for a disk sort. These files must be assigned by the **<br />
1710. . **user before the sort begins. **<br />
1720. . ******************************************************************<br />
1730. PARAMS R$FILE ;<br />
1740. 'RSZ',RSZ*6 ;<br />
1750. 'KEY',1,20,'A' ;<br />
1760. 'CORE',50000 ;<br />
1770. 'FILES','XC,'XD','XE' ;<br />
1780. 'FPOC',RELEASE ;<br />
1790. 'LPOC',RETRIEVE ;<br />
1800.<br />
1810. DBANK $RES 02200 . A MINIMUM 02200 OCTAL WORD<br />
1820. DBANKSIZE $EQU $-DBANK . DBANK MUST BE PASSED TO THE<br />
1830. . SORT CB.<br />
1840. /<br />
1850. . The following are just informational messages to be displayed during<br />
1860. . the sample execution<br />
1870. .<br />
1880. BUF RES RSZ . INPUT BUFFER<br />
1890. MSG1 'ALL RECORDS HAVE BEEN RELEASED TO SORT.'<br />
1900. MSG1L $EQU $-MSG1<br />
1910. .<br />
1920. MSG2 'SORT END-OF-FILE EXIT TAKEN.'<br />
7831 0687–010 C–3
Sample Programs Using Common Bank Interface<br />
1930. MSG2L $EQU $-MSG2<br />
1940. /<br />
1950. . ******************************************************************<br />
1960. . **RPROC$ procedures are flexible and addresses can be specified **<br />
1970. . **using X registers as follows: **<br />
1980. . ******************************************************************<br />
1990. LX,U X3,PARAMS-5 . SORT PARAMETER TABLE ADDRESS<br />
2000. LX,U X4,DBANK-9 . DBANK ADDRESS<br />
2010. R$OPNCB,DBANKSIZE,9,X4 5,X3<br />
2020. .<br />
2030. .<br />
2040. .<br />
2050. . ******************************************************************<br />
2060. . **Registers can be loaded by the user rather than the **<br />
2070. . **procedure as follows: **<br />
2080. ******************************************************************<br />
2090. LX X9,(DBANKSIZE,DBANK)<br />
2100. LA,U A3,PARAMS<br />
2110. R$OPNCB<br />
2120. .<br />
2130. .<br />
2140. .<br />
2150. . ******************************************************************<br />
2160. . **This example can be directed to perform an Extended Mode **<br />
2170. . **sort by making the following changes: **<br />
2180. ******************************************************************<br />
2190. .<br />
2200. R$RETCB,DBANK EOF BUF . Add output record area 'BUF'<br />
2210. . to the RETRIEVE routine.<br />
2220. .<br />
2230. 'CORE',300000 . Increase the core area to a<br />
2240. . size that causes an Extended<br />
2250. . Mode sort to be performed.<br />
2260. .<br />
2270. END START<br />
--------------------------------------------------------------------------------------------------------<br />
C–4 7831 0687–010
Appendix D<br />
Sample Programs with UCS C Program<br />
Linkages<br />
This appendix contains sample Universal Compiling System (UCS) C programs that use<br />
the UCS C program linkages to access the SORT subroutines.<br />
D.1. Sample <strong>Sort</strong> Program<br />
This sample program illustrates the use of UCS C linkages in a UCS C program to<br />
perform a sort operation. This program reads and releases records to the sort operation<br />
until an end-of-file status occurs when reading from the input file. Records are returned<br />
from the sort operation until an at-end condition is returned from the sort operation. Any<br />
errors that occur during the sort operation cause an error code to be displayed and the<br />
program to exit. Explanation of the program contents is recorded in the program code as<br />
comments.<br />
#include <br />
#include <br />
#define MAXLINE 80<br />
/* */<br />
/* Make the <strong>Sort</strong>/<strong>Merge</strong>-supplied typedefs, constant definitions, */<br />
/* and function prototypes available. */<br />
/* */<br />
#include <br />
#include <br />
main() {<br />
FILE *fp;<br />
char line[MAXLINE];<br />
/* */<br />
/* Allocate an area that will contain scratch file names used by */<br />
/* the FILES parameter. */<br />
/* */<br />
char file_list[36];<br />
/* */<br />
/* Use the <strong>Sort</strong>/<strong>Merge</strong> typedef sm_result_status_type to allocate the*/<br />
/* result status packet. */<br />
/* */<br />
sm_result_status_type my_result_status;<br />
/* */<br />
/* Use the <strong>Sort</strong>/<strong>Merge</strong> typedef sm_record_packet_type to allocate the*/<br />
/* record packet used for releasing and returning records. */<br />
/* */<br />
sm_record_packet_type my_record_packet;<br />
7831 0687–010 D–1
Sample Programs with UCS C Program Linkages<br />
/* */<br />
/* Allocate an area that will contain the sort operation */<br />
/* identifier. It is filled in during the sort open */<br />
/* phase and passed to all other sort phases to continue the same */<br />
/* sort operation. */<br />
/* */<br />
int dbank;<br />
int i, *int_ptr;<br />
/* */<br />
/* Use selected <strong>Sort</strong>/<strong>Merge</strong> parameter typedefs to create a structure*/<br />
/* that represents the parameter table. */<br />
/* */<br />
struct { sm_start_parameter_type start_parameter;<br />
sm_core_parameter_type core_parameter;<br />
sm_rsz_parameter_type rsz_parameter;<br />
sm_key_parameter_type key_parameter;<br />
sm_files_parameter_type files_parameter;<br />
sm_end_parameter_type end_parameter; } my_prm_table;<br />
/* */<br />
/* Initialize or clear the parameter table and record packet */<br />
/* */<br />
int_ptr=(int *)&my_prm_table;<br />
for (i=0; i < (sizeof (my_prm_table)/4); i++) *int_ptr++ = 0;<br />
int_ptr=(int *)&my_record_packet;<br />
for (i=0; i < (sizeof (my_record_packet)/4); i++) *int_ptr++ = 0;<br />
/* */<br />
/* Fill in the parameter table entries as follows. */<br />
/* - The first parameter is the START parameter, version 1 of the */<br />
/* parameter table is being used. */<br />
/* - The second parameter is the CORE parameter. The core size is */<br />
/* 1000000 words and a core area has not been allocated by the */<br />
/* user program. */<br />
/* - The third parameter is the RSZ parameter. A record size of */<br />
/* MAXLINE characters is being used. */<br />
/* - The fourth parameter is the KEY parameter. The key fields */<br />
/* are: */<br />
/* - The key type is ASCII alphanumeric (sm_s) */<br />
/* - The key order is ascending (sm_ascending) */<br />
/* - The start character position is one, the */<br />
/* sm_start_char_to_start_word macro is used to determine */<br />
/* the start_word value, and the sm_start_char_to_start_bit */<br />
/* is used to determine the start_bit value. */<br />
/* - The number of characters is four, the */<br />
/* sm_char_count_to_bit_count macro is used to determine the */<br />
/* bit_count value */<br />
/* - field_number is not being used */<br />
/* - The fifth parameter is the FILES parameter. The three file */<br />
/* names are first put into the area allocated for the file */<br />
/* names; each is twelve characters, left justified and space filled. */<br />
/* - The sixth parameter is the END parameter; */<br />
D–2 7831 0687–010
Sample Programs with UCS C Program Linkages<br />
/* */<br />
my_prm_table.start_parameter.code = sm_start;<br />
my_prm_table.start_parameter.version = 1;<br />
my_prm_table.core_parameter.code = sm_core;<br />
my_prm_table.core_parameter.size = 1000000;<br />
my_prm_table.core_parameter.sm_address = sm_ptr_conversion(NULL);<br />
my_prm_table.rsz_parameter.code = sm_rsz;<br />
my_prm_table.rsz_parameter.size = MAXLINE;<br />
my_prm_table.rsz_parameter.size_type = sm_char;<br />
my_prm_table.key_parameter.code = sm_key;<br />
my_prm_table.key_parameter.key_type = sm_s;<br />
my_prm_table.key_parameter.order = sm_ascending;<br />
my_prm_table.key_parameter.start_word=<br />
sm_start_char_to_start_word(1,sm_s);<br />
my_prm_table.key_parameter.start_bit =<br />
sm_start_char_to_start_bit(1,sm_s);<br />
my_prm_table.key_parameter.bit_count =<br />
sm_char_count_to_bit_count(4,sm_s);<br />
my_prm_table.key_parameter.field_number = 0;<br />
my_prm_table.key_parameter.code_1 = sm_continuation;<br />
my_prm_table.key_parameter.code_2 = sm_continuation;<br />
strcpy(file_list,"xc ");<br />
strcpy(file_list+12,"xd ");<br />
strcpy(file_list+24,"xe ");<br />
my_prm_table.files_parameter.code = sm_files;<br />
my_prm_table.files_parameter.number_of_files = 3;<br />
my_prm_table.files_parameter.character_type = sm_ascii;<br />
my_prm_table.files_parameter.sm_address = sm_ptr_conversion(file_list);<br />
my_prm_table.end_parameter.code = sm_end;<br />
/* */<br />
/* Open the sort operation. */<br />
/* */<br />
SRTOPEN(&my_result_status, &dbank, &my_prm_table);<br />
if (my_result_status.message_id != sm_ok)<br />
goto error_exit;<br />
/* */<br />
/* Open the input file. */<br />
/* */<br />
if ((fp = fopen("sortin", "r")) == NULL) {<br />
printf("*ERROR: can't open SORTIN\n");<br />
return(1);<br />
}<br />
/* */<br />
/* Put all required values in the record packet. The same record */<br />
/* packet and values will be used for both the release and the */<br />
/* return record phase. */<br />
/* */<br />
my_record_packet.version = 1;<br />
my_record_packet.type = sm_single_record;<br />
my_record_packet.subtype = sm_single_record;<br />
my_record_packet.record_gran = sm_word;<br />
my_record_packet.buffer_gran = sm_word;<br />
7831 0687–010 D–3
Sample Programs with UCS C Program Linkages<br />
my_record_packet.record_length = MAXLINE / 4;<br />
my_record_packet.buffer_length = MAXLINE / 4;<br />
/* */<br />
/* Release all records from the input file to the sort. */<br />
/* */<br />
while (fgets(line, MAXLINE, fp) != NULL) {<br />
SRTRELEASE(&my_result_status, &dbank, &my_record_packet, &line);<br />
if (my_result_status.message_id != sm_ok)<br />
goto error_exit;<br />
}<br />
fclose(fp);<br />
/* */<br />
/* End the release phase. */<br />
/* */<br />
SRTSORT(&my_result_status, &dbank);<br />
if (my_result_status.message_id != sm_ok)<br />
goto error_exit;<br />
/* */<br />
/* Open the output file. */<br />
/* */<br />
if ((fp = fopen("sortout", "w")) == NULL) {<br />
printf("*ERROR: can't open SORTOUT\n");<br />
return(1);<br />
}<br />
/* */<br />
/* Return all records from the SORT subroutines, the severity_code */<br />
/* field value of 2 and the message_id field value of sm_eof */<br />
/* (0777776) in the result status packet signifies that all records*/<br />
/* have been returned. */<br />
/* */<br />
while (my_result_status.message_id == sm_ok) {<br />
SRTRETURN(&my_result_status, &dbank, &my_record_packet, &line);<br />
if (my_result_status.message_id == sm_ok) {<br />
fputs(line, fp);<br />
}<br />
}<br />
if (my_result_status.message_id == sm_eof) {<br />
fclose(fp);<br />
printf("SORT is finished.\n");<br />
return(0);<br />
}<br />
/* */<br />
/* Handle error situation returned by the SORT linkage. */<br />
/* - Print the error code returned by the SORT linkage. */<br />
/* - Close the sort operation (cause the SORT subroutines to delete*/<br />
/* any of its storage areas that may still exist). This step is */<br />
/* not required because the program immediately exits but it */<br />
/* may be a desirable step if it is necessary to clean up */<br />
/* unused data areas. */<br />
/* */<br />
D–4 7831 0687–010
Sample Programs with UCS C Program Linkages<br />
error_exit:<br />
printf("*ERROR: sort linkage returned error code %u\n",<br />
my_result_status.message_id);<br />
SRTCLOSE(&my_result_status, &dbank);<br />
return(1);<br />
}<br />
D.2. Sample <strong>Merge</strong> Program<br />
This sample program illustrates the use of UCS C linkages in a UCS C program to<br />
perform a merge operation. This program merges the contents of two input files into a<br />
different output file. Any errors that occur during the merge operation cause an error<br />
code to be displayed and the program to exit. Further explanation of the program<br />
contents is recorded in the program code as comments.<br />
#include <br />
#include <br />
/* */<br />
/* Make the <strong>Sort</strong>/<strong>Merge</strong>-supplied typedefs, constant definitions, and*/<br />
/* function prototypes available. */<br />
/* */<br />
#include <br />
#include <br />
#define MAXLINE 80<br />
main() {<br />
FILE *fp_1, *fp_2, *fp_o;<br />
char in_line[MAXLINE];<br />
char out_line[MAXLINE];<br />
void *line_ptr;<br />
/* */<br />
/* Use the <strong>Sort</strong>/<strong>Merge</strong> typedef sm_result_status_type to allocate */<br />
/* the result status packet. */<br />
/* */<br />
sm_result_status_type my_return_status;<br />
/* */<br />
/* Use the <strong>Sort</strong>/<strong>Merge</strong> typedef sm_record_packet_type to allocate */<br />
/* the record packet used for releasing and requesting records. */<br />
/* */<br />
sm_record_packet_type my_record_packet;<br />
/* */<br />
/* Allocate an area that will contain the merge operation */<br />
/* identifier. It is filled in during the merge open phase and */<br />
/* passed to all other merge phases to continue the same merge */<br />
/* operation. */<br />
/* */<br />
int dbank;<br />
int i, *int_ptr;<br />
/* */<br />
/* Use selected <strong>Sort</strong>/<strong>Merge</strong> parameter typedefs to create a structure*/<br />
/* that represents the parameter table. */<br />
/* */<br />
struct {<br />
7831 0687–010 D–5
Sample Programs with UCS C Program Linkages<br />
sm_start_parameter_type start_parameter;<br />
sm_rsz_parameter_type rsz_parameter;<br />
sm_key_parameter_type key_parameter;<br />
sm_end_parameter_type end_parameter; } my_prm_table;<br />
/* */<br />
/* Initialize or clear the parameter table and record packet */<br />
/* */<br />
int_ptr=(int *)&my_prm_table;<br />
for (i=0; i < (sizeof (my_prm_table)/4); i++) *int_ptr++ = 0;<br />
int_ptr=(int *)&my_record_packet;<br />
for (i=0; i < (sizeof (my_record_packet)/4); i++) *int_ptr++ = 0;<br />
/* */<br />
/* Fill in the parameter table entries as follows: */<br />
/* - The first parameter is the START parameter, version 1 of the */<br />
/* parameter table is being used. */<br />
/* - The second parameter is the RSZ parameter. A record size of */<br />
/* MAXLINE characters is being used. */<br />
/* - The third parameter is the KEY parameter. The key fields */<br />
/* are: */<br />
/* - The key type is ASCII alphanumeric (sm_s) */<br />
/* - The key order is ascending (sm_ascending) */<br />
/* - The start character position is one, the */<br />
/* sm_start_char_to_start_word macro is used to determine */<br />
/* the start_word value, and the sm_start_char_to_start_bit */<br />
/* is used to determine the start_bit value */<br />
/* - The number of characters is four, the */<br />
/* sm_char_count_to_bit_count macro is used to determine the */<br />
/* bit_count value */<br />
/* - field_number is not being used */<br />
/* - The fourth parameter is the END parameter; */<br />
/* */<br />
my_prm_table.start_parameter.code = sm_start;<br />
my_prm_table.start_parameter.version = 1;<br />
my_prm_table.rsz_parameter.code = sm_rsz;<br />
my_prm_table.rsz_parameter.size = MAXLINE;<br />
my_prm_table.rsz_parameter.size_type = sm_char;<br />
my_prm_table.key_parameter.code = sm_key;<br />
my_prm_table.key_parameter.key_type = sm_s;<br />
my_prm_table.key_parameter.order = sm_ascending;<br />
my_prm_table.key_parameter.start_word =<br />
sm_start_char_to_start_word(1,sm_s);<br />
my_prm_table.key_parameter.start_bit =<br />
sm_start_char_to_start_bit(1,sm_s);<br />
my_prm_table.key_parameter.bit_count =<br />
sm_char_count_to_bit_count(8,sm_s);<br />
my_prm_table.key_parameter.field_number = 0;<br />
my_prm_table.key_parameter.code_1 = sm_continuation;<br />
my_prm_table.key_parameter.code_2 = sm_continuation;<br />
my_prm_table.end_parameter.code = sm_end;<br />
printf("MERGE is beginning.\n");<br />
D–6 7831 0687–010
Sample Programs with UCS C Program Linkages<br />
/* */<br />
/* Open the merge operation. */<br />
/* */<br />
MRGOPEN(&my_return_status, &dbank, &my_prm_table);<br />
if (my_return_status.message_id != sm_ok)<br />
goto error_exit;<br />
/* */<br />
/* Open the input files. */<br />
/* */<br />
if ((fp_1 = fopen("f1", "r")) == NULL) {<br />
printf("*ERROR: can't open FILE-1\n");<br />
return(1);<br />
}<br />
if ((fp_2 = fopen("f2", "r")) == NULL) {<br />
printf("*ERROR: can't open FILE-2\n");<br />
return(1);<br />
}<br />
/* */<br />
/* Put values in the record packet. The same record packet and */<br />
/* values will be use for both the release and return record phase.*/<br />
/* */<br />
my_record_packet.version = 1;<br />
my_record_packet.type = sm_single_record;<br />
my_record_packet.subtype = sm_single_record;<br />
my_record_packet.record_gran = sm_word;<br />
my_record_packet.buffer_gran = sm_word;<br />
my_record_packet.record_length = MAXLINE / 4;<br />
my_record_packet.buffer_length = MAXLINE / 4;<br />
/* */<br />
/* Read one record from each input file and release it to the merge*/<br />
/* operation. The input file is identified by setting the file_id */<br />
/* field in the record packet. */<br />
/* */<br />
if (fgets(in_line, MAXLINE, fp_1) != NULL) {<br />
my_record_packet.file_id = 1111;<br />
MRGRELEASE(&my_return_status, &dbank, &my_record_packet, &in_line);<br />
if (my_return_status.message_id != sm_ok)<br />
goto error_exit;<br />
}<br />
if (fgets(in_line, MAXLINE, fp_2) != NULL) {<br />
my_record_packet.file_id = 2222;<br />
MRGRELEASE(&my_return_status, &dbank, &my_record_packet, &in_line);<br />
if (my_return_status.message_id != sm_ok)<br />
goto error_exit;<br />
}<br />
/* */<br />
/* Open the output file. */<br />
/* */<br />
if ((fp_o = fopen("f3", "w")) == NULL) {<br />
printf("*ERROR: can't open FILE-OUT\n");<br />
return(1);<br />
}<br />
/* */<br />
/* Request records from the merge operation. The first request is */<br />
7831 0687–010 D–7
Sample Programs with UCS C Program Linkages<br />
/* made with a NULL value for the input record pointer. The file_id*/<br />
/* of the record returned indicates which input file will be read */<br />
/* to get the next input record. When all records from an input */<br />
/* file have been read, a NULL value for the input record pointer */<br />
/* is used. A severity_code field value of 2 and the message_id */<br />
/* field value of sm_eof (0777776) in the result status packet */<br />
/* signifies that all records have been returned. */<br />
/* */<br />
line_ptr = NULL;<br />
while (my_return_status.message_id == sm_ok) {<br />
MRGREQUEST(&my_return_status, &dbank, &my_record_packet,<br />
line_ptr, out_line);<br />
if (my_return_status.message_id == sm_ok) {<br />
fputs(out_line, fp_o);<br />
switch (my_record_packet.file_id) {<br />
case 1111:<br />
line_ptr = fgets(in_line, MAXLINE, fp_1);<br />
break;<br />
case 2222:<br />
line_ptr = fgets(in_line, MAXLINE, fp_2);<br />
break;<br />
default:<br />
printf("*ERROR: unexpected file-id returned<br />
from MRGREQUEST\n");<br />
return(1);<br />
}<br />
}<br />
}<br />
if (my_return_status.message_id == sm_eof) {<br />
fclose(fp_1);<br />
fclose(fp_2);<br />
fclose(fp_o);<br />
printf("MERGE is ending.\n");<br />
return(0);<br />
}<br />
/* */<br />
/* Handle error situation returned by the MERGE linkage. */<br />
/* - Print the error code returned by the MERGE linkage. */<br />
/* - Close the merge operation (cause the SORT subroutines to */<br />
/* delete any of its storage areas that may still exist). */<br />
/* This step is not required because the program immediately */<br />
/* exits but it may be a desirable step if it is necessary to */<br />
/* clean up unused data areas. */<br />
/* */<br />
error_exit:<br />
printf("*ERROR: merge linkage returned error code %u\n",<br />
my_return_status.message_id);<br />
return(1);<br />
}<br />
D–8 7831 0687–010
D.3. Sample UCS C Buffer Program<br />
Sample Programs with UCS C Program Linkages<br />
This UCS C program illustrates the use of UCS C <strong>Sort</strong> linkages that use the buffer<br />
interfaces as well as single record interfaces. The program also illustrates expected<br />
errors being returned and continued processing. Further explanation of the program is<br />
stated within the program comments.<br />
/* BULKFIXED - This UC test calls the Bulk Interface using fixed<br />
length records. Interspersed are calls using single records<br />
as well as the new "buffered" records.<br />
*/<br />
Test 1 - Multiple calls to SRTRELEASE all using fixed length<br />
records. First, a buffer of records is released, then<br />
single records are released, and finally another buffer<br />
of records is released. During SRTRETURN, one record is<br />
returned using the old method followed by the rest of the<br />
records being returned using a fixed record buffer.<br />
Test 2 - Multiple calls to SRTRELEASE, some using fixed length<br />
records and some using variable length records.<br />
First, a buffer of fixed length records is released. Then,<br />
a buffer of variable1 records is released. Finally, a<br />
buffer of variable2 records is released. During SRTRETURN<br />
the records are returned using a fixed record buffer.<br />
#include <br />
#include <br />
#include <br />
#include <br />
#define MAXLINE 80<br />
#define BUFFERSIZE 64512<br />
#define CPW 4<br />
main() {<br />
FILE *fp, *fopen();<br />
char line[MAXLINE];<br />
char buffer[BUFFERSIZE];<br />
char localen[16] = "fr_FR.8859-1";<br />
char *locp = &localen;<br />
char *ptrc = (char *) &buffer;<br />
int *ptri;<br />
int totalwords = 0;<br />
sm_result_status_type my_return_status;<br />
sm_record_packet_type my_record_packet;<br />
int dbank, i, j, k, *pt_ptr;<br />
struct { sm_start_parameter_type start_parameter;<br />
sm_core_parameter_type core_parameter;<br />
sm_rsz_parameter_type rsz_parameter;<br />
sm_key_parameter_type key_parameter;<br />
sm_locale_parameter_type locale_parameter;<br />
7831 0687–010 D–9
Sample Programs with UCS C Program Linkages<br />
sm_end_parameter_type end_parameter; } my_prm_table;<br />
pt_ptr = (int *)&my_prm_table;<br />
for (i = 0; i < (sizeof(my_prm_table) / 4); i++)<br />
*pt_ptr++ = 0;<br />
int_ptr=(int *)&my_record_packet;<br />
for (i=0; i < (sizeof (my_record_packet)/4); i++) *int_ptr++ = 0;<br />
my_prm_table.start_parameter.code = sm_start;<br />
my_prm_table.start_parameter.version = 1;<br />
my_prm_table.core_parameter.code = sm_core;<br />
my_prm_table.core_parameter.size = 1000000;<br />
my_prm_table.core_parameter.sm_address = sm_ptr_conversion(NULL);<br />
my_prm_table.rsz_parameter.code = sm_rsz;<br />
my_prm_table.rsz_parameter.size = 4;<br />
my_prm_table.rsz_parameter.size_type = sm_word;<br />
my_prm_table.key_parameter.code = sm_key;<br />
my_prm_table.key_parameter.code_1 = sm_continuation;<br />
my_prm_table.key_parameter.code_2 = sm_continuation;<br />
my_prm_table.key_parameter.key_type = sm_s;<br />
my_prm_table.key_parameter.order = sm_ascending;<br />
my_prm_table.key_parameter.start_word =<br />
sm_start_char_to_start_word(1,sm_s);<br />
my_prm_table.key_parameter.start_bit =<br />
sm_start_char_to_start_bit(1,sm_s);<br />
my_prm_table.key_parameter.bit_count =<br />
sm_char_count_to_bit_count(8,sm_s);<br />
my_prm_table.key_parameter.field_number = 0;<br />
my_prm_table.end_parameter.code = sm_end;<br />
/* ------------------------------------------------------------------ */<br />
/* Open the sort operation. */<br />
printf("Perform SRTOPEN #1.\n");<br />
SRTOPEN(&my_return_status, &dbank, &my_prm_table);<br />
printf ("SRTOPEN #1 severity code = %o, error code = %d\n \n",<br />
my_return_status.severity,my_return_status.message_id);<br />
/* Release records to the sort (buffer1). */<br />
if ((fp = fopen("f1", "r")) == NULL) {<br />
printf("*ERROR: can't open F1\n");<br />
return(1);<br />
}<br />
printf("Release Fixed record buffers.\n");<br />
j = 0;<br />
while (fgets(line, MAXLINE, fp) != NULL)<br />
{<br />
D–10 7831 0687–010
Sample Programs with UCS C Program Linkages<br />
i = strlen(line)-1; /* strip off line feed character */<br />
k = (((i + CPW -1) / CPW) * CPW) - i; /* calculate line fill count */<br />
while (k > 0)<br />
{ line[i++] = '^';<br />
k--;<br />
}<br />
strncpy(ptrc,line,i);<br />
j++;<br />
ptrc = ptrc + i;<br />
}<br />
fclose(fp);<br />
my_record_packet.version = 2;<br />
my_record_packet.type = sm_blocked_records;<br />
my_record_packet.subtype = sm_fixed_records;<br />
my_record_packet.record_gran = sm_word;<br />
my_record_packet.buffer_gran = sm_word;<br />
my_record_packet.record_length = i / CPW;<br />
my_record_packet.buffer_length = (j * i) / CPW;<br />
my_record_packet.number_of_records = 0;<br />
totalwords += my_record_packet.buffer_length;<br />
printf ("RIP record length=%d, buffer length=%d, # of records=%d\n",<br />
my_record_packet.record_length,my_record_packet.buffer_length,<br />
my_record_packet.number_of_records);<br />
SRTRELEASE(&my_return_status, &dbank, &my_record_packet, &buffer);<br />
printf ("SRTRELEASE severity code = %o, error code = %d\n",<br />
my_return_status.severity,my_return_status.message_id);<br />
printf ("RIP record length=%d, buffer length=%d, # of records=%d\n \n",<br />
my_record_packet.record_length,my_record_packet.buffer_length,<br />
my_record_packet.number_of_records);<br />
/* Release records to the sort (single records2). */<br />
if ((fp = fopen("f2", "r")) == NULL) {<br />
printf("*ERROR: can't open F2\n");<br />
return(1);<br />
}<br />
printf("Release single records.\n");<br />
my_record_packet.version = 2;<br />
my_record_packet.type = sm_single_record;<br />
my_record_packet.subtype = sm_fixed_records;<br />
while (fgets(line, MAXLINE, fp) != NULL)<br />
{<br />
ptrc = &buffer[0];<br />
i = strlen(line)-1; /* strip off line feed character */<br />
k = (((i + CPW -1) / CPW) * CPW) - i; /* calculate line fill count */<br />
while (k > 0)<br />
{ line[i++] = '^';<br />
k--;<br />
7831 0687–010 D–11
Sample Programs with UCS C Program Linkages<br />
}<br />
}<br />
strncpy(ptrc,line,i);<br />
j++;<br />
ptrc = ptrc + i;<br />
totalwords += my_record_packet.buffer_length;<br />
my_record_packet.record_gran = sm_word;<br />
my_record_packet.record_length = i / CPW;<br />
printf ("RIP record length=%d, buffer length=%d, # of records=%d\n",<br />
my_record_packet.record_length,my_record_packet.buffer_length,<br />
my_record_packet.number_of_records);<br />
SRTRELEASE(&my_return_status, &dbank, &my_record_packet, &buffer);<br />
printf ("SRTRELEASE severity code = %o, error code = %d\n",<br />
my_return_status.severity,my_return_status.message_id);<br />
printf ("RIP record length=%d, buffer length=%d, # of records=%d\n \n",<br />
my_record_packet.record_length,my_record_packet.buffer_length,<br />
my_record_packet.number_of_records);<br />
fclose(fp);<br />
/* Release records to the sort (buffer3). */<br />
if ((fp = fopen("f3", "r")) == NULL) {<br />
printf("*ERROR: can't open F3\n");<br />
return(1);<br />
}<br />
printf("Release more Fixed Buffers.\n");<br />
ptrc = &buffer[0];<br />
j = 0;<br />
while (fgets(line, MAXLINE, fp) != NULL)<br />
{<br />
i = strlen(line)-1; /* strip off line feed character */<br />
k = (((i + CPW -1) / CPW) * CPW) - i; /* calculate line fill count */<br />
while (k > 0)<br />
{ line[i++] = '^';<br />
k--;<br />
}<br />
strncpy(ptrc,line,i);<br />
j += i;<br />
ptrc = ptrc + i;<br />
}<br />
fclose(fp);<br />
my_record_packet.version = 2;<br />
my_record_packet.type = sm_blocked_records;<br />
my_record_packet.subtype = sm_fixed_records;<br />
my_record_packet.record_gran = sm_word;<br />
D–12 7831 0687–010
my_record_packet.buffer_gran = sm_word;<br />
my_record_packet.record_length = i / CPW;<br />
my_record_packet.buffer_length = j / CPW;<br />
Sample Programs with UCS C Program Linkages<br />
totalwords += my_record_packet.buffer_length;<br />
printf ("RIP record length=%d, buffer length=%d, # of records=%d\n",<br />
my_record_packet.record_length,my_record_packet.buffer_length,<br />
my_record_packet.number_of_records);<br />
SRTRELEASE(&my_return_status, &dbank, &my_record_packet, &buffer);<br />
printf ("SRTRELEASE severity code = %o, error code = %d\n",<br />
my_return_status.severity,my_return_status.message_id);<br />
printf ("RIP record length=%d, buffer length=%d, # of records=%d\n \n",<br />
my_record_packet.record_length,my_record_packet.buffer_length,<br />
my_record_packet.number_of_records);<br />
/* End the release phase. */<br />
printf("Perform SRTSORT.\n");<br />
SRTSORT(&my_return_status, &dbank);<br />
printf ("SRTSORT severity code = %o, error code = %d\n \n",<br />
my_return_status.severity,my_return_status.message_id);<br />
/* Returning a single record from SORT. Then get the rest of the */<br />
/* records using a fixed block transfer method */<br />
my_record_packet.version = 2;<br />
my_record_packet.type = sm_single_record;<br />
my_record_packet.subtype = sm_single_record;<br />
my_redord_packet.buffer_gran = sm_word;<br />
my_record_packet.buffer_length = BUFFERSIZE / CPW;<br />
printf("Return Single Record.\n");<br />
printf ("RIP record length=%d, buffer length=%d, # of records=%d\n",<br />
my_record_packet.record_length,my_record_packet.buffer_length,<br />
my_record_packet.number_of_records);<br />
SRTRETURN(&my_return_status, &dbank, &my_record_packet, &buffer);<br />
printf ("SRTRETURN severity code = %o, error code = %d\n",<br />
my_return_status.severity,my_return_status.message_id);<br />
printf ("RIP record length=%d, buffer length=%d, # of records=%d\n \n",<br />
my_record_packet.record_length,my_record_packet.buffer_length,<br />
my_record_packet.number_of_records);<br />
ptrc = (char *) &buffer;<br />
*(ptrc + (CPW * my_record_packet.record_length)) = '\0';<br />
printf (" RECORD = %s \n", ptrc);<br />
printf ("\nReturn a fixed buffer 8 words records. \n");<br />
my_record_packet.type = sm_blocked_records;<br />
my_record_packet.subtype = sm_fixed_records;<br />
my_record_packet.record_gran = sm_word;<br />
my_record_packet.buffer_gran = sm_word;<br />
7831 0687–010 D–13
Sample Programs with UCS C Program Linkages<br />
my_record_packet.record_length = 8;<br />
my_record_packet.buffer_length = BUFFERSIZE / CPW;<br />
printf ("RIP record length=%d, buffer length=%d, # of records=%d\n",<br />
my_record_packet.record_length,my_record_packet.buffer_length,<br />
my_record_packet.number_of_records);<br />
SRTRETURN(&my_return_status, &dbank, &my_record_packet, &buffer);<br />
printf ("SRTRETURN severity code = %o, error code = %d\n",<br />
my_return_status.severity,my_return_status.message_id);<br />
printf ("RIP record length=%d, buffer length=%d, # of records=%d\n \n",<br />
my_record_packet.record_length,my_record_packet.buffer_length,<br />
my_record_packet.number_of_records);<br />
ptrc = (char *) &buffer;<br />
for (i = 1; i
Sample Programs with UCS C Program Linkages<br />
my_return_status.severity,my_return_status.message_id);<br />
/* Release records to the sort (buffer1- fixed length records). */<br />
if ((fp = fopen("f2", "r")) == NULL) {<br />
printf("*ERROR: can't open F2\n");<br />
return(1);<br />
}<br />
printf("Release fixed records.\n");<br />
ptrc = &buffer[0];<br />
j = 0;<br />
while (fgets(line, MAXLINE, fp) != NULL)<br />
{<br />
i = strlen(line)-1; /* strip off line feed character */<br />
k = (((i + CPW -1) / CPW) * CPW) - i; /* calculate line fill count */<br />
while (k > 0)<br />
{ line[i++] = '^';<br />
k--;<br />
}<br />
strncpy(ptrc,line,i);<br />
j += i;<br />
ptrc = ptrc + i;<br />
}<br />
fclose(fp);<br />
my_record_packet.number_of_records = 0;<br />
my_record_packet.version = 2;<br />
my_record_packet.type = sm_blocked_records;<br />
my_record_packet.subtype = sm_fixed_records;<br />
my_record_packet.record_gran = sm_word;<br />
my_record_packet.buffer_gran = sm_word;<br />
my_record_packet.record_length = i / CPW;<br />
my_record_packet.buffer_length = j / CPW;<br />
printf ("RIP record length=%d, buffer length=%d, # of records=%d\n",<br />
my_record_packet.record_length,my_record_packet.buffer_length,<br />
my_record_packet.number_of_records);<br />
SRTRELEASE(&my_return_status, &dbank, &my_record_packet, &buffer);<br />
printf ("SRTRELEASE severity code = %o, error code = %d\n",<br />
my_return_status.severity,my_return_status.message_id);<br />
printf ("RIP record length=%d, buffer length=%d, # of records=%d\n \n",<br />
my_record_packet.record_length,my_record_packet.buffer_length,<br />
my_record_packet.number_of_records);<br />
/* Release records to the sort (buffer2 - variable1 records). */<br />
if ((fp = fopen("f5", "r")) == NULL) {<br />
printf("*ERROR: can't open F5\n");<br />
return(1);<br />
}<br />
printf("Release variable1 records.\n");<br />
7831 0687–010 D–15
Sample Programs with UCS C Program Linkages<br />
j = 0;<br />
ptrc = (char *) &buffer;<br />
ptri = (int *) &buffer;<br />
while (fgets(line, MAXLINE, fp) != NULL)<br />
{<br />
i = strlen(line)-1; /* strip off line feed character */<br />
k = (((i + CPW -1) / CPW) * CPW) - i; /* calculate line fill count */<br />
while (k > 0)<br />
{ line[i++ + CPW] = '^';<br />
k--;<br />
}<br />
*ptri = i / CPW;<br />
strncpy(ptrc + CPW,line,i);<br />
j += i + CPW;<br />
ptrc += i + CPW;<br />
ptri = (int *) ptrc;<br />
*ptri = 0; /* In case it's the last one */<br />
}<br />
printf ("buffer_len = %d characters \n",j);<br />
fclose(fp);<br />
my_record_packet.number_of_records = 16;<br />
my_record_packet.version = 2;<br />
my_record_packet.type = sm_blocked_records;<br />
my_record_packet.subtype = sm_variable1_records;<br />
my_record_packet.record_gran = sm_word;<br />
my_record_packet.buffer_gran = sm_word;<br />
my_record_packet.record_length = 0;<br />
my_record_packet.buffer_length = (j / CPW);<br />
ptrc = ptrc - j;<br />
printf ("RIP record length=%d, buffer length=%d, # of records=%d\n",<br />
my_record_packet.record_length,my_record_packet.buffer_length,<br />
my_record_packet.number_of_records);<br />
SRTRELEASE(&my_return_status, &dbank, &my_record_packet, &buffer);<br />
printf ("SRTRELEASE severity code = %o, error code = %d\n",<br />
my_return_status.severity,my_return_status.message_id);<br />
printf ("RIP record length=%d, buffer length=%d, # of records=%d\n \n",<br />
my_record_packet.record_length,my_record_packet.buffer_length,<br />
my_record_packet.number_of_records);<br />
/* Release records to the sort (buffer3 - variable2 records). */<br />
if ((fp = fopen("f6", "r")) == NULL) {<br />
printf("*ERROR: can't open F6\n");<br />
return(1);<br />
}<br />
ptrc = (char *) &buffer[4 * CPW]; /* Start after the 4 word header */<br />
ptri = (int *) ptrc;<br />
j = 0;<br />
D–16 7831 0687–010
Sample Programs with UCS C Program Linkages<br />
printf("Release variable2 records.\n");<br />
while (fgets(line, MAXLINE, fp) != NULL)<br />
{<br />
i = strlen(line)-1; /* strip off line feed character */<br />
k = (((i + CPW -1) / CPW) * CPW) - i; /* calculate line fill count */<br />
while (k > 0)<br />
{ line[i++ + CPW] = '^';<br />
k--;<br />
}<br />
j = j + CPW + i; /* 4 chars in a word */<br />
*ptri = (i / CPW) +1; /* set the RCW - length of record + RCW */<br />
ptrc = ptrc + CPW; /* add the length of the RCW */<br />
strncpy(ptrc,line,i);<br />
ptrc = ptrc + i;<br />
ptri = (int *) ptrc;<br />
*ptri = 0; /* In case it's the last one */<br />
}<br />
ptrc = ptrc-j; /* reset to the start of the buffer */<br />
fclose(fp);<br />
my_record_packet.number_of_records = 15;<br />
my_record_packet.version = 2;<br />
my_record_packet.type = sm_blocked_records;<br />
my_record_packet.subtype = sm_variable2_records;<br />
my_record_packet.record_gran = sm_word;<br />
my_record_packet.buffer_gran = sm_word;<br />
my_record_packet.record_length = 0;<br />
my_record_packet.buffer_length = j / CPW;<br />
printf ("RIP record length=%d, buffer length=%d, # of records=%d\n",<br />
my_record_packet.record_length,my_record_packet.buffer_length,<br />
my_record_packet.number_of_records);<br />
SRTRELEASE(&my_return_status, &dbank, &my_record_packet,<br />
&buffer[4 * CPW]);<br />
printf ("SRTRELEASE severity code = %o, error code = %d\n",<br />
my_return_status.severity,my_return_status.message_id);<br />
printf ("RIP record length=%d, buffer length=%d, # of records=%d\n \n",<br />
my_record_packet.record_length,my_record_packet.buffer_length,<br />
my_record_packet.number_of_records);<br />
/* End the release phase. */<br />
printf("Perform SRTSORT.\n");<br />
SRTSORT(&my_return_status, &dbank);<br />
printf ("SRTSORT severity code = %o, error code = %d\n \n",<br />
my_return_status.severity,my_return_status.message_id);<br />
/* Returning records from SORT using a fixed block transfer method. */<br />
my_record_packet.version = 2;<br />
my_record_packet.type = sm_blocked_records;<br />
7831 0687–010 D–17
Sample Programs with UCS C Program Linkages<br />
my_record_packet.subtype = sm_fixed_records;<br />
my_record_packet.record_gran = sm_word;<br />
my_record_packet.buffer_gran = sm_word;<br />
my_record_packet.buffer_length = BUFFERSIZE / CPW;<br />
my_record_packet.record_length = 8;<br />
my_record_packet.sort_pad.pad_word_char[0] = '‘';<br />
my_record_packet.sort_pad.pad_word_char[1] = '|';<br />
my_record_packet.sort_pad.pad_word_char[2] = '|';<br />
my_record_packet.sort_pad.pad_word_char[3] = '‘';<br />
printf ("Return records in a 8 word fixed format.\n");<br />
printf ("RIP record length=%d, buffer length=%d, # of records=%d\n",<br />
my_record_packet.record_length,my_record_packet.buffer_length,<br />
my_record_packet.number_of_records);<br />
SRTRETURN(&my_return_status, &dbank, &my_record_packet, &buffer);<br />
printf ("SRTRETURN severity code = %o, error code = %d\n",<br />
my_return_status.severity,my_return_status.message_id);<br />
printf ("RIP record length=%d, buffer length=%d, # of records=%d\n \n",<br />
my_record_packet.record_length,my_record_packet.buffer_length,<br />
my_record_packet.number_of_records);<br />
ptrc = (char *) &buffer;<br />
for (i = 1; i
}<br />
my_record_packet.number_of_records);<br />
Sample Programs with UCS C Program Linkages<br />
printf ("Close the SORT operation. \n");<br />
SRTCLOSE(&my_return_status, &dbank);<br />
printf ("SRTCLOSE severity code = %o, error code = %d\n \n",<br />
my_return_status.severity,my_return_status.message_id);<br />
printf ("************** END OF SORT OPERATION ************ \n \n");<br />
printf("Test is finished.\n");<br />
return (1);<br />
7831 0687–010 D–19
Sample Programs with UCS C Program Linkages<br />
D–20 7831 0687–010
Appendix E<br />
Configuration of Internal Parameters<br />
Internal parameters for the SORT processor and the SORT subroutines are contained in<br />
the following mass-storage program file element:<br />
SYS$*SRT$PAR.SORTDEFAULTS/SORT22R2<br />
This element is established during a COMUS installation of <strong>Sort</strong>/<strong>Merge</strong> and can be<br />
altered or checked under control of the COMUS CONFIGURE command.<br />
Note: During a COMUS or Software Library Administrator (SOLAR) installation of<br />
<strong>Sort</strong>/<strong>Merge</strong>, do not use the INSFILE parameter to alter the SYS$*SRT$PAR file name.<br />
This disables the parameter element and the ability to configure <strong>Sort</strong>/<strong>Merge</strong>.<br />
E.1. Sample DEFAULT$ Configuration Session –<br />
Full-Screen Mode<br />
Configure the <strong>Sort</strong>/<strong>Merge</strong> internal parameter defaults in the full-screen mode by using<br />
the following procedure:<br />
1. Establish the database qualifier:<br />
í@qual doc<br />
2. Call the COMUS processor by using the @COMUS command (the T option is for<br />
full-screen mode):<br />
íI:002333 QUAL complete.<br />
í@comus,t<br />
3. Begin the configuration process by using the CONFIGURE command:<br />
íCOMUS 6R9 (090505 0909:15) 2009 Sep 21 Mon 1657:46<br />
íCopyright (c) 1995Ä2009 <strong>Unisys</strong> Corporation.<br />
íAll rights reserved.<br />
íUNISYS CONFIDENTIAL<br />
íDatabase Qualifier: DOC<br />
íCOMMAND ? íconfigure<br />
7831 0687–010 E–1
Configuration of Internal Parameters<br />
4. Create a user set from DEFAULT$ set by using one of the following COPY<br />
commands:<br />
íThere are currently no user sets<br />
íTo create a user set, enter a copy directive:<br />
íCOPY PRODUCT=productÄname LEVEL=levelÄname TO=setÄname<br />
íor<br />
íCOPY ACTIVE PRODUCT=productÄname LEVEL=levelÄname TO=setÄname<br />
íDIRECTIVE ? ícopy product=sort level=22R2 to=dset<br />
5. Select <strong>Sort</strong>/<strong>Merge</strong> from user set DSET by entering 1:<br />
1<br />
Master Menu for Set=DSET Select the product you wish to configure<br />
PRODUCT LEVEL UPDATED<br />
1 SORT 22R2<br />
6. View the device defaults by entering 1:<br />
1<br />
E–2 7831 0687–010<br />
MAIN<br />
This is the main menu for <strong>Sort</strong>/<strong>Merge</strong> level 22R2B.<br />
Select the area you wish to view.<br />
1. DEVICE DEFAULTS<br />
2. MESSAGE CONTROL<br />
3. CORE CONTROL<br />
4. INPUT/OUTPUT FILE CONTROL<br />
5. INTERNATIONALIZATION (I18N) CONTROL<br />
7. Move to the previous COMUS display by using the BACK command:<br />
back<br />
DEVICE DEFAULTS<br />
The following represent all of the configurable <strong>Sort</strong>/<strong>Merge</strong> device<br />
defaults and are meaningful only to the SORT processor:<br />
DEFXA F40<br />
DEFXB F40<br />
DEFDK F<br />
DEFTP T
8. View the message control area by entering 2:<br />
2<br />
Configuration of Internal Parameters<br />
7831 0687–010 E–3<br />
MAIN<br />
This is the main menu for <strong>Sort</strong>/<strong>Merge</strong> level 22R2B.<br />
Select the area you wish to view.<br />
1. DEVICE DEFAULTS<br />
2. MESSAGE CONTROL<br />
3. CORE CONTROL<br />
4. INPUT/OUTPUT FILE CONTROL<br />
5. INTERNATIONALIZATION (I18N) CONTROL<br />
9. Establish the update mode by using the MODE=UPDATE command:<br />
mode=update<br />
MESSAGE CONTROL<br />
The following represent all of the configurable <strong>Sort</strong>/<strong>Merge</strong> message<br />
controls. CONSOLE and LOG apply to both the SORT processor and the SORT<br />
subroutines. PRCERRCONS applies to only the SORT processor<br />
CONSOLE OFF<br />
LOG ON<br />
PRCERRCONS OFF<br />
10. Change the LOG parameter by tabbing to the LOG field and overwriting it:<br />
MESSAGE CONTROL<br />
The following represent all of the configurable <strong>Sort</strong>/<strong>Merge</strong> message<br />
controls. CONSOLE and LOG apply to both the SORT processor and the SORT<br />
subroutines. PRCERRCONS applies to only the SORT processor<br />
CONSOLE OFF<br />
LOG OFF<br />
PRCERRCONS OFF<br />
11. Make the changes permanent by using the COMMIT command:<br />
commit<br />
MESSAGE CONTROL<br />
The following represent all of the configurable <strong>Sort</strong>/<strong>Merge</strong> message<br />
controls. CONSOLE and LOG apply to both the SORT processor and the SORT<br />
subroutines. PRCERRCONS applies to only the SORT processor<br />
CONSOLE OFF<br />
LOG OFF<br />
PRCERRCONS OFF
Configuration of Internal Parameters<br />
12. Move to the previous COMUS display by using the BACK command:<br />
back<br />
MESSAGE CONTROL<br />
The following represent all of the configurable <strong>Sort</strong>/<strong>Merge</strong> message<br />
controls. CONSOLE and LOG apply to both the SORT processor and the SORT<br />
subroutines. PRCERRCONS applies to only the SORT processor<br />
CONSOLE OFF<br />
LOG OFF<br />
PRCERRCONS OFF<br />
13. View the core control area by entering 3:<br />
3<br />
E–4 7831 0687–010<br />
MAIN<br />
This is the main menu for <strong>Sort</strong>/<strong>Merge</strong> level 22R2B.<br />
Select the area you wish to view.<br />
1. DEVICE DEFAULTS<br />
2. MESSAGE CONTROL<br />
3. CORE CONTROL<br />
4. INPUT/OUTPUT FILE CONTROL<br />
5. INTERNATIONALIZATION (I18N) CONTROL<br />
14. Establish the update mode by using the MODE=UPDATE command:<br />
mode=update<br />
CORE CONTROL<br />
The following represent the configurable core controls. The first<br />
three parameters are extended mode <strong>Sort</strong> controls and are meaningful for<br />
the SORT processor and the SORT subroutine. DEFBMCORE represents a<br />
basic mode <strong>Sort</strong> control and is meaningful only to the SORT processor.<br />
AUTOMATIC YES<br />
MAXIMUM 1000000<br />
MINIMUM 262144<br />
DEFBMCORE 210000<br />
15. Change the AUTOMATIC parameter from YES to NO by tabbing to the AUTOMATIC<br />
field and overwriting it:<br />
CORE CONTROL<br />
The following represent the configurable core controls. The first<br />
three parameters are extended mode <strong>Sort</strong> controls and are meaningful for<br />
the SORT processor and the SORT subroutine. DEFBMCORE represents a<br />
basic mode <strong>Sort</strong> control and is meaningful only to the SORT processor.<br />
AUTOMATIC NO<br />
MAXIMUM 1000000<br />
MINIMUM 262144<br />
DEFBMCORE 210000
Configuration of Internal Parameters<br />
16. Make the changes permanent by using the COMMIT command:<br />
commit<br />
CORE CONTROL<br />
The following represent the configurable core controls. The first<br />
three parameters are extended mode <strong>Sort</strong> controls and are meaningful for<br />
the SORT processor and the SORT subroutine. DEFBMCORE represents a<br />
basic mode <strong>Sort</strong> control and is meaningful only to the SORT processor.<br />
AUTOMATIC NO<br />
MAXIMUM 1000000<br />
MINIMUM 262144<br />
DEFBMCORE 210000<br />
17. Move to the previous COMUS display by using the BACK command:<br />
back<br />
CORE CONTROL<br />
The following represent the configurable core controls. The first<br />
three parameters are extended mode <strong>Sort</strong> controls and are meaningful for<br />
the SORT processor and the SORT subroutine. DEFBMCORE represents a<br />
basic mode <strong>Sort</strong> control and is meaningful only to the SORT processor.<br />
AUTOMATIC NO<br />
MAXIMUM 1000000<br />
MINIMUM 262144<br />
DEFBMCORE 210000<br />
18. View the input/output file control area by entering 4:<br />
4<br />
7831 0687–010 E–5<br />
MAIN<br />
This is the main menu for <strong>Sort</strong>/<strong>Merge</strong> level 22R2B.<br />
Select the area you wish to view.<br />
1. DEVICE DEFAULTS<br />
2. MESSAGE CONTROL<br />
3. CORE CONTROL<br />
4. INPUT/OUTPUT FILE CONTROL<br />
5. INTERNATIONALIZATION (I18N) CONTROL<br />
19. Establish the update mode using the MODE=UPDATE command:<br />
mode=update<br />
INPUT/OUTPUT FILE CONTROL<br />
The following represent all of the configurable input/output file<br />
control parameters and are meaningful only to the SORT processor:<br />
MSAMBLOCK DEFAULTCALC<br />
PREPDEFAULT 28<br />
NUMRECWARN NONE<br />
PROCESSING NONWORD
Configuration of Internal Parameters<br />
20. Change the MSAMBLOCK parameter from DEFAULTCALC to BLOCKPARAM by<br />
tabbing to the MSAMBLOCK field and overwriting it:<br />
INPUT/OUTPUT FILE CONTROL<br />
The following represent all of the configurable input/output file<br />
control parameters and are meaningful only to the SORT processor:<br />
MSAMBLOCK BLOCKPARAM<br />
PREPDEFAULT 28<br />
NUMRECWARN NONE<br />
PROCESSING NONWORD<br />
21. Make the changes permanent by using the COMMIT command:<br />
commit<br />
INPUT/OUTPUT FILE CONTROL<br />
The following represent all of the configurable input/output file<br />
control parameters and are meaningful only to the SORT processor:<br />
MSAMBLOCK BLOCKPARAM<br />
PREPDEFAULT 28<br />
NUMRECWARN NONE<br />
PROCESSING NONWORD<br />
22. Move to the previous COMUS display by using the BACK command:<br />
back<br />
INPUT/OUTPUT FILE CONTROL<br />
The following represent all of the configurable input/output file<br />
control parameters and are meaningful only to the SORT processor:<br />
MSAMBLOCK BLOCKPARAM<br />
PREPDEFAULT 28<br />
NUMRECWARN NONE<br />
PROCESSING NONWORD<br />
23. View the internationalization control area by entering 5:<br />
5<br />
This is the main menu for <strong>Sort</strong>/<strong>Merge</strong> level 22R2.<br />
Select the area you wish to view.<br />
E–6 7831 0687–010<br />
MAIN<br />
1. DEVICE DEFAULTS<br />
2. MESSAGE CONTROL<br />
3. CORE CONTROL<br />
4. INPUT/OUTPUT FILE CONTROL<br />
5. INTERNATIONALIZATION (I18N) CONTROL
Configuration of Internal Parameters<br />
24. Establish the update mode using the MODE=UPDATE COMMAND:<br />
mode=update<br />
INTERNATIONALIZATION (I18N) CONTROL<br />
The following represent all of the configurable Internationalization<br />
(I18N) controls. RBSIZE is meaningful to both the SORT processor and<br />
the SORT subroutines. The other I18N configuration parameters are<br />
meaningful only to the SORT processor.<br />
RBSIZE 16777216<br />
CCSLOCNUM DEFAULT<br />
CCSLOCNUMCHK ON<br />
DEFLOCALE _QUERY<br />
25. Change the CCSLOCNUMCHK configuration parameter from ON to OFF by tabbing<br />
to the CCSLOCNUMCHK field and overwriting it:<br />
INTERNATIONALIZATION (I18N) CONTROL<br />
The following represent all of the configurable Internationalization<br />
(I18N) controls. RBSIZE is meaningful to both the SORT processor and<br />
the SORT subroutines. The other I18N configuration parameters are<br />
meaningful only to the SORT processor.<br />
RBSIZE 16777216<br />
CCSLOCNUM DEFAULT<br />
CCSLOCNUMCHK OFF<br />
DEFLOCALE _QUERY<br />
26. Make the changes permanent by using the COMMIT command:<br />
commit<br />
INTERNATIONALIZATION (I18N) CONTROL<br />
The following represent all of the configurable Internationalization<br />
(I18N) controls. RBSIZE is meaningful to both the SORT processor and<br />
the SORT subroutines. The other I18N configuration parameters are<br />
meaningful only to the SORT processor.<br />
RBSIZE 16777216<br />
CCSLOCNUM DEFAULT<br />
CCSLOCNUMCHK OFF<br />
DEFLOCALE _QUERY<br />
7831 0687–010 E–7
Configuration of Internal Parameters<br />
27. Apply the configuration changes to SORT by using the PROCESS command:<br />
process product=sort level=22R2 set=dset<br />
INTERNATIONALIZATION (I18N) CONTROL<br />
The following represent all of the configurable Internationalization<br />
(I18N) controls. RBSIZE is meaningful to both the SORT processor and<br />
the SORT subroutines. The other I18N configuration parameters are<br />
meaningful only to the SORT processor.<br />
RBSIZE 16777216<br />
CCSLOCNUM DEFAULT<br />
CCSLOCNUMCHK OFF<br />
DEFLOCALE _QUERY<br />
PROCESS in progress Ä Please Wait.<br />
.<br />
.<br />
.<br />
28. COMUS returns from the PROCESS command at the main menu. Exit from SORT<br />
configuration processing by entering E on the COMUS display:<br />
e<br />
PROCESS completed successfully.<br />
E–8 7831 0687–010<br />
MAIN<br />
This is the main menu for <strong>Sort</strong>/<strong>Merge</strong> level 22R2B.<br />
Select the area you wish to view.<br />
1. DEVICE DEFAULTS<br />
2. MESSAGE CONTROL<br />
3. CORE CONTROL<br />
4. INPUT/OUTPUT FILE CONTROL<br />
5. INTERNATIONALIZATION (I18N) CONTROL<br />
29. Exit from COMUS by using the EXIT command:<br />
íFURPUR 32R4A (080924 1517:54) 2009 Sep 21 Mon 1659:08<br />
íEND PACK. TEXT=4,TOC=1,SYM=6,OMN=4<br />
íI:002333 FREE complete.<br />
íDatabase Qualifier: DOC<br />
íCONFIGURE TASK COMPLETED *************************<br />
íCOMMAND ? íexit<br />
íEND COMUS
Configuration of Internal Parameters<br />
E.2. Sample DEFAULT$ Configuration Session –<br />
Line Mode<br />
Configure the <strong>Sort</strong>/<strong>Merge</strong> internal parameter defaults in line mode by using the following<br />
procedure:<br />
1. Establish the database qualifier:<br />
í@qual doc<br />
2. Call the COMUS processor by using the @COMUS command:<br />
íI:002333 QUAL complete.<br />
í@comus<br />
3. Begin the configuration process by using the CONFIGURE command:<br />
íCOMUS 6R9 (090505 0909:15) 2009 Sep 21 Mon 1659:51<br />
íCopyright (c) 1995Ä2009 <strong>Unisys</strong> Corporation.<br />
íAll rights reserved.<br />
íUNISYS CONFIDENTIAL<br />
íDatabase Qualifier: DOC<br />
íCOMMAND ? íconfigure<br />
4. Create a user set from DEFAULT$ set by using one of the following commands:<br />
íThere are currently no user sets<br />
íTo create a user set, enter a copy directive:<br />
íCOPY PRODUCT=productÄname LEVEL=levelÄname TO=setÄname<br />
íor<br />
íCOPY ACTIVE PRODUCT=productÄname LEVEL=levelÄname TO=setÄname<br />
íDIRECTIVE ? ícopy product=sort level=22R2 to=dset<br />
5. Access <strong>Sort</strong>/<strong>Merge</strong> from user set DSET by entering 1:<br />
íMaster Menu for Set=DSET Select the product you wish to configure<br />
í PRODUCT LEVEL UPDATED<br />
í 1 SORT 22R2<br />
íDIRECTIVE ? í1<br />
6. View the device defaults by entering 1:<br />
í MAIN<br />
í This is the main menu for SORT/MERGE level 22R2B.<br />
í Select the area you wish to view.<br />
í 1. DEVICE DEFAULTS<br />
í 2. MESSAGE CONTROL<br />
í 3. CORE CONTROL<br />
í 4. INPUT/OUTPUT FILE CONTROL<br />
í 5. INTERNATIONALIZATION (I18N) CONTROL<br />
íDIRECTIVE ? í1<br />
7831 0687–010 E–9
Configuration of Internal Parameters<br />
7. Move to the previous COMUS display by using the BACK command:<br />
í DEVICE DEFAULTS<br />
í The following represent all of the configurable <strong>Sort</strong>/<strong>Merge</strong> device<br />
í defaults and are meaningful only to the SORT processor:<br />
íDEFXA F40<br />
íDEFXB F40<br />
íDEFDK F<br />
íDEFTP T<br />
íDIRECTIVE ? íback<br />
8. View the message control display by entering 2:<br />
í MAIN<br />
í This is the main menu for SORT/MERGE level 22R2B.<br />
í Select the area you wish to view.<br />
í 1. DEVICE DEFAULTS<br />
í 2. MESSAGE CONTROL<br />
í 3. CORE CONTROL<br />
í 4. INPUT/OUTPUT FILE CONTROL<br />
í 5. INTERNATIONALIZATION (I18N) CONTROL<br />
íDIRECTIVE ? í2<br />
9. Establish update mode by using the MODE=UPDATE command:<br />
í MESSAGE CONTROL<br />
í The following represent all of the configurable <strong>Sort</strong>/<strong>Merge</strong> message<br />
í controls. CONSOLE and LOG apply to both the SORT processor and the SORT<br />
í subroutines. PRCERRCONS applies to only the SORT processor<br />
íCONSOLE OFF<br />
íLOG ON<br />
íPRCERRCONS OFF<br />
íDIRECTIVE ? ímode=update<br />
10. Change the value of the LOG parameter by using the ASSIGN LOG=OFF command:<br />
í MESSAGE CONTROL<br />
í The following represent all of the configurable <strong>Sort</strong>/<strong>Merge</strong> message<br />
í controls. CONSOLE and LOG apply to both the SORT processor and the SORT<br />
í subroutines. PRCERRCONS applies to only the SORT processor<br />
íCONSOLE OFF<br />
íLOG ON<br />
íPRCERRCONS OFF<br />
íDIRECTIVE ? íassign log=off<br />
11. Make the changes permanent by using the COMMIT command:<br />
í MESSAGE CONTROL<br />
í The following represent all of the configurable <strong>Sort</strong>/<strong>Merge</strong> message<br />
í controls. CONSOLE and LOG apply to both the SORT processor and the SORT<br />
í subroutines. PRCERRCONS applies to only the SORT processor<br />
íCONSOLE OFF<br />
íLOG OFF<br />
íPRCERRCONS OFF<br />
íDIRECTIVE ? ícommit<br />
E–10 7831 0687–010
Configuration of Internal Parameters<br />
12. Move to the previous COMUS display by using the BACK command:<br />
í MESSAGE CONTROL<br />
í The following represent all of the configurable <strong>Sort</strong>/<strong>Merge</strong> message<br />
í controls. CONSOLE and LOG apply to both the SORT processor and the SORT<br />
í subroutines. PRCERRCONS applies to only the SORT processor.<br />
íCONSOLE OFF<br />
íLOG OFF<br />
íPRCERRCONS OFF<br />
íDIRECTIVE ? íback<br />
13. View the CORE CONTROL display by entering 3:<br />
í MAIN<br />
í This is the main menu for SORT/MERGE level 22R2B.<br />
í Select the area you wish to view.<br />
í 1. DEVICE DEFAULTS<br />
í 2. MESSAGE CONTROL<br />
í 3. CORE CONTROL<br />
í 4. INPUT/OUTPUT FILE CONTROL<br />
í 5. INTERNATIONALIZATION (I18N) CONTROL<br />
íDIRECTIVE ? í3<br />
14. Establish the update mode by using the MODE=UPDATE command:<br />
í CORE CONTROL<br />
í The following represent the configurable core controls. The first<br />
í three parameters are extended mode <strong>Sort</strong> controls and are meaningful for<br />
í the SORT processor and the SORT subroutine. DEFBMCORE represents a<br />
í basic mode <strong>Sort</strong> control and is meaningful only to the SORT processor.<br />
íAUTOMATIC YES<br />
íMAXIMUM 1000000<br />
íMINIMUM 262144<br />
íDEFBMCORE 210000<br />
íDIRECTIVE ? ímode=update<br />
15. Change the value of the AUTOMATIC parameter by using the ASSIGN<br />
AUTOMATIC=NO command:<br />
í CORE CONTROL<br />
í The following represent the configurable core controls. The first<br />
í three parameters are extended mode <strong>Sort</strong> controls and are meaningful for<br />
í the SORT processor and the SORT subroutine. DEFBMCORE represents a<br />
í basic mode <strong>Sort</strong> control and is meaningful only to the SORT processor.<br />
íAUTOMATIC YES<br />
íMAXIMUM 1000000<br />
íMINIMUM 262144<br />
íDEFBMCORE 210000<br />
íDIRECTIVE ? íassign automatic=no<br />
16. Make the changes permanent by using the COMMIT command:<br />
í CORE CONTROL<br />
í The following represent the configurable core controls. The first<br />
í three parameters are extended mode <strong>Sort</strong> controls and are meaningful for<br />
í the SORT processor and the SORT subroutine. DEFBMCORE represents a<br />
í basic mode <strong>Sort</strong> control and is meaningful only to the SORT processor.<br />
íAUTOMATIC NO<br />
íMAXIMUM 1000000<br />
íMINIMUM 262144<br />
íDEFBMCORE 210000<br />
íDIRECTIVE ? ícommit<br />
7831 0687–010 E–11
Configuration of Internal Parameters<br />
17. Move to the previous COMUS display by using the BACK command:<br />
í CORE CONTROL<br />
í The following represent the configurable core controls. The first<br />
í three parameters are extended mode <strong>Sort</strong> controls and are meaningful for<br />
í the SORT processor and the SORT subroutine. DEFBMCORE represents a<br />
í basic mode <strong>Sort</strong> control and is meaningful only to the SORT processor.<br />
íAUTOMATIC NO<br />
íMAXIMUM 1000000<br />
íMINIMUM 262144<br />
íDEFBMCORE 210000<br />
íDIRECTIVE ? íback<br />
18. View the INPUT/OUTPUT display by entering 4:<br />
í MAIN<br />
í This is the main menu for SORT/MERGE level 22R2B.<br />
í Select the area you wish to view.<br />
í 1. DEVICE DEFAULTS<br />
í 2. MESSAGE CONTROL<br />
í 3. CORE CONTROL<br />
í 4. INPUT/OUTPUT FILE CONTROL<br />
í 5. INTERNATIONALIZATION (I18N) CONTROL<br />
íDIRECTIVE ? í4<br />
19. Establish update mode by using the MODE=UPDATE command:<br />
í INPUT/OUTPUT FILE CONTROL<br />
í The following represent all of the configurable input/output file<br />
í control parameters and are meaningful only to the SORT processor:<br />
íMSAMBLOCK DEFAULTCALC<br />
íPREPDEFAULT 28<br />
íNUMRECWARN NONE<br />
íPROCESSING NONWORD<br />
íDIRECTIVE ? ímode=update<br />
20. Change the value of the PREPDEFAULT parameter by using the ASSIGN<br />
PREPDEFAULT=56 command:<br />
í INPUT/OUTPUT FILE CONTROL<br />
í The following represent all of the configurable input/output file<br />
í control parameters and are meaningful only to the SORT processor:<br />
íMSAMBLOCK DEFAULTCALC<br />
íPREPDEFAULT 28<br />
íNUMRECWARN NONE<br />
íPROCESSING NONWORD<br />
íDIRECTIVE ? íassign prepdefault=56<br />
21. Make the changes permanent by using the COMMIT command:<br />
í INPUT/OUTPUT FILE CONTROL<br />
í The following represent all of the configurable input/output file<br />
í control parameters and are meaningful only to the SORT processor:<br />
íMSAMBLOCK DEFAULTCALC<br />
íPREPDEFAULT 56<br />
íNUMRECWARN NONE<br />
íPROCESSING NONWORD<br />
íDIRECTIVE ? ícommit<br />
E–12 7831 0687–010
Configuration of Internal Parameters<br />
22. Move to the previous COMUS display by using the BACK command:<br />
í INPUT/OUTPUT FILE CONTROL<br />
í The following represent all of the configurable input/output file<br />
í control parameters and are meaningful only to the SORT processor:<br />
íMSAMBLOCK DEFAULTCALC<br />
íPREPDEFAULT 56<br />
íNUMRECWARN NONE<br />
íPROCESSING NONWORD<br />
íDIRECTIVE ? íback<br />
23. View the INTERNATIONALIZATION (I18N) CONTROL display by entering 5:<br />
í MAIN<br />
í This is the main menu for SORT/MERGE level 22R2B.<br />
í Select the area you wish to view.<br />
í 1. DEVICE DEFAULTS<br />
í 2. MESSAGE CONTROL<br />
í 3. CORE CONTROL<br />
í 4. INPUT/OUTPUT FILE CONTROL<br />
í 5. INTERNATIONALIZATION (I18N) CONTROL<br />
íDIRECTIVE ? í5<br />
24. Establish update mode by using the MODE=UPDATE command:<br />
í INTERNATIONALIZATION (I18N) CONTROL<br />
í The following represent all of the configurable Internationalization<br />
í (I18N) controls. RBSIZE is meaningful to both the SORT processor and<br />
í the SORT subroutines. The other I18N configuration parameters are<br />
í meaningful only to the SORT processor.<br />
íRBSIZE 16777216<br />
íCCSLOCNUM DEFAULT<br />
íCCSLOCNUMCHK ON<br />
íDEFLOCALE _QUERY<br />
íDIRECTIVE ? ímode=update<br />
25. Change the value of the CCSLOCNUM parameter by using the ASSIGN<br />
CCSLOCNUM=PREI18N command:<br />
í INTERNATIONALIZATION (I18N) CONTROL<br />
í The following represent all of the configurable Internationalization<br />
í (I18N) controls. RBSIZE is meaningful to both the SORT processor and<br />
í the SORT subroutines. The other I18N configuration parameters are<br />
í meaningful only to the SORT processor.<br />
íRBSIZE 16777216<br />
íCCSLOCNUM DEFAULT<br />
íCCSLOCNUMCHK ON<br />
íDEFLOCALE _QUERY<br />
íDIRECTIVE ? íassign ccslocnum=prei18n<br />
7831 0687–010 E–13
Configuration of Internal Parameters<br />
26. Make the changes permanent by using the COMMIT command:<br />
í INTERNATIONALIZATION (I18N) CONTROL<br />
í The following represent all of the configurable Internationalization<br />
í (I18N) controls. RBSIZE is meaningful to both the SORT processor and<br />
í the SORT subroutines. The other I18N configuration parameters are<br />
í meaningful only to the SORT processor.<br />
íRBSIZE 16777216<br />
íCCSLOCNUM PREI18N<br />
íCCSLOCNUMCHK ON<br />
íDEFLOCALE _QUERY<br />
íDIRECTIVE ? ícommit<br />
27. Move to the previous COMUS display by using the BACK command:<br />
í INTERNATIONALIZATION (I18N) CONTROL<br />
í The following represent all of the configurable Internationalization<br />
í (I18N) controls. RBSIZE is meaningful to both the SORT processor and<br />
í the SORT subroutines. The other I18N configuration parameters are<br />
í meaningful only to the SORT processor.<br />
íRBSIZE 16777216<br />
íCCSLOCNUM PREI18N<br />
íCCSLOCNUMCHK ON<br />
íDEFLOCALE _QUERY<br />
íDIRECTIVE ? íback<br />
28. Apply the configuration changes to SORT by using the PROCESS command:<br />
í MAIN<br />
í This is the main menu for SORT/MERGE level 22R2B.<br />
í Select the area you wish to view.<br />
í 1. DEVICE DEFAULTS<br />
í 2. MESSAGE CONTROL<br />
í 3. CORE CONTROL<br />
í 4. INPUT/OUTPUT FILE CONTROL<br />
í 5. INTERNATIONALIZATION (I18N) CONTROL<br />
íDIRECTIVE ? íprocess product=sort level=22R2 set=dset<br />
íPROCESS in progress - Please Wait.<br />
.<br />
.<br />
.<br />
29. Exit the SORT configuration process by entering E:<br />
í MAIN<br />
í This is the main menu for SORT/MERGE level 22R2B.<br />
í Select the area you wish to view.<br />
í 1. DEVICE DEFAULTS<br />
í 2. MESSAGE CONTROL<br />
í 3. CORE CONTROL<br />
í 4. INPUT/OUTPUT FILE CONTROL<br />
í 5. INTERNATIONALIZATION (I18N) CONTROL<br />
íPROCESS completed successfully.<br />
íDIRECTIVE ? íe<br />
E–14 7831 0687–010
30. Exit from COMUS by using the EXIT command:<br />
íFURPUR 32R4A (080924 1517:54) 2009 Sep 21 Mon 1701:12<br />
íEND PACK. TEXT=4,TOC=1,SYM=6,OMN=4<br />
íI:002333 FREE complete.<br />
íDatabase Qualifier: DOC<br />
íCONFIGURE TASK COMPLETED *************************<br />
íCOMMAND ? íexit<br />
íEND COMUS<br />
Configuration of Internal Parameters<br />
7831 0687–010 E–15
Configuration of Internal Parameters<br />
E–16 7831 0687–010
Glossary<br />
A<br />
ACOB<br />
activity<br />
Acronym for ASCII COBOL.<br />
A virtual central processing unit (CPU). The Exec maintains a CPU environment for an<br />
execution sequence or thread, called an activity. This activity appears to have continuous<br />
use of a single CPU as long as it desires, even though the Exec divides CPU usage<br />
among many activities or executes them on different CPUs. All program execution is<br />
performed by an activity. A program is initially assigned and typically needs just one<br />
activity; complex programs can register additional activities to be executed<br />
asynchronously. Synonym for task.<br />
activity local<br />
One of the four levels (also called sharing levels) at which banks in the system can be<br />
shared by multiple users. The other levels are application local, program local, and<br />
system local. System local and activity local have meaning only in extended mode.<br />
Activity-local banks are also called task local. See also virtual address.<br />
application local<br />
One of the four levels (also called sharing levels) at which banks in the system can be<br />
shared by multiple users. The other levels are activity local, program local, and system<br />
local. Application-local banks are common banks. See also virtual address.<br />
ASCII<br />
Abbreviation for American Standard Code for Information Interchange.<br />
average string length<br />
<strong>Sort</strong>/<strong>Merge</strong> computes the length of a string. It is equal to the product of the bias times<br />
the size of the tournament area, or the total data volume divided by the number of<br />
strings created.<br />
B<br />
bank<br />
(1) A data structure of computer hardware, representing an area of main storage. This is<br />
called a physical bank. (2) A collection of related code, data, and control information that<br />
is the main subdivision of an object module element. This is called a virtual bank, logical<br />
bank, or bank template. Virtual banks are produced by compilers or assemblers and are<br />
loaded into physical banks.<br />
7831 0687–010 Glossary–1
Glossary<br />
bank address<br />
The bank-relative address of a program location.<br />
bank descriptor<br />
A group of four words of storage that includes information on the base address, upper<br />
and lower limits, and security attributes for a bank. The bank descriptor also provides the<br />
basic storage structure used for managing the addressing environment. See also bank<br />
descriptor index, bank descriptor table.<br />
bank descriptor index (BDI)<br />
A bank identifier that points to one bank descriptor in a bank descriptor table. In a PADS<br />
low-level address, the symbol => identifies the immediately preceding integer<br />
expression as the bank descriptor index. See also address modifier.<br />
bank descriptor table<br />
A group of bank descriptors that corresponds to one of the addressing levels at which<br />
banks can be shared: system, application, program, or activity.<br />
bank name<br />
The name assigned to a bank during the collection of a program.<br />
base register<br />
One of 32 base (B) registers. The first 16 registers (B0 through B15) are user base<br />
registers that make an extended mode bank in main storage visible to an executing<br />
program. The last 16 registers (B16 through B31) are Exec base registers.<br />
based bank<br />
A bank that is currently pointed to by a base register. A bank must be based to be<br />
available to the executing program.<br />
basic mode sort<br />
A sort that performs its operation in basic mode (as opposed to extended mode). The<br />
possible basic mode sorts are basic mode memory, M1, M1-M2, basic mode disk, and<br />
tape.<br />
BDI<br />
bias<br />
See bank descriptor index.<br />
A measurement of the sorted order of the unsorted records of data. If the input data<br />
was in reverse order, the bias of the data would be 1.0. <strong>Sort</strong> calculates the bias of the<br />
data using the following formulas:<br />
average string length = input volume / number of strings created<br />
bias = average string length / size of the tournament area<br />
block size<br />
The amount of data in each read or write to the sort scratch file. The sort computes this<br />
as follows:<br />
available core/XA merge power<br />
Glossary–2 7831 0687–010
C<br />
character string<br />
A sequence of contiguous characters.<br />
Glossary<br />
core area<br />
The memory area used by the SORT subroutines to perform the sort operation. The area<br />
is defined by the SORT subroutine CORE parameter. The SORT processor internally<br />
defines this area based upon the SORT processor CORE parameter. As an example, this<br />
area includes the tournament area, input and output buffers.<br />
D<br />
decimal<br />
A numeric value that represents a decimal integer.<br />
disk sort<br />
A type of sort that requires 3 to 26 disk scratch files to be assigned. A disk sort can be<br />
either a basic mode disk sort, which is performed in basic mode, or an extended mode<br />
disk sort, which is performed in extended mode. All scratch files should be of the same<br />
size.<br />
DROC<br />
E<br />
ECL<br />
Abbreviation for data reduction code.<br />
Abbreviation for Executive Control Language.<br />
exception<br />
An error or other exceptional situation that arises during execution of a UCS Ada<br />
program.<br />
extended mode<br />
The mode of execution on 2200 Series systems that allows<br />
• Sixteen user base registers<br />
• Increased address space<br />
• Additional machine instructions<br />
extended mode sort<br />
A sort that performs its operation in extended mode (as opposed to basic mode). The<br />
possible extended mode sorts are extended mode memory and extended mode disk.<br />
7831 0687–010 Glossary–3
Glossary<br />
F<br />
file name<br />
A string of characters that identifies a file name.<br />
G<br />
GAP<br />
See general access permission.<br />
general access permission (GAP)<br />
A value assigned to a bank that specifies the type of access permitted to another activity<br />
accessing that bank. During static linking, general access permission (GAP) is called<br />
OTHER_ACCESS. The GAP value can specify any of the following types of access:<br />
• Read<br />
• Write<br />
• Execute<br />
• Combinations of the above<br />
• None (no access permitted to other activities)<br />
When the key of an activity does not match the lock of the bank, the activity can access<br />
the bank with the type of access permitted by the GAP value. See also special access<br />
permission.<br />
general register set (GRS)<br />
A set of 128 program-addressable 36-bit control registers. The set includes indexing<br />
registers, accumulators, repeat counters, a mask register, a real-time clock register,<br />
interrupt status words, captured timer value, byte manipulation, and control registers.<br />
H<br />
hexadecimal<br />
A numeric value that represents a hexadecimal integer.<br />
High-Volume Transaction Processing (HVTIP)<br />
A specialized technique used for applications requiring a high rate of throughput, and<br />
whose processing of a transaction can pass through an arbitrary sequence of<br />
subprograms. See also Transaction Processing.<br />
I<br />
integer<br />
An unsigned whole decimal number.<br />
Glossary–4 7831 0687–010
Glossary<br />
internationalization<br />
<strong>Unisys</strong> software features that develop and run applications customized to a specific<br />
language, culture, or business environment. These features provide support for<br />
numerous character sets and locales.<br />
J<br />
j-factor<br />
K<br />
A partial word designator, including half-words, H1 and H2, quarter-words, Q1 through<br />
Q4, sixth-words, S1 through S6, third-words T1 through T3, and whole-word, W.<br />
katakana<br />
A list or set of single-octet, phonetic Japanese characters, each one representing one<br />
syllable. Katakana is used for writing foreign words or documents such as telegrams.<br />
The characters have ordinal values in the range 161 through 254, depending on the<br />
output device. The ISO code set (JISCII), as well as the kanji code set, have the codes<br />
for the katakana characters.<br />
key<br />
L<br />
locale<br />
M<br />
M1 sort<br />
A field within a record that has specific properties that <strong>Sort</strong>/<strong>Merge</strong> uses to order the<br />
records. A maximum of 64 sort keys may be specified.<br />
A set of rules that establishes the national or cultural rules for usage of a coded character<br />
set.<br />
A basic mode sort with one mass-storage scratch file assigned.<br />
M1-M2 sort<br />
A basic mode sort with two mass-storage scratch files assigned. The smaller scratch file<br />
is the M1 scratch file and the larger is the M2 scratch file. If the two scratch files are<br />
assigned to different devices, the M1 scratch file should be assigned to the faster<br />
device.<br />
memory sort<br />
A type of sort that requires no scratch files to be assigned. For successful completion of<br />
the sort, all records must fit in the core area provided.<br />
7831 0687–010 Glossary–5
Glossary<br />
merge D-bank<br />
A data area passed to the SORT subroutines that contains basic control information<br />
about the merge operation. The minimum size for this area is 0500 words. This area is<br />
passed to the SORT subroutines through register X9 for the extended and commonbanked<br />
sort linkages.<br />
merge power<br />
The maximum number of strings that sort can merge together at one time. The strings<br />
that are merged either form a larger string or the final ordered set of records.<br />
N<br />
nonnumeric literal<br />
A character string bounded by apostrophes or quotation marks. The character string can<br />
include any character in the computer’s character set.<br />
numeric constant<br />
A numeric value represented in any specified base (binary, octal, decimal, or<br />
hexadecimal).<br />
O<br />
object module<br />
A type of compiled or assembled element in a program file that contains banks, bank<br />
control information, diagnostic information, and sufficient information to allow it to be<br />
statically linked or dynamically linked. The banks in an object module can be loaded into<br />
main storage and executed. Compilers use the Linking System to create and format<br />
object modules. The following types of object modules exist: standard object modules,<br />
bound object modules, and zero overhead object modules (ZOOM). See also element.<br />
octal<br />
P<br />
A numeric value that represents an octal integer.<br />
program local<br />
One of the four levels (also called sharing levels) at which banks in the system can be<br />
shared by multiple users. The other levels are application local, activity local, and system<br />
local. Program-local banks are program banks. See also virtual address.<br />
R<br />
RCW<br />
Abbreviation for record control word.<br />
Glossary–6 7831 0687–010
ecord<br />
An entity that consists of a set of characters or fields that form the basic unit that<br />
<strong>Sort</strong>/<strong>Merge</strong> defines as the item to be sorted.<br />
Glossary<br />
relocatable element<br />
For OS 2200 systems, a machine language element, produced by a basic mode compiler<br />
such as ASCII FORTRAN or ASCII COBOL, that is not yet ready for execution. The<br />
Collector links relocatable elements into an executable absolute element.<br />
S<br />
SAP<br />
See special access permission.<br />
scratch file<br />
A mass-storage disk or tape file that the SORT subroutines use as a scratch area to hold<br />
records when all the records will not fit in the core area. The number and type of scratch<br />
files provided determines the type of sort performed. The SORT processor assumes<br />
that the scratch files are named XA, XB, XC, XD,...,XY, and XZ.<br />
segment<br />
The name of a program segment as it appears in the MAP directives at program<br />
collection (or the collector default).<br />
sharing level<br />
One of four levels at which banks in the system can be shared by multiple users. The<br />
four sharing levels are system local, application local, program local, and activity (or task)<br />
local. System local and task local have meaning only in extended mode. See also<br />
application local; program local.<br />
sort D-bank<br />
A data area passed to the SORT subroutines that contains basic control information<br />
about the sort operation. The minimum size for this area is 02200 words. This area is<br />
passed to the SORT subroutines through register X9 for the extended and commonbanked<br />
sort linkages.<br />
special access permission (SAP)<br />
A value assigned to a bank that specifies the type of access permitted to the activity that<br />
owns the bank. During static linking, special access permission (SAP) is called<br />
OWN_ACCESS. The SAP value can specify any of the following types of access:<br />
• Read<br />
• Write<br />
• Execute<br />
• Combinations of the above<br />
When the key of an activity matches the lock of the bank, the activity can access the<br />
bank with the type of access permitted by the SAP value. See also general access<br />
permission.<br />
7831 0687–010 Glossary–7
Glossary<br />
start bit<br />
string<br />
An integer identifying the first bit in a word.<br />
An ordered subset of records that a sort creates internally. These strings are merged<br />
together to form the final ordered set of records.<br />
system local<br />
One of the four levels (also called sharing levels) at which banks in the system can be<br />
shared by multiple users. The other levels are application local, program local, and<br />
activity local. System local and task local have meaning only in extended mode. See<br />
also virtual address.<br />
T<br />
tape sort<br />
A basic mode sort with three to 24 tape scratch files assigned. In addition, one or two<br />
mass-storage scratch files may be assigned similar to an M1 sort or an M1-M2 sort.<br />
task local<br />
See activity local.<br />
TIP<br />
See Transaction Processing.<br />
tournament area<br />
The part of the core area that is used to hold the records and perform the sort operation.<br />
This area usually is the substantial portion of the core area.<br />
Transaction Processing (TIP)<br />
A modular extension of the Exec known as TIP that provides a high-performance system<br />
in which a user causes the execution of a predefined transaction program by entering an<br />
input message from a remote terminal. The program accesses the application database<br />
and returns a response to the user.<br />
types of sort<br />
<strong>Sort</strong> provides seven different types of sorts, which are<br />
• Basic mode memory sort<br />
• Basic mode disk sort<br />
• Extended mode memory sort<br />
• Extended mode disk sort<br />
• M1 <strong>Sort</strong><br />
• M1-M2 <strong>Sort</strong><br />
• Tape <strong>Sort</strong><br />
Glossary–8 7831 0687–010
U<br />
Glossary<br />
use name<br />
A convenient short name used to designate an address, variable, procedure name, or file<br />
name that has been defined in a USE command.<br />
V<br />
variable<br />
A data storage area that can be assigned data or have data replaced with other data. A<br />
source program symbolic name associated with a program data location.<br />
virtual address `<br />
A 36-bit address consisting of an address tree level, a bank descriptor index, and an<br />
address offset. See also system local; application local; program local; activity local.<br />
VTH<br />
Abbreviation for virtual tape file.<br />
7831 0687–010 Glossary–9
Glossary<br />
Glossary–10 7831 0687–010
Index<br />
A<br />
ACCEPT SORT processor parameter,<br />
description, 3-11<br />
accessing<br />
the SORT processor, 1-3<br />
the SORT subroutine, 1-4<br />
the SORT subroutines, through your own<br />
programs, 1-4<br />
ACOB/CFH input file, record structure, 3-70<br />
activating the SORT processor, 1-3, 3-1<br />
ALLOW SORT processor parameter,<br />
description, 3-13<br />
ascending index key, specifying, 3-33, 3-34<br />
ASCII<br />
alphanumeric key field, description, 11-9<br />
sign leading overpunch format key field,<br />
description, 11-10<br />
sign leading separate decimal key field,<br />
description, 11-8<br />
sign trailing overpunch key field,<br />
description, 11-8<br />
sign trailing separate decimal key field,<br />
description, 11-9<br />
assigning an R$CORE file, 2-6<br />
AUTOMATIC configuration parameter,<br />
description, 9-1<br />
automatic tape sorts, description, 12-1<br />
B<br />
basic mode<br />
disk sort, maximum number of scratch<br />
files, 10-3<br />
environment, 1-4, 2-1<br />
main storage sort<br />
formula for calculating main storage<br />
used, 10-2<br />
requirements, 10-2<br />
sort<br />
directing the SORT processor to<br />
perform, 1-4<br />
disk sorts, 10-3<br />
environment operations, 2-1<br />
fixed-length records, 10-2<br />
selecting, 2-1<br />
variable-length record, 10-3<br />
BIAS<br />
R$FILE assembly-time parameter,<br />
description, 5-6<br />
SORT processor parameter,<br />
description, 3-16<br />
bias factor, independent of disk sorts, 10-4<br />
BLOCK parameter, description, 3-16<br />
blocks<br />
characteristics, defining with BLOCK<br />
parameter, 3-16<br />
granules, specifying with BLOCK<br />
parameter, 3-16<br />
blocks, size<br />
minimum for M1 module, 3-41<br />
minimum for M2 module, 3-42<br />
bulk interface, 8-9<br />
7831 0687–010 Index–1<br />
C<br />
C program<br />
linkages, 7-1<br />
SORT subroutine linkages, 8-1<br />
CCSLOCNUM configuration parameter,<br />
description, 9-2<br />
CCSLOCNUMCHK configuration parameter,<br />
description, 9-2<br />
CHECK<br />
R$FILE assembly-time parameter,<br />
description, 5-6<br />
SORT processor parameter,<br />
description, 3-18<br />
CHECKD R$FILE assembly-time parameter,<br />
description, 5-7<br />
CHECKF R$FILE assembly-time parameter,<br />
description, 5-8<br />
CHECKK R$FILE assembly-time parameter,<br />
description, 5-8
Index<br />
checkpoint, writing with CKPT<br />
parameter, 3-19<br />
checksum operations<br />
eliminating with CHECK parameter, 3-18<br />
forcing elimination with CHECKSUM<br />
parameter, 5-6<br />
setting the mesh count in<br />
disk modules, CHECKK R$FILE<br />
parameter, 5-8<br />
M1 mass storage, CHECKD R$FILE<br />
parameter, 5-7<br />
M2 mass storage, CHECKF R$FILE<br />
parameter, 5-8<br />
tape modules, CHECKT R$FILE<br />
parameter, 5-9<br />
specifying frequency, 3-18<br />
CHECKSUM SORT processor parameter,<br />
description, 3-18<br />
CHECKT R$FILE assembly-time parameter,<br />
description, 5-9<br />
CKPT SORT processor parameter,<br />
description, 3-19<br />
code-type numbers, setting, 9-2<br />
CODE-TYPE processor parameter, 3-20<br />
collating sequence<br />
automatic generation with SEQX<br />
parameter, 3-61<br />
specifying alternate<br />
with SEQ parameter, 3-60<br />
with SEQA parameter, 3-60<br />
with SEQC parameter, 3-61<br />
combining index keys with ISAM input<br />
records, 3-35<br />
common bank interface, sample program, C-1<br />
COMP C program parameter, 7-5<br />
COMP R$FILE assembly-time parameter,<br />
description, 5-9<br />
COMP routine, writing user own code, 6-21,<br />
7-22<br />
compatibility, with previous levels, 1-15<br />
completion messages, deleting with DELLOG<br />
parameter, 3-24<br />
COMUS, CONFIGURE command, E-1<br />
configuration of internal parameters, E-1<br />
configuration parameters, 9-1<br />
AUTOMATIC, 9-1<br />
CCSLOCNUM, 9-2<br />
CCSLOCNUMCHK, 9-2<br />
CONSOLE, 9-3<br />
DEFBMCORE, 9-3<br />
DEFDK, 9-4<br />
DEFLOCALE, 9-4<br />
DEFTP, 9-5<br />
DEFXA, 9-5<br />
DEFXB, 9-6<br />
LOG, 9-6<br />
MAXIMUM, 9-7<br />
MINIMUM, 9-7<br />
MSAMBLOCK, 9-8<br />
NUMRECWARN, 9-8<br />
PRCERRCONS, 9-9<br />
PREPDEFAULT, 9-11<br />
PROCESSING, 9-10<br />
RBSIZE, 9-11<br />
configuration procedure<br />
using full-screen mode, E-1<br />
using line mode, E-9<br />
CONFIGURE, COMUS command, E-1<br />
configuring <strong>Sort</strong>/<strong>Merge</strong><br />
sample session<br />
using full-screen mode, E-1<br />
using line mode, E-9<br />
CONSOLE<br />
R$FILE assembly-time parameter,<br />
description, 5-10<br />
SORT processor parameter,<br />
description, 3-21<br />
CONSOLE C program parameter, 7-6<br />
CONSOLE configuration parameter,<br />
description, 9-3<br />
console messages, deleting, 3-23<br />
CONTA R$FILE assembly-time parameter,<br />
description, 5-10<br />
CONTB R$FILE assembly-time parameter,<br />
description, 5-11<br />
CONTC R$FILE assembly-time parameter,<br />
description, 5-12<br />
COPY<br />
R$FILE assembly-time parameter,<br />
description, 5-12<br />
SORT processor parameter,<br />
description, 3-21<br />
COPY C program parameter, 7-7<br />
copy operation, performing with COPY<br />
parameter, 3-21<br />
CORE<br />
R$FILE assembly-time parameter,<br />
description, 5-13<br />
SORT processor parameter,<br />
description, 3-21, 10-1<br />
core area<br />
maximum size calculation, 10-1<br />
minimum size calculation, 10-1<br />
specifying size with CORE parameter, 10-1<br />
CORE C program parameter, 7-7<br />
Index–2 7831 0687–010
core memory<br />
maximum number of words, specifying<br />
with MAXIMUM parameter, 9-7<br />
minimum number of words, specifying<br />
with MINIMUM parameter, 9-7<br />
creating indexed files, examples, B-11<br />
D<br />
data<br />
records, reformatting with SELECT<br />
parameter, 3-59<br />
reduction own routine, executing with<br />
SORT subroutines, 5-15<br />
DATA SORT processor parameter,<br />
description, 3-22<br />
date<br />
18-bit format, 11-4<br />
setting year 2000, 5-14<br />
year 2000 format, 11-4<br />
DATE key field, defining first year, 3-23<br />
d-bank address parameter, 8-4<br />
DEFBMCORE configuration parameter,<br />
description, 9-3<br />
DEFDK configuration parameter,<br />
description, 9-4<br />
defining<br />
blocking characteristics, BLOCK<br />
parameter, 3-16<br />
SORT processor files, 3-10<br />
DEFLOCALE configuration parameter,<br />
description, 9-4<br />
DEFTP configuration parameter,<br />
description, 9-5<br />
DEFXA configuration parameter,<br />
description, 9-5<br />
DEFXB configuration parameter,<br />
description, 9-6<br />
DEFYEAR<br />
processor parameter, 3-23<br />
R$FILE assembly-time parameter,<br />
description, 5-14<br />
DELCON<br />
R$FILE assembly-time parameter,<br />
description, 5-15<br />
SORT processor parameter,<br />
description, 3-23<br />
deleting console messages, DELCON<br />
parameter, 3-23<br />
Index<br />
DELLOG<br />
R$FILE assembly-time parameter,<br />
description, 5-15<br />
SORT processor parameter,<br />
description, 3-24<br />
determining<br />
block size, disk sorts, 10-4<br />
character type of data processed, DATA<br />
parameter, 3-22<br />
input volume, order of precedence, 3-73<br />
internal merge power, 10-4<br />
diagnostic messages, listing and<br />
description, A-1<br />
directing<br />
the SORT processor, 2-1<br />
the SORT subroutines, 2-1<br />
disk scratch files<br />
assigning mnemonic<br />
DEFDK, 9-4<br />
DEFTP, 9-5<br />
disk sorts<br />
basic mode, 10-3<br />
conditions for using, 10-3<br />
differences between basic and<br />
extended, 10-3<br />
DISKS SORT processor parameter,<br />
description, 3-24<br />
extended mode, 10-3<br />
formula for determining the size of scratch<br />
files, 10-4<br />
producing fewest number of strings, 10-4<br />
scratch file assignment<br />
considerations, 10-4<br />
SORT processor operation, 2-1<br />
usage of sequential data, 10-4<br />
disk, module, not collected into program, 5-29<br />
DISKS SORT processor parameter<br />
description, 3-24<br />
scratch facility assignment process, 3-73<br />
distribution phase of a tape sort,<br />
description, 12-3<br />
DROC C program parameter, 7-8<br />
DROC R$FILE assembly-time parameter,<br />
description, 5-15<br />
DROC routine, writing user own code, 6-22,<br />
7-23<br />
DRUM SORT processor parameter<br />
description, 3-25<br />
scratch facility assignment process, 3-73<br />
DSDF input file, record structure, 3-70<br />
dynamically assigning the output file,<br />
examples, B-12<br />
7831 0687–010 Index–3
Index<br />
E<br />
ECL, See Executive Control Language<br />
eliminating checksum operations,<br />
CHECKSUM SORT processor<br />
parameter, 3-18<br />
END C program parameter, 7-10<br />
environment<br />
basic mode, 1-4, 2-1<br />
extended mode, 1-4, 2-1<br />
supported on OS 2200 system, 2-1<br />
EQUIP SORT processor parameter,<br />
description, 3-27<br />
equipment files, identifying with EQUIP<br />
parameter, 3-27<br />
ERROR R$FILE assembly-time parameter,<br />
description, 5-16<br />
ESORT SORT processor parameter<br />
description, 3-27<br />
limitations when using, 3-27<br />
unconditionally perform an extended mode<br />
sort, 2-2<br />
when not to be specified, 2-2<br />
ESTIMATE SORT processor parameter,<br />
description, 3-28<br />
estimating time for an operation, ESTIMATE<br />
parameter, 3-28<br />
estimations, factor that affects sort<br />
operation, 3-71<br />
execution-time parameters, 5-51<br />
Executive control language, options and<br />
parameters<br />
file formats, 1-3<br />
input data type, 1-3<br />
processor call, 1-3<br />
processor mode, 1-3<br />
exit numbers<br />
explanation of, 4-3<br />
using, 4-1<br />
extended core area, 2-1<br />
extended mode<br />
disk sorts, maximum number of scratch<br />
files, 10-3<br />
environment, 1-4, 2-1<br />
fixed-length record, 10-2<br />
main-storage-only, formula for calculating<br />
usage, 10-2<br />
selecting, 2-1<br />
sort<br />
directing the SORT processor to<br />
perform, 1-4<br />
disk sort, 10-3<br />
example, B-12<br />
performing with ESORT parameter, 3-27<br />
SORT subroutines selection factors, 2-6<br />
variable-length record, 10-3<br />
using the SORT processor in, 2-2<br />
using the SORT subroutine in, 2-6<br />
extended mode sort, permission setting<br />
(AUTOMATIC parameter), 9-1<br />
Index–4 7831 0687–010<br />
F<br />
FAST SORT processor parameter<br />
description, 3-29<br />
scratch facility assignment process, 3-73<br />
Fieldata<br />
alphanumeric key field, description, 11-2<br />
sign leading overpunch key field,<br />
description, 11-7<br />
sign leading separate key field,<br />
description, 11-3<br />
sign trailing overpunch key field,<br />
description, 11-7<br />
sign trailing separate decimal key field,<br />
description, 11-5<br />
file identification parameters, definition, 3-10<br />
file type, specifying with MODE<br />
parameter, 3-44<br />
FILEID SORT processor parameter,<br />
description, 3-30<br />
FILEIN SORT processor parameter,<br />
description, 3-30<br />
FILEOUT SORT processor parameter,<br />
description, 3-32<br />
FILES C program parameter, 7-10<br />
FILES R$FILE assembly-time parameter,<br />
description, 5-18<br />
FILESIN SORT processor parameter,<br />
description, 3-33<br />
final merge phase, 12-10<br />
FINAL R$FILE assembly-time parameter,<br />
description, 5-19<br />
fixed-length records<br />
compared with variable-length record<br />
sorting, 10-6<br />
formula for calculating basic mode<br />
memory storage, 10-2<br />
formula for calculating extended mode<br />
memory storage, 10-2<br />
safety factor for calculating main<br />
storage, 10-3
FPOC R$FILE assembly-time parameter,<br />
description, 5-19<br />
full-screen mode, sample configuration<br />
session, E-1<br />
G<br />
global parameters, list of, 3-3<br />
I<br />
IBM signed binary key field, description, 11-7<br />
include element for UCS C linkages, 8-1<br />
index keys<br />
combining with ISAM input records, 3-35<br />
identifying as MSAM output, MSKEY<br />
parameter, 3-48<br />
identifying as MSAM output, MSKEYW<br />
parameter, 3-49<br />
separating from record with SPLIT<br />
parameter, 3-63<br />
indexed files, creation example, B-11<br />
INFO C program parameter, 7-11<br />
input<br />
data ordering, BIAS parameter, 3-16<br />
file, specifying with FILEIN<br />
parameter, 3-30<br />
operation files, FILESIN parameter, 3-33<br />
volume, determining, 3-73<br />
input records<br />
number to sort with RECORD<br />
parameter, 3-52<br />
preserving the order, 3-51<br />
stop processing, 3-64<br />
inserting global parameters, example, 3-6<br />
intermediate<br />
merge phase of a tape sort, 12-6<br />
merge phase of a tape sort<br />
description, 12-3<br />
merge technique, used by disk sorts, 10-4<br />
internal parameters, configuration of, E-1<br />
Internationalization character set format, 11-5<br />
Internationalization, defining locale, 3-43<br />
IPURI$ MASM tape sort linkage, 6-11<br />
ISAM output file, specifying an ascending<br />
index key for, 3-33, 3-34<br />
ISAM/MSAM input file, record structure, 3-70<br />
ISKEY SORT processor parameter,<br />
description, 3-33<br />
Index<br />
ISKEYW SORT processor parameter,<br />
description, 3-34<br />
issuing<br />
completion messages, LOG<br />
parameter, 3-44<br />
operator console messages during sort<br />
run, CONSOLE parameter, 3-21<br />
7831 0687–010 Index–5<br />
J<br />
JOIN SORT processor parameter,<br />
description, 3-35<br />
K<br />
KEY<br />
R$FILE assembly-time parameter,<br />
description, 5-20<br />
SORT processor parameter,<br />
description, 3-35<br />
KEY C program parameter, 7-12<br />
key field<br />
formats, list of, 11-2<br />
translations<br />
introduction, 11-1<br />
<strong>Sort</strong>/<strong>Merge</strong> key fields, 11-2<br />
using MASM compare instructions, 11-1<br />
treating parts of records as, 3-35, 3-38<br />
used for sort or merge operation<br />
KEY R$FILE assembly-time<br />
parameter, 5-20<br />
KEYW R$FILE assembly-time<br />
parameter, 5-24<br />
KEYW<br />
R$FILE assembly-time parameter,<br />
description, 5-24<br />
SORT processor parameter,<br />
description, 3-38<br />
L<br />
LABEL SORT processor parameter,<br />
description, 3-41<br />
label, indicating the presence of with LABEL<br />
parameter, 3-41<br />
LIMDRM SORT processor parameter,<br />
description, 3-41<br />
LIMFST SORT processor parameter,<br />
description, 3-42
Index<br />
line mode, sample configuration session, E-9<br />
link sizes, affect on sorting, 10-7<br />
LINKSZ SORT processor parameter<br />
description, 3-42<br />
specifying size, 10-6<br />
local parameters<br />
list of, 3-3<br />
specification, syntax format, 3-8<br />
LOCALE C program parameter, 7-14<br />
locale number, setting, 9-2<br />
LOCALE processor parameter, 3-43<br />
LOCALE, R$FILE assembly-time parameter,<br />
description, 5-27<br />
LOG<br />
R$FILE assembly-time parameter,<br />
description, 5-28<br />
SORT processor parameter,<br />
description, 3-44<br />
LOG C program parameter, 7-15<br />
LOG configuration parameter, description, 9-6<br />
log run<br />
issuing normal completion messages<br />
to, 5-28<br />
omitting sort completion messages<br />
from, 5-15<br />
logical records, skipping with SKIP<br />
parameter, 3-62<br />
LPOC R$FILE assembly-time parameter,<br />
description, 5-28<br />
M<br />
M1 scratch file, assigning mnemonic, DEFXA<br />
configuration parameter, 9-5<br />
M1:, See one-level mass storage sorts (M1))<br />
M2, scratch file, assigning mnemonic<br />
DEFXB configuration parameter, 9-6<br />
M2:, See two-level mass storage sorts (M2)<br />
main storage used for sort algorithm, 3-21<br />
MASM merge program linkages, 6-14<br />
MASM program coding parameter table<br />
entries as constants, 5-50<br />
MASM program linkages, 6-1<br />
interface aids, 6-19<br />
procedure definition elements, 6-2<br />
sort<br />
open linkages, 6-4<br />
program linkages, 6-3<br />
quick end linkages, 6-10<br />
release linkages, 6-5<br />
return linkages, 6-9<br />
sort release linkages, 6-8<br />
tape sort linkages, 6-11<br />
IPURI$, 6-11<br />
user routine substitution<br />
considerations, 6-20<br />
MASM program linkages merge<br />
close linkages, 6-18<br />
open linkages, 6-14<br />
program linkages, 6-14<br />
release linkages, 6-16<br />
request linkages, 6-17<br />
MASM program used to access SORT,<br />
examples, C-1<br />
mass storage<br />
files used as scratch files, 3-24<br />
modules (M1 and M2) not collected in<br />
program, 5-29<br />
prep size<br />
specifying with PREPDEFAULT<br />
parameter, 9-11<br />
MAXIMUM configuration parameter,<br />
description, 9-7<br />
memory<br />
sort, 2-1<br />
specifying amount for a sort, 5-13<br />
merge<br />
operation, performing with MERGE<br />
parameter, 3-44<br />
subroutine mode, description, 1-5<br />
merge phase<br />
final, 12-10<br />
intermediate, 12-6<br />
merge program linkages<br />
sample program, D-5<br />
UCS C, 8-21<br />
MERGE SORT processor parameter,<br />
description, 3-44<br />
merging files into output file, examples, B-5<br />
mesh count setting for checksum calculations<br />
disk module, 5-8<br />
one-level mass storage, 5-7<br />
tape modules, 5-9<br />
two-level mass storage, 5-8<br />
messages, issuing to operator console<br />
(CONSOLE parameter), 9-3<br />
MINIMUM configuration parameter,<br />
description, 9-7<br />
MODE SORT processor parameter,<br />
description, 3-44<br />
MOVE SORT processor parameter,<br />
description, 3-47<br />
Index–6 7831 0687–010
MSAM support<br />
MSAMBLOCK parameter description, 9-8<br />
removing, 3-56<br />
MSAMBLOCK configuration parameter,<br />
description, 9-8<br />
MSKEY SORT processor parameter,<br />
description, 3-48<br />
MSKEYW SORT processor parameter,<br />
description, 3-49<br />
N<br />
NODISK R$FILE assembly-time parameter,<br />
description, 5-29<br />
NOMASS R$FILE assembly-time parameter,<br />
description, 5-29<br />
nonautomatic tape sorts<br />
description, 12-2<br />
PARTA sorts, 12-2<br />
PARTB sorts, 12-2<br />
PARTC sorts, 12-2<br />
nonreentrant sort, processor call, 3-1<br />
NOTAPE R$FILE assembly-time parameter,<br />
description, 5-29<br />
NUMREC SORT processor parameter,<br />
description, 3-50<br />
NUMRECWARN configuration parameter,<br />
description, 9-8<br />
O<br />
one-level mass storage sorts (M1)<br />
description of, 10-5<br />
guidelines on assigning M1 file, 10-5<br />
identifying file information with DRUM<br />
parameter, 3-25<br />
M1 file assignment considerations, 10-5<br />
specifying minimum block size, LIMDRM<br />
parameter, 3-41<br />
operation control parameter<br />
definition, 3-10<br />
SORT processor parameter, 3-63<br />
operator<br />
console messages<br />
deleting during a sort, DELCON R$FILE<br />
parameter, 5-15<br />
deleting with DELCON parameter, 3-23<br />
executing during a sort, CONSOLE<br />
R$FILE parameter, 5-10<br />
issuing with CONSOLE parameter, 3-21<br />
Index<br />
information, definition, 3-71<br />
OPTION C program parameter, 7-15<br />
OPTION R$FILE assembly-time parameter,<br />
description, 5-30<br />
ordered sequences, informing SORT<br />
subroutines of number, 5-6<br />
OS 2200<br />
signed binary key field, description, 11-3<br />
systems, environments supported, 2-1<br />
output file<br />
dynamically assigning, example, B-12<br />
merging files into, B-5<br />
sorting and producing, B-2<br />
specifying with FILEOUT SORT processor<br />
parameter, 3-32<br />
output, operations, specifying file for, 3-32<br />
overlapping types, rules for, 3-38, 3-40<br />
OWN SORT processor parameter,<br />
description, 3-50<br />
7831 0687–010 Index–7<br />
P<br />
P execution-time option, 5-51<br />
Packed Decimal Format Key Field,<br />
description, 11-6<br />
PAD C program parameter, 7-16<br />
PAD R$FILE assembly-time parameter,<br />
description, 5-31<br />
parameter<br />
groups, SORT processor, 3-10<br />
internal, configuration of, E-1<br />
specifications, syntax rules, 3-8<br />
table<br />
coding entries as constants, 5-50<br />
definition, 5-1<br />
generating and using, 5-1<br />
parameter, 8-4<br />
saving space for additional<br />
information, 5-31<br />
parameters, execution-time, 5-51<br />
PARTA<br />
R$FILE assembly-time parameter,<br />
description, 5-31<br />
sort<br />
continuing after interruption, 5-10<br />
transferring control after<br />
completion, 5-19<br />
PARTB<br />
R$FILE assembly-time parameter,<br />
description, 5-33
Index<br />
sort<br />
continuing after interruption, 5-11<br />
transferring control after<br />
completion, 5-19<br />
PARTC, R$FILE assembly-time parameter,<br />
description, 5-34<br />
performance, extended mode sort, 2-1<br />
performing a<br />
copy operation, COPY parameter, 3-21<br />
disk sort, DISKS parameter, 3-24<br />
extended mode sort, example, B-12<br />
MERGE operation, MERGE<br />
parameter, 3-44<br />
RETRIEVE operation, RETRIEVE<br />
parameter, 3-55<br />
TAG/RETRIEVE sort, example, B-10<br />
time estimate for an operation, ESTIMATE<br />
parameter, 3-28<br />
P-option, suppressing at execution time, 5-30<br />
PRCERRCONS configuration parameter,<br />
description, 9-9<br />
PREP SORT processor parameter,<br />
description, 3-51<br />
PREPDEFAULT configuration parameter,<br />
description, 9-11<br />
prepping factor, specifying, 3-51<br />
PRESERVE<br />
C program parameter, 7-16<br />
R$FILE assembly-time parameter,<br />
description, 5-34<br />
SORT processor parameter,<br />
description, 3-51<br />
printing the contents of a file, examples, B-1<br />
PROCESSING configuration parameter,<br />
description, 9-10<br />
PROCESSING SORT processor parameter,<br />
description, 3-52<br />
processor<br />
mode<br />
COPY, description, 1-4<br />
MERGE, description, 1-4<br />
procedure for requesting, 1-4<br />
SORT, description, 1-4<br />
usage, examples, B-1<br />
processor parameters, See SORT processor<br />
parameters<br />
producing an output file, examples, B-2<br />
R<br />
R$FILE assembly-time parameters<br />
BIAS, 5-6<br />
CHECK, 5-6<br />
CHECKD, 5-7<br />
CHECKF, 5-8<br />
CHECKK, 5-8<br />
CHECKT, 5-9<br />
COMP, 5-9<br />
CONSOLE, 5-10<br />
CONTA, 5-10<br />
CONTB, 5-11<br />
CONTC, 5-12<br />
COPY, 5-12<br />
CORE, 5-13<br />
DEFYEAR, 5-14<br />
DELCON, 5-15<br />
DELLOG, 5-15<br />
DROC, 5-15<br />
ERROR, 5-16<br />
FILES, 5-18<br />
FINAL, 5-19<br />
FPOC, 5-19<br />
KEY, 5-20<br />
KEYW, 5-24<br />
listed, (table), 5-2<br />
LOCALE, 5-27<br />
LOG, 5-28<br />
LPOC, 5-28<br />
NODISK, 5-29<br />
NOMASS, 5-29<br />
NOTAPE, 5-29<br />
OPTION, 5-30<br />
PAD, 5-31<br />
PARTA, 5-31<br />
PARTB, 5-33<br />
PARTC, 5-34<br />
PRESERVE, 5-34<br />
RECAREA, 5-34<br />
REDOA, 5-35<br />
REDOB, 5-36<br />
RSZ, 5-37<br />
RSZA, 5-37<br />
RSZB, 5-38<br />
RSZW, 5-38<br />
SEQ, 5-39<br />
SEQA, 5-40<br />
SEQB, 5-41<br />
SEQC, 5-42<br />
SEQD, 5-43<br />
SEQE, 5-43<br />
SEQF, 5-44<br />
SEQK, 5-45<br />
SMRG, 5-46<br />
VOL, 5-47<br />
Index–8 7831 0687–010
VRSZ, 5-47<br />
VRSZA, 5-48<br />
VRSZB, 5-48<br />
VRSZW, 5-49<br />
RBSIZE configuration parameter,<br />
description, 9-11<br />
reading, indexed files, examples, B-11<br />
RECAREA R$FILE assembly-time parameter,<br />
description, 5-34<br />
record address parameter, 8-9<br />
record information packet parameter, 8-4<br />
RECORD SORT processor parameter,<br />
description, 3-52<br />
records<br />
determining output order, PRESERVE<br />
R$FILE parameter, 5-34<br />
executing a user routine when<br />
compared, 5-9<br />
indicating length with RSZ parameter, 3-57<br />
number to process using NUMREC<br />
parameter, 3-50<br />
number to sort with RECORD<br />
parameter, 3-52<br />
preserving the order of input, 3-51<br />
processed test, ACCEPT parameter, 3-11<br />
rejecting with REJECT parameter, 3-53<br />
selecting classifications, examples, B-5<br />
separating from index key with SPLIT<br />
parameter, 3-63<br />
REDOA R$FILE assembly-time parameter,<br />
description, 5-35<br />
REDOB R$FILE assembly-time parameter,<br />
description, 5-36<br />
REELS parameter, description, 3-53<br />
reentrant sort, processor call statement, 3-1<br />
reformatting data records with SELECT<br />
parameter, 3-59<br />
REJECT parameter, description, 3-53<br />
removable disk packs, used with sort scratch<br />
files, 10-4<br />
RENCY$ MASM tape sort linkage, 6-12<br />
requesting<br />
a SORT operation, 3-10<br />
a TAG operation, 3-10<br />
result status parameter, 8-2<br />
retrieve operation, performing with RETRIEVE<br />
parameter, 3-55<br />
RETRIEVE SORT processor parameter,<br />
description, 3-55<br />
REVMSAMBLK SORT processor parameter,<br />
description, 3-56<br />
Index<br />
RINFO$ MASM tape sort linkage, 6-13<br />
routines, executing user routines with OWN<br />
parameter, 3-50<br />
RSZ<br />
R$FILE assembly-time parameter,<br />
description, 5-37<br />
SORT processor parameter,<br />
description, 3-57<br />
RSZ C program parameter, 7-17<br />
RSZA R$FILE assembly-time parameter,<br />
description, 5-37<br />
RSZB R$FILE assembly-time parameter,<br />
description, 5-38<br />
RSZW R$FILE assembly-time parameter,<br />
description, 5-38<br />
run log, LOG configuration parameter<br />
description, 9-6<br />
run-condition word, 3-74<br />
runstream example, SORT processor, 3-9<br />
7831 0687–010 Index–9<br />
S<br />
scratch facility<br />
assigning, examples, B-8<br />
assignment process, 3-73<br />
assignment, factor of sort operation, 3-72<br />
determining, examples, B-8<br />
scratch files<br />
controlling the placement in disk<br />
sorts, 10-4<br />
determining the size for a disk sort, 10-4<br />
disk sort assignment considerations, 10-4<br />
example for determining the size used in<br />
disk sorts, 10-4<br />
listing names used by SORT<br />
subroutines, 5-18<br />
maximum number when using disk<br />
sorts, 10-3<br />
names when using disk sorts, 10-3<br />
naming guidelines, 3-72<br />
tape files used as, 3-70<br />
using mass storage files as, 3-24<br />
SELECT SORT processor parameter,<br />
description, 3-59<br />
SEQ<br />
R$FILE assembly-time parameter,<br />
description, 5-39<br />
SORT processor parameter<br />
description, 3-60<br />
SEQ C program parameter, 7-18
Index<br />
SEQA<br />
R$FILE assembly-time parameter,<br />
description, 5-40<br />
SORT processor parameter,<br />
description, 3-60<br />
SEQB R$FILE assembly-time parameter,<br />
description, 5-41<br />
SEQC<br />
R$FILE assembly-time parameter,<br />
description, 5-42<br />
SORT processor parameter,<br />
description, 3-61<br />
SEQD R$FILE assembly-time parameter,<br />
description, 5-43<br />
SEQE R$FILE assembly-time parameter,<br />
description, 5-43<br />
SEQF R$FILE assembly-time parameter,<br />
description, 5-44<br />
SEQK R$FILE assembly-time parameter,<br />
description, 5-45<br />
SEQX SORT processor parameter,<br />
description, 3-61<br />
SKIPL SORT processor parameter,<br />
description, 3-62<br />
skipping logical records with SKIP<br />
parameter, 3-62<br />
SMRG R$FILE assembly-time parameter<br />
automatic tape sorts, 12-1<br />
description, 5-46<br />
sort<br />
disk, 2-1<br />
large, 2-1<br />
memory, 2-1<br />
tape, 2-1<br />
sort completion messages, deleting with<br />
DELLOG parameter, 3-24<br />
SORT operation<br />
factors that affect, 3-71<br />
performing with SORT parameter, 3-63<br />
requesting, 3-10<br />
SORT processor<br />
activating, 1-3, 3-1<br />
basic mode, 1-4<br />
description of, 1-3<br />
error messages, A-1<br />
extended mode, 1-4<br />
parameter groups, 3-10<br />
parameter types, 3-3<br />
processor modes<br />
COPY, 1-4<br />
MERGE, 1-4<br />
program structure, 3-6<br />
runstream example, 3-9<br />
syntax rules example, 3-7<br />
using in extended mode, 2-2<br />
SORT processor call statement<br />
X option, 2-2<br />
Y option, 2-2<br />
SORT processor parameters<br />
ACCEPT, 3-11<br />
ALLOW, 3-13<br />
BIAS, 3-16<br />
BLOCK, 3-16<br />
CHECK, 3-18<br />
CHECKSUM, 3-18<br />
CKPT, 3-19<br />
CODE-TYPE, 3-20<br />
CONSOLE, 3-21<br />
COPY, 3-21<br />
CORE, 3-21, 10-1<br />
DATA, 3-22<br />
DEFYEAR, 3-23<br />
DELCON, 3-23<br />
DELLOG, 3-24<br />
description, 3-63<br />
DISKS, 3-24<br />
DRUM, 3-25<br />
EQUIP, 3-27<br />
ESORT, 3-27<br />
ESTIMATE, 3-28<br />
FAST, 3-29<br />
FILEID, 3-30<br />
FILEIN, 3-30<br />
FILEOUT, 3-32<br />
FILESIN, 3-33<br />
ISKEY, 3-33<br />
ISKEYW, 3-34<br />
JOIN, 3-35<br />
KEY, 3-35<br />
KEYW, 3-38<br />
LABEL, 3-41<br />
LIMDRM, 3-41<br />
LIMFST, 3-42<br />
LINKSZ, 3-42<br />
list of, 3-3<br />
LOCALE, 3-43<br />
LOG, 3-44<br />
MERGE, 3-44<br />
MODE, 3-44<br />
MOVE, 3-47<br />
MSKEY, 3-48<br />
MSKEYW, 3-49<br />
NUMREC, 3-50<br />
OWN, 3-50<br />
PREP, 3-51<br />
PRESERVE, 3-51<br />
Index–10 7831 0687–010
PROCESSING, 3-52<br />
RECORD, 3-52<br />
REELS, 3-53<br />
REJECT, 3-53<br />
RETRIEVE, 3-55<br />
REVMSAMBLK, 3-56<br />
RSZ, 3-57<br />
SELECT, 3-59<br />
SEQ, 3-60<br />
SEQA, 3-60<br />
SEQC, 3-61<br />
SEQX, 3-61<br />
SKIPL, 3-62<br />
SORT, 3-63<br />
SPLIT, 3-63<br />
STOP, 3-64<br />
STOPAPP, 3-67<br />
TAG, 3-68<br />
TAGFILE, 3-69<br />
TAPES, 3-70<br />
VOLUME, 3-71<br />
SORT processor:, See also SORT<br />
subroutines<br />
SORT program linkages, sample program, D-1<br />
SORT subroutines, See also SORT processor<br />
description of, 1-4<br />
error messages, A-18<br />
extended mode, 1-5<br />
factors for selecting an extended mode<br />
sort, 2-6<br />
linkages for UCS C programs, 8-1<br />
parameter tables for MASM programs, 5-1<br />
processor mode, 1-5<br />
summary messages, A-34<br />
terminating the sort in error, 2-6<br />
transferring control after errors, 5-16<br />
UCS C merge<br />
close linkage, 8-25<br />
open linkage, 8-21<br />
program linkages, 8-21<br />
release linkage, 8-22<br />
request linkage, 8-23<br />
UCS C program linkage parameters, 8-2<br />
UCS C program linkages<br />
d-bank address parameter, 8-4<br />
parameter table parameter, 8-4<br />
record address parameter, 8-9<br />
record packet parameter, 8-4<br />
result status parameter, 8-2<br />
UCS C programs, 7-1<br />
COMP parameter, 7-5<br />
CONSOLE parameter, 7-6<br />
COPY parameter, 7-7<br />
Index<br />
CORE parameter, 7-7<br />
DROC parameter, 7-8<br />
END parameter, 7-10<br />
FILES parameter, 7-10<br />
INFO parameter, 7-11<br />
KEY parameter, 7-12<br />
LOCALE parameter, 7-14<br />
LOG parameter, 7-15<br />
OPTION parameter, 7-15<br />
PAD parameter, 7-16<br />
parameters, 7-4<br />
PRESERVE parameter, 7-16<br />
RSZ parameter, 7-17<br />
SEQ parameter, 7-18<br />
setting up parameter table, 7-2<br />
START parameter, 7-19<br />
user routine substitution, 7-21<br />
VOL parameter, 7-20<br />
VRSZ parameter, 7-20<br />
UCS C sort<br />
close linkages, 8-21<br />
open linkages, 8-14<br />
program linkages, 8-14<br />
release linkages, 8-15<br />
return linkages, 8-18<br />
sort linkages, 8-18<br />
using in extended mode, 2-6<br />
<strong>Sort</strong> types<br />
basic mode main-storage-only, 10-2<br />
extended mode main-storage-only, 10-2<br />
list of, 10-2<br />
<strong>Sort</strong>/<strong>Merge</strong><br />
abilities, 1-1<br />
definition, 1-1<br />
key field formats, 11-2<br />
sort/merge operation, tailoring, 1-4<br />
<strong>Sort</strong>/<strong>Merge</strong> processor, See SORT processor<br />
<strong>Sort</strong>/<strong>Merge</strong> subroutine, See SORT<br />
subroutines<br />
sorting<br />
a file, examples, B-2<br />
algorithm, identifying necessary main<br />
storage, 3-21<br />
specifying<br />
an ascending index key for an ISAM, 3-33,<br />
3-34<br />
input file with FILEIN parameter, 3-30<br />
specifying core area size, CORE<br />
parameter, 10-1<br />
SPLIT SORT processor parameter,<br />
description, 3-63<br />
START C program parameter, 7-19<br />
7831 0687–010 Index–11
Index<br />
stop conditionally input record<br />
processing, 3-64<br />
STOP processor parameter, 3-64<br />
STOPAPP processing parameter, 3-67<br />
subroutines, substituting, 1-4<br />
syntax rules<br />
example, SORT processor, 3-7<br />
for local parameter specifications, 3-8<br />
for SORT processor parameter<br />
specifications, 3-7<br />
T<br />
table parameters, allowing acceptance from<br />
more than one table, 5-12<br />
tag<br />
operation, requesting, 3-10<br />
sort, performing with TAG parameter, 3-68<br />
TAG SORT processor parameter,<br />
description, 3-68<br />
TAG/RETRIEVE sort, example, B-10<br />
tagfile<br />
record structures, 3-70<br />
specifying name used with RETRIEVE<br />
parameter, 3-69<br />
TAGFILE SORT processor parameter,<br />
description, 3-69<br />
tailoring the sort/merge operation, 1-4<br />
tape<br />
files, used as scratch files, 3-70<br />
marks, specifying number to bypass, 3-47<br />
merge power calculations, 12-3<br />
module<br />
not collected in program, 5-29<br />
setting the mesh count for checksum<br />
calculation, 5-9<br />
reel, specifying numbers of uncataloged<br />
tape files, 3-53<br />
sort<br />
description, 10-6<br />
performing distribution phase of<br />
nonautomatic sort, 5-31<br />
performing final phase of nonautomatic<br />
sort, 5-34<br />
performing intermediate phase of<br />
nonautomatic sort, 5-33<br />
size restrictions, 10-6<br />
types of operations, 12-1<br />
tape sorts<br />
automatic, 12-1<br />
nonautomatic, 12-2<br />
TAPES SORT processor parameter<br />
description, 3-70<br />
scratch facility assignment process, 3-73<br />
tapesort, tape files used as scratch files,<br />
TAPE parameter, 3-70<br />
time estimate for an operation, ESTIMATE<br />
parameter, 3-28<br />
time parameter, used with nonautomatic tape<br />
sorts, 12-2<br />
translating key fields, MASM compare<br />
instructions, 11-1<br />
treating parts of records as key fields<br />
KEY parameter, 3-35<br />
KEYW parameter, 3-38<br />
two-level mass storage sorts<br />
description of, 10-5<br />
guidelines when assigning M1 and M2<br />
files, 10-5<br />
M1 file assignment considerations, 10-5<br />
minimum block size, LIMFST<br />
parameter, 3-42<br />
specifying file information, 3-29<br />
type<br />
A key field, specifying alternate collating<br />
sequence, 3-60<br />
S key field, specifying alternate collating<br />
sequence, 3-60, 3-61<br />
Index–12 7831 0687–010<br />
U<br />
UCS C program linkages, 7-1<br />
sample merge program, D-5<br />
sample sort program, D-1<br />
UCS C programs<br />
bulk interface, 8-9<br />
C merge<br />
close linkage, 8-25<br />
open linkage, 8-21<br />
program linkages, 8-21<br />
release linkage, 8-22<br />
request linkage, 8-23<br />
C sort<br />
close linkage, 8-21<br />
open linkage, 8-14<br />
release linkage, 8-15<br />
return linkage, 8-18<br />
sort linkage, 8-18<br />
C sort linkages, 8-14<br />
COMP parameter, 7-5<br />
CONSOLE parameter, 7-6<br />
COPY parameter, 7-7
CORE parameter, 7-7<br />
DROC parameter, 7-8<br />
END parameter, 7-10<br />
FILES parameter, 7-10<br />
INFO parameter, 7-11<br />
KEY parameter, 7-12<br />
linkage parameters, 8-2<br />
LOCALE parameter, 7-14<br />
LOG parameter, 7-15<br />
OPTION parameter, 7-15<br />
PAD parameter, 7-16<br />
parameters, 7-4<br />
PRESERVE parameter, 7-16<br />
RSZ parameter, 7-17<br />
SEQ parameter, 7-18<br />
setting up parameter table, 7-2<br />
SORT subroutine linkages, 8-1<br />
dbank address parameter, 8-4<br />
parameter table parameter, 8-4<br />
record address parameter, 8-9<br />
record packet parameter, 8-4<br />
result status parameter, 8-2<br />
START parameter, 7-19<br />
user routine substitution, 7-21<br />
VOL parameter, 7-20<br />
VRSZ parameter, 7-20<br />
Unsigned Binary Format Key Field,<br />
description, 11-10<br />
unsorted data, using, 1-5<br />
user<br />
DROC code, function, 6-22<br />
routine<br />
executing when comparing records, 5-9<br />
substitution codes, overview, 6-20<br />
using MASM compare instructions, key field<br />
translations, 11-1<br />
using, exit numbers, 4-1<br />
V<br />
variable-length records<br />
considerations, 10-6<br />
description, 10-6<br />
formula for calculating<br />
basic mode memory storage, 10-3<br />
extended mode memory storage, 10-3<br />
indicating significance to the sort, 3-42<br />
safety factor for calculating main<br />
storage, 10-3<br />
sorting<br />
Index<br />
compared to fixed-length record<br />
sorting, 10-6<br />
increasing efficiency, 10-6<br />
VOL C program parameter, 7-20<br />
VOL R$FILE assembly-time parameter,<br />
description, 5-47<br />
volume of input, VOLUME parameter, 3-71<br />
VOLUME SORT processor parameter,<br />
description, 3-71<br />
VRSZ<br />
R$FILE assembly-time parameter,<br />
description, 5-47<br />
variable-length record parameter,<br />
purpose, 10-6<br />
VRSZ C program parameter, 7-20<br />
VRSZA R$FILE assembly-time parameter,<br />
description, 5-48<br />
VRSZB R$FILE assembly-time parameter,<br />
description, 5-48<br />
VRSZW<br />
R$FILE assembly-time parameter,<br />
description, 5-49<br />
variable-length record parameter,<br />
purpose, 10-6<br />
7831 0687–010 Index–13<br />
W<br />
writing, a checkpoint, CKPT parameter, 3-19<br />
X<br />
XQT parameters, 5-51<br />
Y<br />
year 2000<br />
date format, 11-4<br />
DEFYEAR processor parameter, 3-23<br />
Special Characters<br />
@ASG, specifying core area size, 10-1<br />
@SORT<br />
call statement, 3-1<br />
processor usage examples, B-1<br />
program structure example, 3-6
Index<br />
Index–14 7831 0687–010
© 2010 <strong>Unisys</strong> Corporation.<br />
All rights reserved.<br />
*78310687-010*<br />
7831 0687–010