Table of Contents

SYSID Source

References

Source Listing

SYSID.MACRO.txt
  1. MACRO 00001000
  2. SYSID &DEFAULT= 00002000
  3. .* 00003000
  4. .*--------------------------------------------------------------------- 00004000
  5. .* This macro generates the SYSID list 00005000
  6. .*--------------------------------------------------------------------- 00006000
  7. .* 00007000
  8. GBLC &SY$ID SYSID invoked indicator 00008000
  9. LCLC &DEFSID Default SYSID 00009000
  10. &DEFSID SETC ' ' Make default SYSID blank 00010000
  11. .* 00011000
  12. .*--------------------------------------------------------------------- 00012000
  13. .* Make sure that the SYSID macro is only invoked once. 00013000
  14. .*--------------------------------------------------------------------- 00014000
  15. .* 00015000
  16. AIF ('&SY$ID' EQ 'HERE').DUP 00016000
  17. &SY$ID SETC 'HERE' Indicate SYSID Invoked 00017000
  18. GBLA &SIDCNT 00018000
  19. LCLC &SYSNAM,&SYSMOD,&SYSSER 00019000
  20. LCLA &INDEX 00020000
  21. &INDEX SETA 1 00021000
  22. &SIDCNT SETA N'&SYSLIST 00022000
  23. SPACE 1 00023000
  24. .* 00024000
  25. .*--------------------------------------------------------------------- 00025000
  26. .* Build the SYSID list, if specified 00026000
  27. .*--------------------------------------------------------------------- 00027000
  28. .* 00028000
  29. ENTRY DMKSYSIC,DMKSYSIL,DMKSYSID 00029000
  30. DMKSYSIC DC F'&SIDCNT' 00030000
  31. DMKSYSIL DS 0F 00031000
  32. .LOOP AIF (&INDEX GT &SIDCNT).LSTFIN 00032000
  33. AIF (&INDEX GT 255).TOOMANY 00033000
  34. AIF (N'&SYSLIST(&INDEX) LT 3).BADCNT 00034000
  35. AIF (N'&SYSLIST(&INDEX) GT 3).BADCNT 00035000
  36. &SYSNAM SETC '&SYSLIST(&INDEX,1)' 00036000
  37. &SYSMOD SETC '&SYSLIST(&INDEX,2)' 00037000
  38. &SYSSER SETC '&SYSLIST(&INDEX,3)' 00038000
  39. AIF (K'&SYSNAM LT 1).BADNAM 00039000
  40. AIF (K'&SYSNAM GT 8).BADNAM 00040000
  41. AIF (K'&SYSMOD LT 3).BADMOD 00041000
  42. AIF (K'&SYSMOD EQ 4).SKIPMOD 00042000
  43. AIF (K'&SYSMOD GT 4).BADMOD 00043000
  44. &SYSMOD SETC '0&SYSMOD' 00044000
  45. .SKIPMOD ANOP 00045000
  46. AIF (K'&SYSSER LT 5).BADSER 00046000
  47. AIF (K'&SYSSER EQ 6).SKIPSER 00047000
  48. AIF (K'&SYSSER GT 6).BADSER 00048000
  49. &SYSSER SETC '0&SYSSER' 00049000
  50. .SKIPSER ANOP 00050000
  51. DC CL8'&SYSNAM',XL1'00',XL3'&SYSSER',XL2'&SYSMOD' 00051000
  52. .NEXT ANOP 00052000
  53. &INDEX SETA &INDEX+1 00053000
  54. AGO .LOOP 00054000
  55. .* 00055000
  56. .*--------------------------------------------------------------------- 00056000
  57. .* Finished with the list. Now do the DEFAULT, if specified 00057000
  58. .*--------------------------------------------------------------------- 00058000
  59. .* 00059000
  60. .LSTFIN AIF (N'&DEFAULT EQ 0).FINISH 00060000
  61. AIF (N'&DEFAULT GT 1).MULDEF 00061000
  62. AIF (K'&DEFAULT LT 1).BADDEF 00062000
  63. AIF (K'&DEFAULT GT 8).BADDEF 00063000
  64. &DEFSID SETC '&DEFAULT' 00064000
  65. &SIDCNT SETA &SIDCNT+1 00065000
  66. .* 00066000
  67. .*--------------------------------------------------------------------- 00067000
  68. .* Finally, store the default SYSID in DMKSYSID 00068000
  69. .*--------------------------------------------------------------------- 00069000
  70. .* 00070000
  71. .FINISH ANOP 00071000
  72. DMKSYSID DS 0D 00072000
  73. DC CL8'&DEFSID' 00073000
  74. AIF (&SIDCNT LE 0).NULL 00074000
  75. SPACE 3 00075000
  76. MEXIT 00076000
  77. .* 00077000
  78. .*--------------------------------------------------------------------- 00078000
  79. .* Process errors 00079000
  80. .*--------------------------------------------------------------------- 00080000
  81. .* 00081000
  82. .BADCNT MNOTE 8,'Specify (systemid, model, serial) per SYSID entry' 00082000
  83. AGO .NEXT 00083000
  84. .* 00084000
  85. .BADNAM MNOTE 8,'Systemid ''&SYSNAM'' must be 1 to 8 characters long' 00085000
  86. AGO .NEXT 00086000
  87. .* 00087000
  88. .BADMOD MNOTE 8,'Model ''&SYSMOD'' must be 3 or 4 digits' 00088000
  89. AGO .NEXT 00089000
  90. .* 00090000
  91. .BADSER MNOTE 8,'Serial ''&SYSSER'' must be 5 or 6 digits' 00091000
  92. AGO .NEXT 00092000
  93. .* 00093000
  94. .TOOMANY MNOTE 8,'More than 255 SYSID entries specified' 00094000
  95. MEXIT 00095000
  96. .* 00096000
  97. .DUP MNOTE 8,'SYSID macro specified more than once' 00097000
  98. MEXIT 00098000
  99. .* 00099000
  100. .BADDEF MNOTE 8,'SYSID DEFAULT ''&DEFAULT'' must be 1 to 8 characters' 00100000
  101. AGO .FINISH 00101000
  102. .* 00102000
  103. .MULDEF MNOTE 8,'Specify only one value for SYSID DEFAULT' 00103000
  104. AGO .FINISH 00104000
  105. .* 00105000
  106. .NULL MNOTE 8,'No SYSID entries specified' 00106000
  107. MEND 00107000