[r8538]: docs / trunk / rexxref / en-US / rexutil.xml Maximize Restore History

Download this file

rexutil.xml    4648 lines (4409 with data), 179.3 kB

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "rexxref.ent">
%BOOK_ENTITIES;
]>
<!--#########################################################################
#
# Description: Open Object Rexx: Reference XML File
#
# Copyright (c) 2005-2012, Rexx Language Association. All rights reserved.
# Portions Copyright (c) 2004, IBM Corporation. All rights reserved.
#
# This program and the accompanying materials are made available under
# the terms of the Common Public License v1.0 which accompanies this
# distribution. A copy is also available at the following address:
# http://www.oorexx.org/license.html
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the distribution.
#
# Neither the name of Rexx Language Association nor the names
# of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#########################################################################
-->
<chapter id="rexutil"><title>Rexx Utilities (RexxUtil)</title>
<indexterm><primary>dynamic link library (RexxUtil)</primary></indexterm>
<indexterm><primary>shared library (RexxUtil)</primary></indexterm>
<indexterm><primary>dllfunctions</primary></indexterm>
<para>RexxUtil is a Dynamic Link Library (DLL) package for Windows and *nix
platforms; the package contains external Rexx functions. These functions:</para>
<itemizedlist>
<listitem><para>Manipulate operating system files and directories</para>
</listitem>
<listitem><para>Manipulate Windows classes and objects</para></listitem>
<listitem><para>Perform text screen input and output</para></listitem>
</itemizedlist>
<para>All of the RexxUtil functions are registered by the ooRexx interpreter on
startup so there is no need to register the functions either individually or
via the SysLoadFuncs function.</para>
<section id="systemerrorcodes"><title>A Note on Error Codes</title>
<indexterm><primary>Windows OS Error Codes</primary></indexterm>
<para>On Windows, some of the REXXUTIL functions return operating system error
codes on failure. The SysGetErrorText (<xref linkend="utlSysgeterrortext" />)
function can be used retrieve a description of system error code. In addition,
the meaning of these error return codes can be looked up in the Windows
Operating System documentation provided by Microsoft.
</para>
<para>The documentation is called the MSDN Library. The library is provided
online for anyone to access. Pus, since May 2006, Microsoft has also provided
the ISO images for the library free of charge. Anyone can download the ISOs,
burn them to a CD, and install the library locally on their system.
</para>
<para>The information below is provided to help the Rexx programmer locate the
MSDN Library, if they would like to. All things on the Internet change. The
URLs listed here are accurate at the time of this writing.
</para>
<para>The online MSDN Library is currently located at:</para>
<para>http://msdn2.microsoft.com/en-us/library/default.aspx.</para>
<para>A direct link to the section on the System Error codes is:</para>
<para>http://msdn.microsoft.com/en-us/library/ms681381.aspx</para>
<para>A Google search of <computeroutput>MSDN Library</computeroutput> will turn
up the section on the error codes. A Google search of <computeroutput>MSDN
"System Error Codes"</computeroutput> will turn up the section on the error
codes.
</para>
<para>Directions to the downloadable ISO images of the MSDN Library have been
posted on this blog entry:</para>
<para>http://blogs.msdn.com/robcaron/archive/2006/07/26/678897.aspx</para>
<para>A Google search using: <computeroutput>"Rob Caron" General Downloads MSDN
Library</computeroutput> should also turn up the blog entry.
</para>
</section>
<section id="utilfuncttable"><title>List of Rexx Utility Functions</title>
<indexterm><primary>rexxutil functions</primary></indexterm>
<para>The following table lists all of the REXXUTIL functions and the
platforms on which they are available.</para>
<table id="functtable" frame="all" pgwide="1"><title>Rexx Utility Library Functions</title>
<tgroup cols ="4">
<colspec colname="c1" colwidth="2*" />
<colspec colname="c2" />
<colspec colname="c3" />
<colspec colname="c4" />
<thead>
<row>
<entry morerows="1">Function Name</entry>
<entry namest="c2" nameend="c3" align="center">Exists on Platform</entry>
<entry morerows="1">Remarks</entry>
</row>
<row>
<entry align="center">Windows</entry>
<entry align="center">Unix</entry>
</row>
</thead>
<tbody>
<row>
<entry>RxMexxageBox (<xref linkend="utlRxmessagebox" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>RxWinExec (<xref linkend="utlRxwinexec" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysAddRexxMacro (<xref linkend="utlSysaddrexxmacro" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysBootDrive (<xref linkend="utlSysbootdrive" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysClearRexxMacroSpace (<xref linkend="utlSysclearrexxmacrospace" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysCloseEventSem (<xref linkend="utlSyscloseeventsem" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysCloseMutexSem (<xref linkend="utlSysclosemutexsem" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysCls (<xref linkend="utlSyscls" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysCreateEvenSem (<xref linkend="utlSyscreateeventsem" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysCreateMutexSem (<xref linkend="utlSyscreatemutexsem" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysCreatePipe (<xref linkend="utlSyscreatepipe" />)</entry><entry>NO</entry><entry>Yes</entry>
<entry></entry>
</row>
<row>
<entry>SysCurPos (<xref linkend="utlSyscurpos" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysCurState (<xref linkend="utlSyscurstate" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysDriveInfo (<xref linkend="utlSysdriveinfo" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysDriveMap (<xref linkend="utlSysdrivemap" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysDropFuncs (<xref linkend="utlSysdropfuncs" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysDropRexxMacro (<xref linkend="utlSysdroprexxmacro" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysDumpVariables (<xref linkend="utlSysdumpvariables" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysFileCopy (<xref linkend="utlSysfilecopy" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysFileDelete (<xref linkend="utlSysfiledelete" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysFileExists (<xref linkend="utlSysFileExists" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysFileMove (<xref linkend="utlSysfilemove" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysFileSearch (<xref linkend="utlSysfilesearch" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysFileSystemType (<xref linkend="utlSysfilesystemtype" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysFileTree (<xref linkend="utlSysfiletree" />)</entry><entry>YES</entry><entry>YES</entry>
<entry>Works differently</entry>
</row>
<row>
<entry>SysFork (<xref linkend="utlSysfork" />)</entry><entry>NO</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysFromUnicode (<xref linkend="utlSysfromunicode" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysGetErrorText (<xref linkend="utlSysgeterrortext" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysGetFileDateTime (<xref linkend="utlSysgetfiledatetime" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysGetKey (<xref linkend="utlSysgetkey" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysGetMessage (<xref linkend="utlSysgetmessage" /></entry><entry>NO</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysGetMessageX (<xref linkend="utlSysgetmessagex" />)</entry><entry>NO</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysIni (<xref linkend="utlSysini" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysIsFile (<xref linkend="utlSysisfile" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysIsFileCompressed (<xref linkend="utlSysisfilecompressed" /></entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysIsFileDirectory (<xref linkend="utlSysisfiledirectory" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysIsFileEncrypted (<xref linkend="utlSysisfileencrypted" /></entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysIsFileLink (<xref linkend="utlSysisfilelink" /></entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysIsFileNotContentIndexed (<xref linkend="utlSysisfilenotcontentindexed" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysIsFileOffline (<xref linkend="utlSysisfileoffline" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysIsFileSparse (<xref linkend="utlSysisfilesparse" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysIsFileTemporary (<xref linkend="utlSysisfiletemporary" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysLinVer (<xref linkend="utlSyslinver" />)</entry><entry>NO</entry><entry>NO*</entry>
<entry>Linux only*</entry>
</row>
<row>
<entry>SysLoadFuncs (<xref linkend="utlSysloadfuncs" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysLoadRexxMacroSpace (<xref linkend="utlSysloadrexxmacrospace" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysMkDir (<xref linkend="utlSysmkdir" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysOpenEventSem (<xref linkend="utlSysopeneventsem" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysOpenMutexSem (<xref linkend="utlSysopenmutexsem" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysPostEventSem (<xref linkend="utlSysposteventsem" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysPulseEventSem (<xref linkend="utlSyspulseeventsem" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysQueryProcess (<xref linkend="utlSysqueryprocess" />)</entry><entry>YES</entry><entry>YES</entry>
<entry>Works differently</entry>
</row>
<row>
<entry>SysQueryRexxMacro (<xref linkend="utlSysqueryrexxmacro" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysReleaseMutexSem (<xref linkend="utlSysreleasemutexsem" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysReorderRexxMacro (<xref linkend="utlSysreorderrexxmacro" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysRequestMutexSem (<xref linkend="utlSysrequestmutexsem" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysResetEventSem (<xref linkend="utlSysreseteventsem" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysRmDir (<xref linkend="utlSysrmdir" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysSaveRexxMacroSpace (<xref linkend="utlSyssaverexxmacrospace" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysSearchPath (<xref linkend="utlSyssearchpath" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysSetFileDateTime (<xref linkend="utlSyssetfiledatetime" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysSetPriority (<xref linkend="utlSyssetpriority" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysShutdownSystem (<xref linkend="utlSysshutdownsystem" /></entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysSleep (<xref linkend="utlSyssleep" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysStemCopy (<xref linkend="utlSysstemcopy" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysStemDelete (<xref linkend="utlSysstemdelete" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysStemInsert (<xref linkend="utlSyssteminsert" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysStemSort (<xref linkend="utlSysstemsort" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysSwitchSession (<xref linkend="utlSysswitchsession" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysSystemDirectory (<xref linkend="utlSyssystemdirectory" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysTempFileName (<xref linkend="utlSystempfilename" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysTextScreenRead (<xref linkend="utlSystextscreenread" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysTextScreenSize (<xref linkend="utlSystextscreensize" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysToUnicode (<xref linkend="utlSystounicode" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysUtilVersion (<xref linkend="utlSysutilversion" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysVersion (<xref linkend="utlSysversion" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysVolumeLabel (<xref linkend="utlSysvolumelabel" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysWait (<xref linkend="utlSyswait" />)</entry><entry>NO</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysWaitEventSem (<xref linkend="utlSyswaiteventsem" />)</entry><entry>YES</entry><entry>YES</entry>
<entry></entry>
</row>
<row>
<entry>SysWaitNamedPipe (<xref linkend="utlSyswaitnamedpipe" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysWinDecryptFile (<xref linkend="utlSyswindecryptfile" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysWinEncryptFile (<xref linkend="utlSyswinencryptfile" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysWinVer (<xref linkend="utlSyswinver" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysWinGetPrinters (<xref linkend="utlSyswingetprinters" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysWinGetDefaultPrinter (<xref linkend="utlSyswingetdefaultprinter" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
<row>
<entry>SysWinSetDefaultPrinter (<xref linkend="utlSyswinsetdefaultprinter" />)</entry><entry>YES</entry><entry>NO</entry>
<entry></entry>
</row>
</tbody>
</tgroup>
</table>
</section>
<section id="utlRxmessagebox"><title>RxMessageBox (Windows only)</title>
<indexterm><primary>RxMessageBox</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>RxMessageBox</secondary></indexterm>
<programlisting>
<![CDATA[
>>-RxMessageBox(text-------------------------------------------->
>--+--------------------------------------------+--)-----------><
+-,--+-------+--+--------------------------+-+
+-title-+ +-,--+--------+--+-------+-+
+-button-+ +-,icon-+
]]>
</programlisting>
<para>Displays a Windows message box.</para>
<para>RxMessageBox returns the selected message box push button. Possible values
are: </para>
<variablelist>
<varlistentry><term>1</term>
<listitem><para>The OK push button was pressed
</para></listitem></varlistentry>
<varlistentry><term>2</term>
<listitem><para>The CANCEL push button was pressed
</para></listitem></varlistentry>
<varlistentry><term>3</term>
<listitem><para>The ABORT push button was pressed
</para></listitem></varlistentry>
<varlistentry><term>4</term>
<listitem><para>The RETRY push button was pressed
</para></listitem></varlistentry>
<varlistentry><term>5</term>
<listitem><para>The IGNORE push button was pressed
</para></listitem></varlistentry>
<varlistentry><term>6</term>
<listitem><para>The YES push button was pressed
</para></listitem></varlistentry>
<varlistentry><term>7</term>
<listitem><para>The NO push button was pressed
</para></listitem></varlistentry>
</variablelist>
<para>If a message box has a "CANCEL" button, the function returns the
2 value if either the ESC key is pressed or the "CANCEL" button is
selected. If the message box has no "CANCEL" button, pressing ESC
has no effect.</para>
<variablelist>
<varlistentry><term><emphasis role="italic">text</emphasis></term>
<listitem><para>The message box text.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">title</emphasis></term>
<listitem><para>The message box title. The default title is &quot;Error!&quot;.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">button</emphasis></term>
<listitem><para>The message box push button style. The allowed styles are:
<variablelist>
<varlistentry><term>"NONE"</term>
<listitem><para>No icon is displayed.
</para></listitem></varlistentry>
<varlistentry><term>"OK"</term>
<listitem><para>A single OK push button.
</para></listitem></varlistentry>
<varlistentry><term>"OKCANCEL"</term>
<listitem><para>An OK push button and a CANCEL push button.
</para></listitem></varlistentry>
<varlistentry><term>"RETRYCANCEL"</term>
<listitem><para>A RETRY push button and a CANCEL push button.
</para></listitem></varlistentry>
<varlistentry><term>"ABORTRETRYIGNORE"</term>
<listitem><para>An ABORT push button, a RETRY push button and an IGNORE push
button.</para></listitem></varlistentry>
<varlistentry><term>"YESNO"</term>
<listitem><para>A YES push button and a NO push button.
</para></listitem></varlistentry>
<varlistentry><term>"YESNOCANCEL"</term>
<listitem><para>A YES push button, a NO push button and a CANCEL push button.
</para></listitem></varlistentry>
</variablelist>
The default push button style is OK.</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="italic">icon</emphasis></term>
<listitem><para>The message box icon style. The allowed styles are:
<variablelist>
<varlistentry><term>"HAND"</term>
<listitem><para>A hand icon is displayed.
</para></listitem></varlistentry>
<varlistentry><term>"QUESTION"</term>
<listitem><para>A question mark icon is displayed.
</para></listitem></varlistentry>
<varlistentry><term>"EXCLAMATION"</term>
<listitem><para>An exclamation point icon is displayed.
</para></listitem></varlistentry>
<varlistentry><term>"ASTERISK"</term>
<listitem><para>An asterisk icon is displayed.
</para></listitem></varlistentry>
<varlistentry><term>"INFORMATION"</term>
<listitem><para>An information icon is displayed.
</para></listitem></varlistentry>
<varlistentry><term>"STOP"</term>
<listitem><para>A stop icon is displayed.
</para></listitem></varlistentry>
<varlistentry><term>"QUERY"</term>
<listitem><para>A query icon is displayed.
</para></listitem></varlistentry>
<varlistentry><term>"WARNING"</term>
<listitem><para>A warning icon is displayed.
</para></listitem></varlistentry>
<varlistentry><term>"ERROR"</term>
<listitem><para>An error icon is displayed.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
<indexterm><primary>rexxutil functions</primary>
<secondary>RxMessageBox</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>RxMessageBox</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>RxMessageBox</secondary></indexterm>
<example id="ex.rxmessagebox">
<title>RexxUtil - RxMessageBox</title>
<programlisting>
/* Give option to quit */
if RxMessageBox("Shall we continue", , "YesNo", "Question") = 7
Then Exit /* quit option given, exit */
</programlisting>
</example>
</section>
<section id="utlRxwinexec"><title>RxWinExec (Windows only)</title>
<indexterm><primary>RxWinExec</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>RxWinExec</secondary></indexterm>
<programlisting>
<![CDATA[
>>-RxWinExec(-cmdline--+------------+--)-----------------------><
+-,--cmdshow-+
]]>
</programlisting>
<para>Starts (executes) the application as specified in
<emphasis role="italic">cmdline</emphasis>.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">cmdline</emphasis></term>
<listitem><para>A string containing a file name and optional parameters for the
application to be executed. If the name of the executable file in
<emphasis role="italic">cmdline</emphasis> does
not contain a directory path, RxWinExec searches for the executable file in
this sequence:
<variablelist>
<varlistentry><term>1</term>
<listitem><para>The directory from which Object Rexx was loaded.
</para></listitem></varlistentry>
<varlistentry><term>2</term>
<listitem><para>The current directory.
</para></listitem></varlistentry>
<varlistentry><term>3</term>
<listitem><para>The Windows system directory.
</para></listitem></varlistentry>
<varlistentry><term>4</term>
<listitem><para>The Windows directory.
</para></listitem></varlistentry>
<varlistentry><term>5</term>
<listitem><para>The directories listed in the PATH environment variable.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">cmdshow</emphasis></term>
<listitem><para>Specifies how a Windows-based application window is to be shown.
For a non-Windows-based application, the PIF file, if any, for the application
determines the window state.
<variablelist>
<varlistentry><term>SHOWNORMAL</term>
<listitem><para>Activates and displays a window.
</para></listitem></varlistentry>
<varlistentry><term>SHOWNOACTIVATE</term>
<listitem><para>Displays the window while the current active window remains
active.</para></listitem></varlistentry>
<varlistentry><term>SHOWMINNOACTIVE</term>
<listitem><para>Displays the window as a minimized window, the current active
window remains active.
</para></listitem></varlistentry>
<varlistentry><term>SHOWMINIMIZED</term>
<listitem><para>Activates the window and displays it as a minimized window.
</para></listitem></varlistentry>
<varlistentry><term>SHOWMAXIMIZED</term>
<listitem><para>Activates the window and displays it as a maximized window.
</para></listitem></varlistentry>
<varlistentry><term>HIDE</term>
<listitem><para>Hides the window and activates another window.
</para></listitem></varlistentry>
<varlistentry><term>MINIMIZE</term>
<listitem><para>Minimizes the specified window and activates the next top-level
window in the Z order.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<para>If the application is started successfully, the process id (PID) is
returned. If an error occurs the returned value is less than 32.</para>
<para>Error return codes correspond to a
Windows System Error code (<xref linkend="systemerrorcodes" />). If the Windown system error code is greater
than 32 it is negated. This is to prevent confusion between a legitimate error
code and a PID.</para>
<para>Some common error returns for this function are as follows.</para>
<variablelist>
<varlistentry><term>2</term>
<listitem><para>The specified file was not found.
</para></listitem></varlistentry>
<varlistentry><term>3</term>
<listitem><para>The specified path was not found.
</para></listitem></varlistentry>
<varlistentry><term>11</term>
<listitem><para>The EXE file is invalid.
</para></listitem></varlistentry>
<varlistentry><term>-53</term>
<listitem><para>The network path is invalid.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSysaddrexxmacro"><title>SysAddRexxMacro</title>
<indexterm><primary>SysAddRexxMacro</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysAddRexxMacro</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysAddRexxMacro(name,file-+--------+-)----------------------><
+-,order-+
]]>
</programlisting>
<para>Adds a routine to the Rexx macrospace. SysAddRexxMacro returns the
RexxAddMacro return code.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">name</emphasis></term>
<listitem><para>The name of the function added to the macrospace.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">file</emphasis></term>
<listitem><para>The file containing the Rexx program.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">order</emphasis></term>
<listitem><para>The macrospace search order. The order can be "B" (Before) or
"A" (After).
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSysbootdrive"><title>SysBootDrive (Windows only)</title>
<indexterm><primary>SysAddBootDrive</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysBootDrive</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysBootDrive--(--)------------------------------------------><
]]>
</programlisting>
<para>Returns the drive used to boot Windows, for example, "C:".</para>
</section>
<section id="utlSysclearrexxmacrospace"><title>SysClearRexxMacroSpace</title>
<indexterm><primary>SysClearRexxMacroSpace</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysClearRexxMacroSpace</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysClearRexxMacroSpace()------------------------------------><
]]>
</programlisting>
<para>Clears the Rexx macrospace. SysClearRexxMacroSpace returns the
RexxClearMacroSpace return code.</para>
</section>
<section id="utlSyscloseeventsem"><title>SysCloseEventSem</title>
<indexterm><primary>SysCloseEventSem</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysCloseEventSem</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysCloseEventSem(handle)------------------------------------><
]]>
</programlisting>
<para>Closes an event semaphore.</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">handle</emphasis></term>
<listitem><para>A handle returned from a previous SysCreateEventSem or
SysOpenEventSem call.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>No errors.
</para></listitem></varlistentry>
<varlistentry><term>Other</term>
<listitem><para>An error occurred. On Windows, a Windows System Error code (<xref linkend="systemerrorcodes" />)
is returned. This may be one of the following, but could be others.
</para></listitem></varlistentry>
<varlistentry><term>6</term>
<listitem><para>Invalid handle.
</para></listitem></varlistentry>
<varlistentry><term>102</term>
<listitem><para>Error semaphore busy.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSysclosemutexsem"><title>SysCloseMutexSem</title>
<indexterm><primary>SysCloseMutexSem</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysCloseMutexSem</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysCloseMutexSem(handle)------------------------------------><
]]>
</programlisting>
<para>Closes a mutex semaphore.</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">handle</emphasis></term>
<listitem><para>A handle returned from a previous SysCreateMutexSem call.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>No errors.
</para></listitem></varlistentry>
<varlistentry><term>Other</term>
<listitem><para>An error occurred. On Windows, a Windows System Error code (<xref linkend="systemerrorcodes" />)
is returned. This may be one of the following, but could be others.
</para></listitem></varlistentry>
<varlistentry><term>6</term>
<listitem><para>Invalid handle.
</para></listitem></varlistentry>
<varlistentry><term>102</term>
<listitem><para>Error semaphore busy.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSyscls"><title>SysCls</title>
<indexterm><primary>SysCls</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysCls</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysCls()----------------------------------------------------><
]]>
</programlisting>
<para>Clears the screen.</para>
<example id="ex.syscls">
<title>RexxUtil - SysCls</title>
<programlisting>
/* Code */
call SysCls
</programlisting>
</example>
</section>
<section id="utlSyscreateeventsem"><title>SysCreateEventSem</title>
<indexterm><primary>SysCreateEventSem</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysCreateEventSem</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysCreateEventSem(-+------+--+--------------+-)-------------><
+-name-+ +-manual_reset-+
]]>
</programlisting>
<para>Creates an event semaphore. It returns an event semaphore
handle that can be used with SysCloseEventSem, SysOpenEventSem,
SysResetEventSem, SysPostEventSem, and SysWaitEventSem. SysCreateEventSem
returns a null string (&quot;&quot;) if the semaphore cannot be created or
already exists.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">name</emphasis></term>
<listitem><para>The optional event semaphore name. If you omit
<emphasis role="italic">name</emphasis>,
SysCreateEventSem creates an unnamed, shared event semaphore.
A semaphore name can be MAX_PATH long, and
can contain any character except the backslash (\) path-separator character.
Semaphore names are case-sensitive.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">manual_reset</emphasis></term>
<listitem><para>A flag to indicate that the event semaphore must be reset
manually by SysResetEventSem. If this parameter is omitted, the event
semaphore is reset automatically by SysWaitEventSem.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSyscreatemutexsem"><title>SysCreateMutexSem</title>
<indexterm><primary>SysCreateMutexSem</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysCreateMutexSem</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysCreateMutexSem(-+------+-)-------------------------------><
+-name-+
]]>
</programlisting>
<para>Creates a mutex semaphore. Returns a mutex semaphore handle that
can be used with SysCloseMutexSem, SysRequestMutexSem, and SysReleaseMutexSem.
SysCreateMutexSem returns a null string (&quot;&quot;) if the semaphore cannot
be created or already exists.</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">name</emphasis></term>
<listitem><para>The optional mutex semaphore name. If you omit
<emphasis role="italic">name</emphasis>, SysCreateMutexSem
creates an unnamed, shared mutex semaphore. If you specify
<emphasis role="italic">name</emphasis>,
The semaphore names cannot be longer than 63 characters. Semaphore names are
case-sensitive.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSyscreatepipe"><title>SysCreatePipe (Unix only)</title>
<indexterm><primary>SysCreatePipe</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysCreatePipe</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysCreatePipe()---------------------------------------------><
]]>
</programlisting>
<para>Creates an unnamed pipe.</para>
<para><emphasis role="bold">Returns:</emphasis></para>
<para>Returns a string like <computeroutput>"handle handle"</computeroutput>
where the first handle is for read and the second handle for write.</para>
</section>
<section id="utlSyscurpos"><title>SysCurPos (Windows only)</title>
<indexterm><primary>SysCurPos</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysCurPos</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysCurPos(-+------------+-)---------------------------------><
+-row,column-+
]]>
</programlisting>
<para>Returns the cursor position in the form
<computeroutput>row col</computeroutput> and optionally
moves the cursor to a new location.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">row</emphasis></term>
<listitem><para>The row to move to.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">col</emphasis></term>
<listitem><para>The column to move to.
</para></listitem></varlistentry>
</variablelist>
<note><title>Note</title>
<para>Position (0,0) is the upper left corner.</para></note>
<para>You can call SysCurPos without a column and row position to obtain the
cursor position without moving the cursor.</para>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysCurPos</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysCurPos</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysCurPos</secondary></indexterm>
<example id="ex.syscurpos">
<title>RexxUtil - SysCurpos</title>
<programlisting>
/* Code */
call SysCls
parse value SysCurPos() with row col
say "Cursor position is "row", "col
/* Output */
Cursor position is 0, 0
</programlisting>
</example>
</section>
<section id="utlSyscurstate"><title>SysCurState (Windows only)</title>
<indexterm><primary>SysCurState</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysCurState</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysCurState(state)------------------------------------------><
]]>
</programlisting>
<para>Hides or displays the cursor.</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">state</emphasis></term>
<listitem><para>The new cursor state. Allowed states are:
<variablelist>
<varlistentry><term>"ON"</term>
<listitem><para>Display the cursor
</para></listitem></varlistentry>
<varlistentry><term>"OFF"</term>
<listitem><para>Hide the cursor
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSysdriveinfo"><title>SysDriveInfo (Windows only)</title>
<indexterm><primary>SysDriveInfo</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysDriveInfo</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysDriveInfo(drive)-----------------------------------------><
]]>
</programlisting>
<para>Returns drive information in the form:
<computeroutput>drive: free total label</computeroutput>.</para>
<variablelist>
<varlistentry><term>drive:</term>
<listitem><para>is the drive letter identifier.
</para></listitem></varlistentry>
<varlistentry><term>free</term>
<listitem><para>is the drive unused space.
</para></listitem></varlistentry>
<varlistentry><term>total</term>
<listitem><para>is the total size of the drive.
</para></listitem></varlistentry>
<varlistentry><term>label</term>
<listitem><para>is the drive label.
</para></listitem></varlistentry>
</variablelist>
<para>If the drive is not accessible, then SysDriveInfo returns "".</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">drive</emphasis></term>
<listitem><para>The drive of interest, "C:".
</para></listitem></varlistentry>
</variablelist>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysDriveInfo</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysDriveInfo</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysDriveInfo</secondary></indexterm>
<example id="ex.sysdriveinfo">
<title>RexxUtil - SysDriveinfo</title>
<programlisting>
/* Code */
say "Disk="SysDriveInfo("C:")
/* Output */
Disk=C: 33392640 83687424 TRIGGER_C
</programlisting>
</example>
</section>
<section id="utlSysdrivemap"><title>SysDriveMap (Windows only)</title>
<indexterm><primary>SysDriveMap</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysDriveMap</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysDriveMap(-+-------+-+------+-)---------------------------><
+-drive-+ +-,opt-+
]]>
</programlisting>
<para>Returns a string listing accessible drives (separated by blanks) in the
form: <computeroutput>C:&nbsp;D:&nbsp;...</computeroutput>.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">drive</emphasis></term>
<listitem><para>The first drive letter of the drive map. The default is "C:".
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">opt</emphasis></term>
<listitem><para>The drivemap option. This can be:
<variablelist>
<varlistentry><term>"USED"</term>
<listitem><para>returns the drives that are accessible or in use, including
all local and remote drives. This is the default.
</para></listitem></varlistentry>
<varlistentry><term>"FREE"</term>
<listitem><para>returns drives that are free or not in use.
</para></listitem></varlistentry>
<varlistentry><term>"LOCAL"</term>
<listitem><para>returns only local drives.
</para></listitem></varlistentry>
<varlistentry><term>"REMOTE"</term>
<listitem><para>returns only remote drives, such as redirected LAN resources
or installable file system (IFS) attached drives.
</para></listitem></varlistentry>
<varlistentry><term>"REMOVABLE"</term>
<listitem><para>returns removable drives.
</para></listitem></varlistentry>
<varlistentry><term>"CDROM"</term>
<listitem><para>returns CD-ROM drives.
</para></listitem></varlistentry>
<varlistentry><term>"RAMDISK"</term>
<listitem><para>returns drives assigned from RAM.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysDriveMap</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysDriveMap</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysDriveMap</secondary></indexterm>
<example id="ex.sysdrivemap">
<title>RexxUtil - SysDrivemap</title>
<programlisting>
/* Code */
say "Used drives include:"
say SysDriveMap("C:", "USED")
/* Output */
Used drives include:
C: D: E: F: W:
</programlisting>
</example>
</section>
<section id="utlSysdropfuncs"><title>SysDropFuncs</title>
<indexterm><primary>SysDropFuncs</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysDropFuncs</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysDropFuncs------------------------------------------------><
]]>
</programlisting>
<para>
From ooRexx 4.0.0 and on this function does nothing.
</para>
</section>
<section id="utlSysdroprexxmacro"><title>SysDropRexxMacro</title>
<indexterm><primary>SysDropRexxMacro</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysDropRexxMacro</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysDropRexxMacro(name)--------------------------------------><
]]>
</programlisting>
<para>Removes a routine from the Rexx macrospace. SysDropRexxMacro returns the
RexxDropMacro return code.</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">name</emphasis></term>
<listitem><para>The name of the function removed from the macrospace.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSysdumpvariables"><title>SysDumpVariables</title>
<indexterm><primary>SysDumpVariables</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysDumpVariables</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysDumpVariables-+------------+-----------------------------><
+-(--name--)-+
]]>
</programlisting>
<para>Dumps all variables in the current scope either to the specified file
<emphasis role="italic">filename</emphasis> (new data is appended) or to
STDOUT if you omit <emphasis role="italic">filename</emphasis>. The format of
the data is, with one variable per line:</para>
<para><computeroutput>Name=MYVAR, Value="This is the content of MYVAR"</computeroutput>
</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">filename</emphasis></term>
<listitem><para>The name of the file to which variables are appended. The dump is
written to STDOUT if you omit this parameter.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>Dump completed successfully.
</para></listitem></varlistentry>
<varlistentry><term>-1</term>
<listitem><para>Dump failed.
</para></listitem></varlistentry>
</variablelist>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysDumpVariables</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysDumpVariables</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysDumpVariables</secondary></indexterm>
<example id="ex.sysdumpvariables">
<title>RexxUtil - SysDumpvariables</title>
<programlisting>
Call SysDumpVariables "MyVars.Lst" /* append vars to file */
Call SysDumpVariables /* list vars on STDOUT */
</programlisting>
</example>
</section>
<section id="utlSysfilecopy"><title>SysFileCopy</title>
<indexterm><primary>SysFileCopy</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysFileCopy</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysFileCopy(source, target)---------------------------------><
]]>
</programlisting>
<para>Copies a file from one location to another. Wildcard file
specifications are not allowed.</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">source</emphasis></term>
<listitem><para>The path/name of the file to be copied.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">target</emphasis></term>
<listitem><para>The path/name of the target location where the file is to be
copied.</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>File copied successfully.
</para></listitem></varlistentry>
<varlistentry><term>Other</term>
<listitem><para>A Windows System Error code (<xref linkend="systemerrorcodes" />).
</para></listitem></varlistentry>
</variablelist>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysFileCopy</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysFileCopy</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysFileCopy</secondary></indexterm>
<example id="ex.sysfilecopy">
<title>RexxUtil - SysFilecopy</title>
<programlisting>
/* Code */
call SysFileCopy "c:\temp\myfile.txt", "d:\myfolder\myCopy.txt"
</programlisting>
</example>
</section>
<section id="utlSysfiledelete"><title>SysFileDelete</title>
<indexterm><primary>SysFileDelete</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysFileDelete</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysFileDelete(file)-----------------------------------------><
]]>
</programlisting>
<para>Deletes a file. SysFileDelete does not support wildcard file
specifications.</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">file</emphasis></term>
<listitem><para>The name of the file to be deleted.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>File deleted successfully.
</para></listitem></varlistentry>
<varlistentry><term>Other</term>
<listitem><para>An error occurred. On Windows, a Windows System Error code (<xref linkend="systemerrorcodes" />
is returned. This may be one of the following, but could be others.
</para></listitem></varlistentry>
<varlistentry><term>2</term>
<listitem><para>File not found.
</para></listitem></varlistentry>
<varlistentry><term>3</term>
<listitem><para>Path not found.
</para></listitem></varlistentry>
<varlistentry><term>5</term>
<listitem><para>Access denied or busy.
</para></listitem></varlistentry>
<varlistentry><term>26</term>
<listitem><para>Not DOS disk.
</para></listitem></varlistentry>
<varlistentry><term>32</term>
<listitem><para>Sharing violation.
</para></listitem></varlistentry>
<varlistentry><term>36</term>
<listitem><para>Sharing buffer exceeded.
</para></listitem></varlistentry>
<varlistentry><term>87</term>
<listitem><para>Does not exist.
</para></listitem></varlistentry>
<varlistentry><term>206</term>
<listitem><para>File name exceeds range error.
</para></listitem></varlistentry>
</variablelist>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysFileDelete</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysFileDelete</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysFileDelete</secondary></indexterm>
<example id="ex.sysfiledelete">
<title>RexxUtil - SysFiledelete</title>
<programlisting>
/* Code */
parse arg InputFile OutputFile
call SysFileDelete OutputFile /* unconditionally erase output file */
</programlisting>
</example>
</section>
<section id="utlSysFileExists"><title>SysFileExists</title>
<indexterm><primary>SysFileExists</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysFileExists</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysFileExists(filename)-----------------------------------------><
]]>
</programlisting>
<para>Checks for the existence of a file. This function does not support
wildcard specifications. Returns true if any file system entity with the
given name exists. In particular, this will return true for both regular
files and directories.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">filename</emphasis></term>
<listitem><para>The name of the file to check for the existence of.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Returns:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The file does not exist.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>The file exists.
</para></listitem></varlistentry>
</variablelist>
<example id="ex.sysfileexists">
<title>RexxUtil - SysFileexists</title>
<programlisting>
if SysFileExists(InputFile) then say "File Exists!"
else say "File does not exist."
</programlisting>
</example>
</section>
<section id="utlSysfilemove"><title>SysFileMove (Windows only)</title>
<indexterm><primary>SysFileMove</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysFileMove</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysFileMove(source, target)---------------------------------><
]]>
</programlisting>
<para>Moves a file from one location to another. Wildcard file
specifications are not allowed.</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">source</emphasis></term>
<listitem><para>The path/name of the file to be moved.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">target</emphasis></term>
<listitem><para>The path of the target location where the file is to be
moved. The <emphasis role="italic">target</emphasis> must contain a path
component.</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>File copied successfully.
</para></listitem></varlistentry>
<varlistentry><term>Other</term>
<listitem><para>On failure, a Windows System Error code (<xref linkend="systemerrorcodes" />)
is returned.
</para></listitem></varlistentry>
</variablelist>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysFileMove</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysFileMove</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysFileMove</secondary></indexterm>
<example id="ex.sysfilemove">
<title>RexxUtil - SysFilemove</title>
<programlisting>
/* Code */
call SysFileMove "c:\temp\myfile.txt", "d:\myfolder"
</programlisting>
</example>
</section>
<section id="utlSysfilesearch"><title>SysFileSearch</title>
<indexterm><primary>SysFileSearch</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysFileSearch</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysFileSearch(target,file,stem--+----------+--)-------------><
+-,options-+
]]>
</programlisting>
<para>Finds all file lines containing the target string and returns the file
lines in a Rexx stem variable collection.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">target</emphasis></term>
<listitem><para>The target search string.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">file</emphasis></term>
<listitem><para>The searched file.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">stem</emphasis></term>
<listitem><para>The result stem variable name. SysFileSearch sets Rexx variable
<emphasis role="italic">stem.0</emphasis> to the number of lines returned and
stores the individual lines in variables
<emphasis role="italic">stem.1</emphasis> to
<emphasis role="italic">stem.n</emphasis>.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">options</emphasis></term>
<listitem><para>Any combination of the following one-character options:
<variablelist>
<varlistentry><term>"C"</term>
<listitem><para>Conducts a case-sensitive search.
</para></listitem></varlistentry>
<varlistentry><term>"N"</term>
<listitem><para>Returns the file line numbers.
</para></listitem></varlistentry>
</variablelist>
The default is a case-insensitive search without line numbers.</para>
</listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>Successful.
</para></listitem></varlistentry>
<varlistentry><term>2</term>
<listitem><para>Not enough memory.
</para></listitem></varlistentry>
<varlistentry><term>3</term>
<listitem><para>Error opening file.
</para></listitem></varlistentry>
</variablelist>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysFileSearch</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysFileSearch</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysFileSearch</secondary></indexterm>
<example id="ex.sysfilesearch">
<title>RexxUtil - SysFilesearch</title>
<programlisting>
/* Find DEVICE statements in CONFIG.SYS */
call SysFileSearch "DEVICE", "C:\CONFIG.SYS", "file."
do i=1 to file.0
say file.i
end
/* Output */
DEVICE=C:\SB16\DRV\CTSB16.SYS /UNIT=0 /BLASTER=A:240 I:5 D:1 H:5
DEVICE=C:\SB16\DRV\CTMMSYS.SYS
rem **** DOS SCSI CDROM device drivers ***
DEVICE=C:\SCSI\ASPI8DOS.SYS /D
DEVICE=C:\SCSI\ASPICD.SYS /D:ASPICD0
rem **** IDE CDROM device drivers
DEVICE=C:\DOS\HIMEM.SYS
DEVICE=C:\SBCD\DRV\SBIDE.SYS /V /D:MSCD001 /P:1f0,14
DEVICE=C:\DOS\SETVER.EXE
DEVICE=C:\WINDOWS\SMARTDRV.EXE /DOUBLE_BUFFER
DEVICE=C:\WINDOWS\IFSHLP.SYS
/* Find DEVICE statements in CONFIG.SYS (along with */
/* line numbers) */
call SysFileSearch "DEVICE", "C:\CONFIG.SYS", "file.", "N"
do i=1 to file.0
say file.i
end
/* Output */
1 DEVICE=C:\SB16\DRV\CTSB16.SYS /UNIT=0 /BLASTER=A:240 I:5 D:1
H:5
2 DEVICE=C:\SB16\DRV\CTMMSYS.SYS
4 rem **** DOS SCSI CDROM device drivers ***
5 DEVICE=C:\SCSI\ASPI8DOS.SYS /D
6 DEVICE=C:\SCSI\ASPICD.SYS /D:ASPICD0
8 rem **** IDE CDROM device drivers
9 DEVICE=C:\DOS\HIMEM.SYS
10 DEVICE=C:\SBCD\DRV\SBIDE.SYS /V /D:MSCD001 /P:1f0,14
13 DEVICE=C:\DOS\SETVER.EXE
16 DEVICE=C:\WINDOWS\SMARTDRV.EXE /DOUBLE_BUFFER
17 DEVICE=C:\WINDOWS\IFSHLP.SYS
</programlisting>
</example>
</section>
<section id="utlSysfilesystemtype"><title>SysFileSystemType (Windows only)</title>
<indexterm><primary>SysFileSystemType</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysFileSystemType</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysFileSystemType(drive)------------------------------------><
]]>
</programlisting>
<para>Returns the name of the file system used for a drive. If the drive is not
accessible, it returns a null string (&quot;&quot;).</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">drive</emphasis></term>
<listitem><para>The drive of interest, for example "C:".
</para></listitem></varlistentry>
</variablelist>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysFileSystemType</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysFileSystemType</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysFileSystemType</secondary></indexterm>
<example id="ex.sysfilesystemtype">
<title>RexxUtil - SysFilesystemtype</title>
<programlisting>
/* Code */
say "File System="SysFileSystemType("C:")
/* Output */
File System=NTFS
</programlisting>
</example>
</section>
<section id="utlSysfiletree"><title>SysFileTree</title>
<indexterm><primary>SysFileTree</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysFileTree</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysFileTree(filespec,stem------------------------------------>
>--+-------------------------------------------------------+---->
+-,--+---------+--+-----------------------------------+-+
+-options-+ +-,--+---------+--+---------------+-+
+-tattrib-+ +-,-+---------+-+
+-nattrib-+
>--)-----------------------------------------------------------><
]]>
</programlisting>
<para>Finds all files that match a file specification. SysFileTree returns the
file descriptions (date, time, size, attributes, and file specification) space delimited in
a Rexx stem variable collection. The default format for date and time is platform specific.</para>
<para>
<emphasis role="italic">SysFileTree</emphasis> uses operating system APIs to find the files. The found files are
placed in the returned stem in the order they are found by the operating system. This documentation does not attempt
to define what that order might be.
</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">filespec [required]</emphasis></term>
<listitem><para>The search file specification. This can not be the empty string. On Unix-like systems, <emphasis
role="italic">filespec</emphasis> must be less than or equal to 255 characters in length.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">stem [required]</emphasis></term>
<listitem><para>The name of a stem variable to be used for storing results.
SysFileTree sets Rexx variable <emphasis role="italic">stem.0</emphasis>
to the number of files and directories found and stores individual
file descriptions into variables <emphasis role="italic">stem.1</emphasis> to
<emphasis role="italic">stem.n</emphasis>.
Note: <emphasis role="italic">stem</emphasis> can be specified as
<emphasis role="italic">stem</emphasis> or <emphasis role="italic">stem.</emphasis>
(with or without the trailing period)
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">options [optional]</emphasis></term>
<listitem><para>A string with any combination of the following. If this argument is omitted, it defaults to <emphasis
role="italic">B</emphasis>.</para>
<variablelist>
<varlistentry><term>"F"</term>
<listitem><para>Search only for files.
</para></listitem></varlistentry>
<varlistentry><term>"D"</term>
<listitem><para>Search only for directories.
</para></listitem></varlistentry>
<varlistentry><term>"B"</term>
<listitem><para>Search for both files and directories. This is the default.
</para></listitem></varlistentry>
<varlistentry><term>"S"</term>
<listitem><para>Search subdirectories recursively.
</para></listitem></varlistentry>
<varlistentry><term>"T"</term>
<listitem><para>Return the time and date in the form YY/MM/DD/HH/MM. If the "L" option is also specified
then this option will be ignored.
</para></listitem></varlistentry>
<varlistentry><term>"L"</term>
<listitem><para>Return the time and date in the form YYYY-MM-DD HH:MM:SS.
</para></listitem></varlistentry>
<varlistentry><term>"I"</term>
<listitem><para>Perform a case-insensitive search for file names/directories.
This option is only used on system that support case-sensitive file names and
is ignored on systems like Windows where the file system is case-insensitive
by default.
</para></listitem></varlistentry>
<varlistentry><term>"O"</term>
<listitem><para>Return only the fully-qualified file name.</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">tattrib [optional] [Windows only]</emphasis></term>
<listitem><para>The target attribute mask for file specification matches. Only
files that match the target mask are returned. The default mask is "*****".
This returns all files regardless of the settings (clear or set) of the Archive,
Directory, Hidden, Read-Only, and System attributes. The target mask attributes
must appear in the order "ADHRS". This argument is Windows only. It is allowed but ignored on Unix-like operating
systems.</para></listitem></varlistentry>
</variablelist>
<para>Target Mask
Options </para>
<variablelist>
<varlistentry><term>*</term>
<listitem><para>The file attribute may be any state.
</para></listitem></varlistentry>
<varlistentry><term>+</term>
<listitem><para>The file attribute must be set.
</para></listitem></varlistentry>
<varlistentry><term>-</term>
<listitem><para>The file attribute must be cleared.
</para></listitem></varlistentry>
</variablelist>
<para>Target Mask Examples </para>
<variablelist>
<varlistentry><term>"***+*"</term>
<listitem><para>Find all files with the Read-Only attribute set.
</para></listitem></varlistentry>
<varlistentry><term>"+**+*"</term>
<listitem><para>Find all files with the Read-Only and Archive attributes set.
</para></listitem></varlistentry>
<varlistentry><term>"*++**"</term>
<listitem><para>Find all hidden subdirectories.
</para></listitem></varlistentry>
<varlistentry><term>"---+-"</term>
<listitem><para>Find all files with only the Read-Only attribute set.
</para></listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="italic">nattrib [optional] [Windows only]</emphasis></term>
<listitem><para>The new attribute mask for setting the attributes of each
matching file. The default mask is "*****". This means not to change the
Archive, Directory, Hidden, Read-Only, and System attributes. The target mask
attributes must appear in the order "ADHRS". This argument is Windows only. It is allowed but ignored on Unix-like
operating systems.</para>
<para>New Attribute
Mask Options </para>
<variablelist>
<varlistentry><term>*</term>
<listitem><para>Do not change the file attribute.
</para></listitem></varlistentry>
<varlistentry><term>+</term>
<listitem><para>Set the file attribute.
</para></listitem></varlistentry>
<varlistentry><term>-</term>
<listitem><para>Clear the file attribute.
</para></listitem></varlistentry>
</variablelist>
<para>New Attribute Mask Examples</para>
<variablelist>
<varlistentry><term>"***+*"</term>
<listitem><para>Set the Read-Only attribute on all files.
</para></listitem></varlistentry>
<varlistentry><term>"-**+*"</term>
<listitem><para>Set the Read-Only attribute and clear the Archive attribute
of each file.</para></listitem></varlistentry>
<varlistentry><term>"+*+++"</term>
<listitem><para>Set all file attributes, except the directory attribute.
</para></listitem></varlistentry>
<varlistentry><term>"-----"</term>
<listitem><para>Clear all attributes on all files.
<note><title>Note</title>
<para>You cannot set the
directory attribute on non-directory files. SysFileTree
returns the file attribute settings after the new attribute mask has been
applied.</para></note>
</para></listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>Successful.
</para></listitem></varlistentry>
<varlistentry><term>2</term>
<listitem><para>Not enough memory.
</para></listitem></varlistentry>
</variablelist>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysFileTree</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysFileTree</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysFileTree</secondary></indexterm>
<example id="ex.sysfiletree">
<title>RexxUtil - SysFiletree</title>
<programlisting>
/* Find all subdirectories on C: */
call SysFileTree "c:\*.*", "file", "SD"
/* Find all Read-Only files */
call SysFileTree "c:\*.*", "file", "S", "***+*"
/* Clear Archive and Read-Only attributes of files that have them set */
call SysFileTree "c:\*.*", "file", "S", "+**+*", "-**-*"
/****&lt;&lt; Sample Code and Output Example.>>********/
/* Code */
call SysFileTree "c:\win*.", "file", "B"
do i=1 to file.0
say file.i
end
/* Actual Output */
5:24:95 4:59p 0 -D--- C:\WINDOWS
</programlisting>
</example>
</section>
<section id="utlSysfork"><title>SysFork (Unix only)</title>
<indexterm><primary>SysFork</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysFork</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysFork()---------------------------------------------------><
]]>
</programlisting>
<para><emphasis role="bold">Returns</emphasis></para>
<para>Returns the process id to the parent process.</para>
<para>Returns <computeroutput>0</computeroutput> to the spawned process.</para>
<para><emphasis role="bold">Example:</emphasis></para>
<para>
This is a complete working example. It can be cut and pasted into a file and executed on a Unix system.
</para>
<example id="ex.sysfork">
<title>RexxUtil - SysFork</title>
<programlisting>
<![CDATA[
/* Example Unix SysFork() and SysWait() */
pid = SysFork()
if pid == 0 then do
say "I am the child."
code = executeChild()
say "Child : done with execution, will exit with" code
exit code
end
else do
say 'I am the parent, child pid is:' pid
code = executeParent()
say 'Parent: going to wait for child.'
code = SysWait()
say 'Parent: back from waiting. Child exit code:' code
end
say 'Operating system version:' SysVersion()
::routine executeChild
say 'Child : will sleep 1 second.'
j = SysSleep(1)
say 'Child : done sleeping 1. Will do some calculations.'
total = 0
do 786
total += 3
end
say 'Child : 3 * 786 is:' total
say 'Child : will sleep 2 seconds.'
j = SysSleep(2)
say 'Child : done sleeping 2. Will do some calculations.'
total = 0
do 1865
total += 7
end
say 'Child : 7 * 1865 is:' total
say 'Child : will sleep 2 seconds.'
j = SysSleep(2)
say 'Child : done sleeping 2.'
say 'Child : done executing, will return 0.'
return 0
::routine executeParent
say 'Parent: 3 * 786 is:' (3 * 786)
j = SysSleep(2)
say 'Parent: 7 * 1865 is:' (7 * 1865)
return 0
]]>
</programlisting>
</example>
</section>
<section id="utlSysfromunicode"><title>SysFromUnicode (Windows only)</title>
<indexterm><primary>SysFromUnicode</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysFromUnicode</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysFromUnicode--(--string, codepage, mappingflags,----------->
>--, defaultchar, outstem--)-----------------------------------><
]]>
</programlisting>
<para>Maps a UNICODE character string to an ASCII character string. The new character
string and additional information is returned in the outstem.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">string</emphasis></term>
<listitem><para>A string containing the UNICODE characters to be mapped.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">codepage</emphasis></term>
<listitem><para>Specifies the code page used to perform the conversion.
This parameter
can be the value of any code page that is installed or available in the system.
The default is the current original equipment manufacturer (OEM) code-page
identifier for the system.</para>
<para>You can also
specify one of the following values:</para>
<variablelist>
<varlistentry><term>ACP</term>
<listitem><para>ANSI code page.
</para></listitem></varlistentry>
<varlistentry><term>OEMCP</term>
<listitem><para>OEM code page.
</para></listitem></varlistentry>
<varlistentry><term>SYMBOL</term>
<listitem><para>Windows 2000: symbol code page.
</para></listitem></varlistentry>
<varlistentry><term>THREAD_ACP
<indexterm><primary>thread</primary></indexterm>
</term>
<listitem><para>Windows 2000: current thread's ANSI code page.
</para></listitem></varlistentry>
<varlistentry><term>UTF7</term>
<listitem><para>Windows NT 4.0 and Windows 2000: translate using UTF-7.
</para></listitem></varlistentry>
<varlistentry><term>UTF8</term>
<listitem><para>Windows NT 4.0 and Windows 2000: translate using UTF-8. When
this is set, <computeroutput>mappingflags</computeroutput> must be set.
</para></listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="italic">mappingflags</emphasis></term>
<listitem><para>Specifies the handling of unmapped characters. The function
performs more quickly when none of these flags is set.</para>
<para>The following flags can be
used:</para>
<variablelist>
<varlistentry><term>COMPOSITECHECK</term>
<listitem><para>Converts composite characters to precomposed characters.
</para></listitem></varlistentry>
<varlistentry><term>SEPCHARS</term>
<listitem><para>Generates separate characters during conversion. This is the
default conversion behavior.
</para></listitem></varlistentry>
<varlistentry><term>DISCARDNS</term>
<listitem><para>Discards nonspacing characters during conversion.
</para></listitem></varlistentry>
<varlistentry><term>DEFAULTCHAR</term>
<listitem><para>Replaces non-convertible characters with the default character
during conversion.
</para></listitem></varlistentry>
</variablelist>
<para>When <computeroutput>compositecheck</computeroutput> is specified,
the function converts composite characters to precomposed characters.
A composite character consists of a base character and a nonspacing character,
each having different character
values. A precomposed character has a single character value for a combination
of a base and a nonspacing character. In the character &egrave;, the "e" is the
base character, and the "grave" accent mark is the nonspacing character.</para>
<para>When <computeroutput>compositecheck</computeroutput> is specified, it can
use the last three flags in this list
(<computeroutput>discardns, sepchars</computeroutput>, and
<computeroutput>defaultchar</computeroutput>)
to customize the conversion to precomposed characters. These flags determine
the function's behavior when there is no precomposed mapping for a combination
of a base and a nonspace character in a Unicode character string. These last
three flags can be used only if the
<computeroutput>compositecheck</computeroutput> flag is set.
The function's default behavior is to generate separate characters
(<computeroutput>sepchars</computeroutput>) for unmapped composite characters.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="italic">defaultchar</emphasis></term>
<listitem><para>Character to be used if a Unicode character cannot be
represented in the specified code page. If this parameter is NULL, a
system default value is used. The function is faster when
<computeroutput>defaultchar</computeroutput> is not used.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">outstem</emphasis></term>
<listitem><para>The name of the stem variable that will contain the converted
result. If the conversion was successful the stem will be composed of
the following value(s):
</para>
<variablelist>
<varlistentry><term>outstem.!USEDDEFAULTchar</term>
<listitem><para>This variable will be set to "1" if the
<emphasis role="italic">defaultchar</emphasis> was used
during the conversion and "0" if it was not.</para></listitem></varlistentry>
<varlistentry><term>outstem.!TEXT</term>
<listitem><para>This variable will contain the converted string.
</para></listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>No errors.
</para></listitem></varlistentry>
<varlistentry><term>Other</term>
<listitem><para>An error occurred. A Windows System Error code (<xref linkend="systemerrorcodes" />)
is returned. This may be one of the following, but could be others.
</para></listitem></varlistentry>
<varlistentry><term>87</term>
<listitem><para>Incorrect code page or
<computeroutput>codepage</computeroutput> value.
</para></listitem></varlistentry>
<varlistentry><term>1004</term>
<listitem><para>Invalid mapping flags.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSysgeterrortext"><title>SysGetErrortext</title>
<indexterm><primary>SysGetErrortext</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysGetErrortext</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysGetErrortext(errornumber)--------------------------------><
]]>
</programlisting>
<para>Obtains a string describing the system error identified by the error
number.</para>
<para>Returns a string with the description of the error, or an empty string
if no description is available.</para>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysGetErrortext</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysGetErrortext</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysGetErrortext</secondary></indexterm>
<example id="ex.sysgeterrortext-1">
<title>RexxUtil - SysGeterrortext (Windows)</title>
<programlisting>
err=SysMkDir("c:\temp")
if err \= 0 then
say "Error" err":"SysGetErrortext(err)
</programlisting>
</example>
<example id="ex.sysgeterrortext-2">
<title>RexxUtil - SysGeterrortext (Unix)</title>
<programlisting>
err=SysMkDir("/home/NotKnown/temp")
if err \= 0 then
say "Error" err":"SysGetErrortext(err)
</programlisting>
</example>
</section>
<section id="utlSysgetfiledatetime"><title>SysGetFileDateTime</title>
<indexterm><primary>SysGetFileDateTime</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysGetFileDateTime</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysGetFileDateTime(filename-+------------+-)----------------><
+-,--timesel-+
]]>
</programlisting>
<para>Returns the selected data and time attribute of the file
<emphasis role="italic">filename</emphasis> provided
that this is supported by the operating and file system. FAT, for example,
does not support Create/Access. The selector for the time to be returned can
be abbreviated to the first character.</para>
<para>The <emphasis role="italic">filename</emphasis> can
also be a directory name.</para>
<para>The file that you want to query must not be opened by another process or
must at least allow shared writes to query the time stamp.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">filename</emphasis></term>
<listitem><para>The name of the file to be queried.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">timesel</emphasis></term>
<listitem><para>The file time to be queried, namely CREATE, ACCESS, WRITE.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<para>The date and time in the format YYYY-MM-DD HH:MM:SS, or -1 to indicate
that the file date and time query failed</para>
<para><emphasis role="bold">Example:</emphasis></para>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysGetFileDateTime</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysGetFileDateTime</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysGetFileDateTime</secondary></indexterm>
<example id="ex.sysgetfiledatetime">
<title>RexxUtil - SysGetfiledatetime</title>
<programlisting>
Say "File creation time:" SysGetFileDateTime("MyFile.Log", "C")
Say "File last access time:" SysGetFileDateTime("MyFile.Log", "A")
Say "File last update time:" SysGetFileDateTime("MyFile.Log", "W")
Say "Directory creation time:" SysGetFileDateTime("C:\MyDir", "C")
/* in Windows NT */
</programlisting>
</example>
</section>
<section id="utlSysgetkey"><title>SysGetKey</title>
<indexterm><primary>SysGetKey</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysGetKey</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysGetKey(-+-----+-)----------------------------------------><
+-opt-+
]]>
</programlisting>
<para>Reads and returns the next key from the keyboard buffer. If the keyboard
buffer is empty, SysGetKey waits until a key is pressed. Unlike the CHARIN
built-in function, SysGetKey does not wait until the Enter key is pressed.
</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">opt</emphasis></term>
<listitem><para>An option controlling screen echoing. Allowed values are:
<variablelist>
<varlistentry><term>"ECHO"</term>
<listitem><para>Echo the pressed key to the screen. This is the default.
</para></listitem></varlistentry>
<varlistentry><term>"NOECHO"</term>
<listitem><para>Do not echo the pressed key.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSysgetmessage"><title>SysGetMessage (Unix only)</title>
<indexterm><primary>SysGetMessage</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysGetMessage</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysGetMessage(num--+---------------------------------+--)-----><
+--,--filename--+---------------+-+
| | +---------+ | |
| | V | | |
| +----,--str--+--+ |
| +---------+ |
| V | |
+-----,--str-+--------------------+
]]>
</programlisting>
<para>Retrieves a message from a catalog file and replaces the placeholder
<computeroutput>%s</computeroutput> with the text you specify. SysGetMessage
can replace up to 9 placeholders.</para>
<para>This utility is implemented for Unix only.</para>
<para>To create catalog files, consult your system documentation.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">num</emphasis></term>
<listitem><para>The message number.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">filename</emphasis></term>
<listitem><para>The name of the catalog file containing the message. The
default message catalog is <emphasis role="bold">rexx.cat</emphasis>.
SysGetMessage searches along the NLSPATH or uses the absolute path name.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">str</emphasis></term>
<listitem><para>The test for a placeholder (%) in the message. The message can
contain up to 9 placeholders. You must specify as many strings as there are
placeholders in the message.
</para></listitem></varlistentry>
</variablelist>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysGetMessage</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysGetMessage</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysGetMessage</secondary></indexterm>
<example id="ex.sysgetmessage">
<title>RexxUtil - SysGetmessage</title>
<programlisting>
<![CDATA[
/* sample code segment using SysGetMessage */
msg = SysGetMessage(485, "rexx.cat", foo)
say msg
/*** Output ***/
Class "foo" not found.
]]>
</programlisting>
</example>
</section>
<section id="utlSysgetmessagex"><title>SysGetMessageX (Unix only)</title>
<indexterm><primary>SysGetMessageX</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysGetMessageX</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysGetMessageX(set,num--+---------------------------------+--)-><
+--,--filename--+---------------+-+
| | +---------+ | |
| | V | | |
| +----,--str--+--+ |
| +---------+ |
| V | |
+-----,--str--+-------------------+
]]>
</programlisting>
<para>Retrieves a message from a specific set of
Unix catalog file and replaces the placeholder
<computeroutput>%s</computeroutput> with the text you specify. SysGetMessageX
can replace up to 9 placeholders.</para>
<para>This utility is implemented for Unix only. Do not use it for
platform-independent programs.</para>
<para>To create catalog files, consult your system documentation.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">set</emphasis></term>
<listitem><para>The message set.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">num</emphasis></term>
<listitem><para>The message number.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">filename</emphasis></term>
<listitem><para>The name of the catalog file containing the message. The
default message catalog is <emphasis role="bold">rexx.cat</emphasis>.
SysGetMessageX searches along the NLSPATH or uses the absolute path name.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">str</emphasis></term>
<listitem><para>The test for a placeholder (%) in the message. The message can
contain up to 9 placeholders. You must specify as many strings as there are
placeholders in the message.
</para></listitem></varlistentry>
</variablelist>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysGetMessageX</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysGetMessageX</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysGetMessageX</secondary></indexterm>
<example id="ex.sysgetmessagex">
<title>RexxUtil - SysGetmessagex</title>
<programlisting>
<![CDATA[
/* sample code segment using SysGetMessage */
msg = SysGetMessageX(1, 485, "rexx.cat", foo)
say msg
/*** Output ***/
Class "foo" not found.
]]>
</programlisting>
</example>
</section>
<section id="utlSysini"><title>SysIni (Windows only)</title>
<indexterm><primary>SysIni</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysIni</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysIni(-+---------+-,app,key,val,stem-)---------------------><
+-inifile-+
]]>
</programlisting>
<para>Allows limited access to INI file variables. Variables are stored in the
INI file under Application Names and their associated key names or keywords.
You can use SysIni to share variables between applications or as a way of
implementing GLOBALV in the Windows operating system. Be careful when
changing application profile information.</para>
<note><title>Note</title>
<para>SysIni works on all types of data stored in an INI file (text,
numeric, or binary).</para></note>
<para>When SysIni successfully sets or deletes key values, it returns "".
For a successful query, it returns the value of the specified application
keyword.</para>
<para>SysIni may return the string <computeroutput>ERROR:</computeroutput>
when an error occurs. Possible error conditions include:</para>
<itemizedlist>
<listitem><para>An attempt was made to query or delete an application/key pair
that does not exist.</para></listitem>
<listitem><para>An error opening the profile file occurred. You may have
specified the current user or system INI file with a relative file
specification. Make sure to use the full file specification
(specify drive, path, and file name).</para></listitem>
</itemizedlist>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">inifile</emphasis></term>
<listitem><para>The name of the INI file with which you would like to work. The
default is WIN.INI.
<note><title>Note</title>
<para>If this argument does not contain a fully qualified file name, the Windows
operating system searches for the file in the Windows directory. Therefore to
work with a file outside of the Windows directory, specify the full path name of
the file.
</para></note>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">app</emphasis></term>
<listitem><para>The application name or some other meaningful value with which
you want to store keywords (some sort of data).
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">key</emphasis></term>
<listitem><para>The name of a keyword to hold data.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">val</emphasis></term>
<listitem><para>The value to associate with the keyword of the specified
application. This can be <computeroutput>"DELETE:"</computeroutput> or
<computeroutput>"ALL:"</computeroutput>.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">stem</emphasis></term>
<listitem><para>The name of a Rexx stem variable collection in which to store
the resultant information. SysIni sets Rexx variable
<emphasis role="italic">stem.0</emphasis> to the number of elements
returned and stores these elements in
<emphasis role="italic">stem.1</emphasis> to
<emphasis role="italic">stem.n</emphasis>.
</para></listitem></varlistentry>
</variablelist>
<para>Sysini has six modes. The modes and the syntax variations are as follows:
</para>
<programlisting>
<![CDATA[
>>-SysIni(-+---------+-,app,key,val)---------------------------><
+-inifile-+
]]>
</programlisting>
<para>Sets a single key value.</para>
<programlisting>
<![CDATA[
>>-SysIni(-+---------+-,app,key)-------------------------------><
+-inifile-+
]]>
</programlisting>
<para>Queries a single key value.</para>
<programlisting>
<![CDATA[
>>-SysIni(-+---------+-,app,key--,"DELETE:"-)------------------><
+-inifile-+
]]>
</programlisting>
<para>Deletes a single key.</para>
<programlisting>
<![CDATA[
>>-SysIni(-+---------+-,app-+------------+-)-------------------><
+-inifile-+ +-,"DELETE:"-+
]]>
</programlisting>
<para>Deletes an application and all associated keys.</para>
<programlisting>
<![CDATA[
>>-SysIni(-+---------+-,app--,"ALL:"--,"stem"-)----------------><
+-inifile-+
]]>
</programlisting>
<para>Queries names of all keys associated with a certain application.</para>
<programlisting>
<![CDATA[
>>-SysIni(-+---------+-,"ALL:"--,"stem"-)----------------------><
+-inifile-+
]]>
</programlisting>
<para>Queries the names of all applications.</para>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysIni</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysIni</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysIni</secondary></indexterm>
<example id="ex.sysini-1">
<title>RexxUtil - SysIni</title>
<programlisting>
/*** Save the user entered name under the key "NAME" of *****
**** the application "MYAPP". ****/
pull name .
call SysIni , "MYAPP", "NAME", name /* Save the value */
say SysIni(, "MYAPP", "NAME") /* Query the value */
call SysIni , "MYAPP" /* Delete all MYAPP info */
exit
</programlisting>
</example>
<example id="ex.sysini-2">
<title>RexxUtil - SysIni</title>
<programlisting>
/**** Type all WIN.INI file information to the screen *****/
call SysIni "WIN.INI", "All:", "Apps."
if Result \= "ERROR:" then
do i = 1 to Apps.0
call SysIni "WIN.INI", Apps.i, "All:", "Keys"
if Result \= "ERROR:" then
do j=1 to Keys.0
val = SysIni("WIN.INI", Apps.i, Keys.j)
say left(Apps.i, 20) left(Keys.j, 20),
"Len=x"Left(d2x(length(val)),4) left(val, 20)
end
end
exit
</programlisting>
</example>
</section>
<section id="utlSysisfile"><title>SysIsFile</title>
<indexterm><primary>SysIsFile</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysIsFile</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysIsFile(filename)-----------------------------------------><
]]>
</programlisting>
<para>Checks for the existence of a file. This function does not support
wildcard specifications.</para>
<para>On Linux/Unix block devices are also considered to be regular files
by this function.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">filename</emphasis></term>
<listitem><para>The name of the file to check for the existence of.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Returns:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The file does not exist.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>The file exists.
</para></listitem></varlistentry>
</variablelist>
<example id="ex.sysisfile">
<title>RexxUtil - SysIsfile</title>
<programlisting>
if SysIsFile(InputFile) then say "File Exists!"
else say "File does not exist."
</programlisting>
</example>
</section>
<section id="utlSysisfilecompressed"><title>SysIsFileCompressed (Windows only)</title>
<indexterm><primary>SysIsFileCompressed</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysIsFileCompressed</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysIsFileCompressed(filename)-------------------------------><
]]>
</programlisting>
<para>Checks if a file is compressed. This function does not support
wildcard specifications.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">filename</emphasis></term>
<listitem><para>The name of the file to check.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Returns:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The file is not compressed or does not exist.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>The file is compressed.
</para></listitem></varlistentry>
</variablelist>
<example id="ex.sysisfilecompressed">
<title>RexxUtil - SysIsfilecompressed</title>
<programlisting>
if SysIsFileCompressed(InputFile) then say "File is compressed!"
else say "File is not compressed or does not exist."
</programlisting>
</example>
</section>
<section id="utlSysisfiledirectory"><title>SysIsFileDirectory</title>
<indexterm><primary>SysIsFileDirectory</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysIsFileDirectory</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysIsFileDirectory(dirname)---------------------------------><
]]>
</programlisting>
<para>Checks for the existence of a subdirectory. This function does not support
wildcard specifications.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">dirname</emphasis></term>
<listitem><para>The name of the subdirectory to check for the existence of.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Returns:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The subdirectory does not exist.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>The subdirectory exists.
</para></listitem></varlistentry>
</variablelist>
<example id="ex.sysisfiledirectory">
<title>RexxUtil - SysIsfiledirectory</title>
<programlisting>
if SysIsFileDirectory(InputFile) then say "Subdirectory Exists!"
else say "Subdirectory does not exist."
</programlisting>
</example>
</section>
<section id="utlSysisfileencrypted"><title>SysIsFileEncrypted (Windows only)</title>
<indexterm><primary>SysIsFileEncrypted</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysIsFileEncrypted</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysIsFileEncrypted(filename)--------------------------------><
]]>
</programlisting>
<para>Checks if a file is encrypted. This function does not support
wildcard specifications.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">filename</emphasis></term>
<listitem><para>The name of the file to check.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Returns:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The file is not encrypted or does not exist.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>The file is encrypted.
</para></listitem></varlistentry>
</variablelist>
<example id="ex.sysisfileencrypted">
<title>RexxUtil - SysIsfileencrypted</title>
<programlisting>
if SysIsFileEncrypted(InputFile) then say "File is encrypted!"
else say "File is not encrypted or does not exist."
</programlisting>
</example>
</section>
<section id="utlSysisfilelink"><title>SysIsFileLink</title>
<indexterm><primary>SysIsFileLink</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysIsFileLink</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysIsFileLink(linkname)-------------------------------------><
]]>
</programlisting>
<para>Checks for the existence of a link. This function does not support
wildcard specifications.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">linkname</emphasis></term>
<listitem><para>The name of the link to check for the existence of.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Returns:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The link does not exist or it is not a link.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>The link exists.
</para></listitem></varlistentry>
</variablelist>
<example id="ex.sysisfilelink">
<title>RexxUtil - SysIsfilelink</title>
<programlisting>
if SysIsFileLink(InputFile) then say "Link Exists!"
else say "Link does not exist."
</programlisting>
</example>
</section>
<section id="utlSysisfilenotcontentindexed">
<title>SysIsFileNotContentIndexed (Windows only)</title>
<indexterm><primary>SysIsFileNotContentIndexed</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysIsFileNotContentIndexed</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysIsFileNotContentIndexed(filename)------------------------><
]]>
</programlisting>
<para>Checks if a file is flagged to be indexed by the Index Service.
This function does not support wildcard specifications.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">filename</emphasis></term>
<listitem><para>The name of the file to check.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Returns:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The file is not flagged to be Indexed or does not exist.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>The file is flagged to be Indexed.
</para></listitem></varlistentry>
</variablelist>
<example id="ex.sysisfilenotcontentindexed">
<title>RexxUtil - SysIsfilenotcontentindexed</title>
<programlisting>
if SysIsFileNotContentIndexed(InputFile) then say "File is flagged to be Indexed!"
else say "File is not flagged to be Indexed."
</programlisting>
</example>
</section>
<section id="utlSysisfileoffline"><title>SysIsFileOffline (Windows only)</title>
<indexterm><primary>SysIsFileOffline</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysIsFileOffline</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysIsFileOffline(filename)----------------------------------><
]]>
</programlisting>
<para>Checks if a file is flagged as Offline.
This function does not support wildcard specifications.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">filename</emphasis></term>
<listitem><para>The name of the file to check.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Returns:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The file is not flagged as Offline or does not exist.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>The file is flagged as Offline.
</para></listitem></varlistentry>
</variablelist>
<example id="ex.sysisfileoffline">
<title>RexxUtil - SysIsfileoffline</title>
<programlisting>
if SysIsFileOffline(InputFile) then say "File is flagged as Offline!"
else say "File is not flagged as Offline."
</programlisting>
</example>
</section>
<section id="utlSysisfilesparse"><title>SysIsFileSparse (Windows only)</title>
<indexterm><primary>SysIsFileSparse</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysIsFileSparse</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysIsFileSparse(filename)-----------------------------------><
]]>
</programlisting>
<para>Checks if a file is flagged as Sparse.
This function does not support wildcard specifications.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">filename</emphasis></term>
<listitem><para>The name of the file, subdirectory or link to check.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Returns:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The file is not flagged as Sparse or does not exist.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>The file is flagged as Sparse.
</para></listitem></varlistentry>
</variablelist>
<example id="ex.sysisfilesparse">
<title>RexxUtil - SysIsfilesparse</title>
<programlisting>
if SysIsFileSparse(InputFile) then say "File is Sparse!"
else say "File is not Sparse."
</programlisting>
</example>
</section>
<section id="utlSysisfiletemporary"><title>SysIsFileTemporary (Windows only)</title>
<indexterm><primary>SysIsFileTemporary</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysIsFileTemporary</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysIsFileTemporary(filename)--------------------------------><
]]>
</programlisting>
<para>Checks if a file is flagged as Temporary.
This function does not support wildcard specifications.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">filename</emphasis></term>
<listitem><para>The name of the file, subdirectory or link to check.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Returns:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The file is not flagged as Temporary or does not exist.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>The file is flagged as Temporary.
</para></listitem></varlistentry>
</variablelist>
<example id="ex.sysisfiletemporary">
<title>RexxUtil - SysIsfiletemporary</title>
<programlisting>
if SysIsFileTemporary(InputFile) then say "File is Temporary!"
else say "File is not Temporary."
</programlisting>
</example>
</section>
<section id="utlSyslinver"><title>SysLinVer (Linux Only)</title>
<indexterm><primary>SysLinVer</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysLinVer</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysLinVer()-------------------------------------------------><
]]>
</programlisting>
<para>
Returns a string identifying the Linux system version. The first word of the returned string is Linux
and the second word in the string identifies the kernel version. A possible output for a Linux system
might be:
</para>
<example id="ex.syslinver">
<title>RexxUtil - SysLinver</title>
<programlisting>
Say SysLinVer() -> "Linux 2006.2.6.18-1.2798.fc6"
</programlisting>
</example>
</section>
<section id="utlSysloadfuncs"><title>SysLoadFuncs</title>
<indexterm><primary>SysLoadFuncs</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysLoadFuncs</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysLoadFuncs------------------------------------------------><
]]>
</programlisting>
<para>
From ooRexx 4.0.0 and on this function does nothing.
</para>
</section>
<section id="utlSysloadrexxmacrospace"><title>SysLoadRexxMacroSpace</title>
<indexterm><primary>SysLoadRexxMacroSpace</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysLoadRexxMacroSpace</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysLoadRexxMacroSpace(file)---------------------------------><
]]>
</programlisting>
<para>Loads functions from a saved macrospace file. SysLoadRexxMacroSpace
returns the RexxLoadMacroSpace return code.</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">file</emphasis></term>
<listitem><para>The file used to load functions into the Rexx macrospace.
SysSaveRexxMacroSpace must have created the file.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSysmkdir"><title>SysMkDir</title>
<indexterm><primary>SysMkDir</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysMkDir</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysMkDir(dirspec)-------------------------------------------><
]]>
</programlisting>
<para>Creates a specified directory.</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">dirspec</emphasis></term>
<listitem><para>The directory to be created.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>Directory creation was successful.
</para></listitem></varlistentry>
<varlistentry><term>Other</term>
<listitem><para>An error occurred. On Windows, a Windows System Error code (<xref linkend="systemerrorcodes" />)
is returned. This may be one of the following, but could be others.
</para></listitem></varlistentry>
<varlistentry><term>2</term>
<listitem><para>File not found.
</para></listitem></varlistentry>
<varlistentry><term>3</term>
<listitem><para>Path not found.
</para></listitem></varlistentry>
<varlistentry><term>5</term>
<listitem><para>Access denied.
</para></listitem></varlistentry>
<varlistentry><term>26</term>
<listitem><para>Not a DOS disk.
</para></listitem></varlistentry>
<varlistentry><term>87</term>
<listitem><para>Invalid parameter.
</para></listitem></varlistentry>
<varlistentry><term>108</term>
<listitem><para>Drive locked.
</para></listitem></varlistentry>
<varlistentry><term>183</term>
<listitem><para>Directory already exists.
</para></listitem></varlistentry>
<varlistentry><term>206</term>
<listitem><para>File name exceeds range.
</para></listitem></varlistentry>
</variablelist>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysMkDir</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysMkDir</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysMkDir</secondary></indexterm>
<example id="ex.sysmkdir">
<title>RexxUtil - SysMkdir</title>
<programlisting>
/* Code */
call SysMkDir "rexx"
</programlisting>
</example>
</section>
<section id="utlSysopeneventsem"><title>SysOpenEventSem</title>
<indexterm><primary>SysOpenEventSem</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysOpenEventSem</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysOpenEventSem(name)---------------------------------------><
]]>
</programlisting>
<para>Opens an event semaphore. SysOpenEventSem
returns a handle to the semaphore, or zero if an error occurred.</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">name</emphasis></term>
<listitem><para>The name of the event semaphore created by SysCreateEventSem.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSysopenmutexsem"><title>SysOpenMutexSem</title>
<indexterm><primary>SysOpenMutexSem</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysOpenMutexSem</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysOpenMutexSem(name)---------------------------------------><
]]>
</programlisting>
<para>Opens a mutex semaphore. SysOpenMutexSem
returns a handle to the semaphore, or zero if an error occurred.</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">name</emphasis></term>
<listitem><para>The name of the mutex semaphore created by SysCreateMutexSem.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSysposteventsem"><title>SysPostEventSem</title>
<indexterm><primary>SysPostEventSem</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysPostEventSem</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysPostEventSem(handle)-------------------------------------><
]]>
</programlisting>
<para>Posts an event semaphore.</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">handle</emphasis></term>
<listitem><para>A handle returned from a previous SysCreateEventSem call.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>No errors.
</para></listitem></varlistentry>
<varlistentry><term>Other</term>
<listitem><para>An error occurred. On Windows, a Windows System Error code (<xref linkend="systemerrorcodes" />)
is returned. This may be one of the following, but could be others.
</para></listitem></varlistentry>
<varlistentry><term>6</term>
<listitem><para>Invalid handle.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSyspulseeventsem"><title>SysPulseEventSem (Windows only)</title>
<indexterm><primary>SysPulseEventSem</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysPulseEventSem</secondary></indexterm>
<indexterm><primary>thread</primary></indexterm>
<programlisting>
<![CDATA[
>>-SysPulseEventSem(handle)------------------------------------><
]]>
</programlisting>
<para>Posts and immediately resets an event
semaphore. It sets the state of the event to signaled (available), releases
any waiting threads, and resets it to nonsignaled (unavailable) automatically.
If the event is manual, all waiting threads are released, the event is set
to nonsignaled, and PulseEvent returns. If the event is automatic, a single
thread is released, the event is set to nonsignaled, and PulseEvent returns.
If no threads are waiting, or no threads can be released immediately, PulseEvent
sets the state of the event to nonsignaled and returns.</para>
<para>SysPulseEventSem returns 0 on success and a
Windows System Error code (<xref linkend="systemerrorcodes" />) is returned on
error.
.</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">handle</emphasis></term>
<listitem><para>The handle of an event semaphore previously created
by SysCreateEventSem.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSysqueryprocess"><title>SysQueryProcess</title>
<indexterm><primary>SysQueryProcess</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysQueryProcess</secondary></indexterm>
<para><emphasis role="bold">Windows</emphasis></para>
<indexterm><primary>thread</primary></indexterm>
<programlisting>
<![CDATA[
+-PID---+
>>-SysQueryProcess(" -+-TID---+- ")----------------------------><
+-PPRIO-+
+-TPRIO-+
+-PTIME-+
+-TTIME-+
]]>
</programlisting>
<para><emphasis role="bold">Unix</emphasis></para>
<programlisting>
<![CDATA[
+-PID------+
>>-SysQueryProcess(" -+----------+- ")-------------------------><
+-PPID-----+
+-PPRIO----+
+-PTIME----+
+-PMEM-----+
+-PSWAPS---+
+-PRCVDSIG-+
]]>
</programlisting>
<para>Retrieves information about the current
process or Windows thread.</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">info</emphasis></term>
<listitem><para>The kind of information requested:
<variablelist>
<varlistentry><term>PID</term>
<listitem><para>Returns the process ID of the current process.
</para></listitem></varlistentry>
<varlistentry><term>PPID</term>
<listitem><para>Returns the parent process ID of the current process.
</para></listitem></varlistentry>
<varlistentry><term>TID</term>
<listitem><para>Returns the thread ID of the current thread.
</para></listitem></varlistentry>
<varlistentry><term>PPRIO</term>
<listitem><para>Returns the priority class of the current process.
</para></listitem></varlistentry>
<varlistentry><term>TPRIO</term>
<listitem><para>Returns the relative priority of the current thread.
</para></listitem></varlistentry>
<varlistentry><term>PTIME</term>
<listitem><para>Returns time information on the current process.
</para></listitem></varlistentry>
<varlistentry><term>TTIME</term>
<listitem><para>Returns time information on the current thread.
</para></listitem></varlistentry>
<varlistentry><term>PMEM</term>
<listitem><para>Returns the maximum memory (RSS) used by the current
process.</para></listitem></varlistentry>
<varlistentry><term>PRCVDSIG</term>
<listitem><para>Returns the number of signals that have been received by
the process.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<itemizedlist>
<listitem><para>For PID, PPID or TID: an ID</para></listitem>
<listitem><para>For Windows PPRIO: &quot;IDLE&quot;, &quot;NORMAL&quot;,
&quot;HIGH&quot;, &quot;REALTIME&quot;,
or &quot;UNKNOWN&quot;</para></listitem>
<listitem><para>For Unix PPRIO: a number from -20 to +20.
</para></listitem>
<listitem><para>For TPRIO: &quot;IDLE&quot;, &quot;LOWEST&quot;,
&quot;BELOW_NORMAL&quot;, &quot;NORMAL&quot;, &quot;ABOVE_NORMAL&quot;,
&quot;HIGHEST&quot;, &quot;TIME_CRITICAL&quot;,
or &quot;UNKNOWN&quot;</para></listitem>
<listitem><para>For Windows PTIME or TTIME: the creation date and time, the
amount of time that the process executed in kernel mode, and the amount of time
that the process executed in user mode</para></listitem>
<listitem><para>For Unix PTIME: the summary and the duration that the process
executed in kernel mode, and the duration that the process executed in
user mode</para></listitem></itemizedlist>
</section>
<section id="utlSysqueryrexxmacro"><title>SysQueryRexxMacro</title>
<indexterm><primary>SysQueryRexxMacro</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysQueryRexxMacro</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysQueryRexxMacro(name)-------------------------------------><
]]>
</programlisting>
<para>Queries the existence of a macrospace function. SysQueryRexxMacro returns
the placement order of the macrospace function or a null string (&quot;&quot;)
if the function does not exist in the macrospace.</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">name</emphasis></term>
<listitem><para>The name of a function in the Rexx macrospace.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSysreleasemutexsem"><title>SysReleaseMutexSem</title>
<indexterm><primary>SysReleaseMutexSem</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysReleaseMutexSem</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysReleaseMutexSem(handle)----------------------------------><
]]>
</programlisting>
<para>Releases a mutex semaphore.</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">handle</emphasis></term>
<listitem><para>A handle returned from a previous SysCreateMutexSem call.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>No errors.
</para></listitem></varlistentry>
<varlistentry><term>Other</term>
<listitem><para>An error occurred. On Windows, a Windows System Error code (<xref linkend="systemerrorcodes" />)
is returned. This may be one of the following, but could be others.
</para></listitem></varlistentry>
<varlistentry><term>6</term>
<listitem><para>Invalid handle.
</para></listitem></varlistentry>
<varlistentry><term>105</term>
<listitem><para>Owner died.
</para></listitem></varlistentry>
<varlistentry><term>288</term>
<listitem><para>Not owner.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSysreorderrexxmacro"><title>SysReorderRexxMacro</title>
<indexterm><primary>SysReorderRexxmacro</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysReorderRexxMacro</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysReorderRexxMacro(name,order)-----------------------------><
]]>
</programlisting>
<para>Reorders a routine loaded in the Rexx macrospace. SysReorderRexxMacro
returns the RexxReorderMacro return code.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">name</emphasis></term>
<listitem><para>The name of a function in the macrospace.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">order</emphasis></term>
<listitem><para>The new macro search order. The order can be "B" (Before) or "A"
(After).
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSysrequestmutexsem"><title>SysRequestMutexSem</title>
<indexterm><primary>SysRequestMutexSem</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysRequestMutexSem</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysRequestMutexSem(handle-+----------+-)--------------------><
+-,timeout-+
]]>
</programlisting>
<para>Requests a mutex semaphore. SysRequestMutexSem
returns the WaitForSingleObject return code.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">handle</emphasis></term>
<listitem><para>A handle returned from a previous SysCreateMutexSem call.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">timeout</emphasis></term>
<listitem><para>The time, in milliseconds, to wait on the semaphore.
The default <emphasis role="italic">timeout</emphasis> is an infinite wait.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>No errors.
</para></listitem></varlistentry>
<varlistentry><term>Other</term>
<listitem><para>An error occurred. On Windows, a Windows System Error code (<xref linkend="systemerrorcodes" />)
is returned. This may be one of the following, but could be others.
</para></listitem></varlistentry>
<varlistentry><term>6</term>
<listitem><para>Invalid handle.
</para></listitem></varlistentry>
<varlistentry><term>103</term>
<listitem><para>Too many requests.
</para></listitem></varlistentry>
<varlistentry><term>121</term>
<listitem><para>Error timeout.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSysreseteventsem"><title>SysResetEventSem</title>
<indexterm><primary>SysResetEventSem</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysResetEventSem</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysResetEventSem(handle)------------------------------------><
]]>
</programlisting>
<para>Resets an event semaphore..</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">handle</emphasis></term>
<listitem><para>A handle returned from a previous SysCreateEventSem call.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>No errors.
</para></listitem></varlistentry>
<varlistentry><term>Other</term>
<listitem><para>An error occurred. On Windows, a Windows System Error code (<xref linkend="systemerrorcodes" />)
is returned. This may be one of the following, but could be others.
</para></listitem></varlistentry>
<varlistentry><term>6</term>
<listitem><para>Invalid handle.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSysrmdir"><title>SysRmDir</title>
<indexterm><primary>SysRmDir</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysRmDir</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysRmDir(dirspec)-------------------------------------------><
]]>
</programlisting>
<para>Deletes a specified file directory without your confirmation. </para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">dirspec</emphasis></term>
<listitem><para>The directory that should be deleted.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>Directory removal was successful.
</para></listitem></varlistentry>
<varlistentry><term>Other</term>
<listitem><para>An error occurred. On Windows, a Windows System Error code (<xref linkend="systemerrorcodes" />)
is returned. This may be one of the following, but could be others.
</para></listitem></varlistentry>
<varlistentry><term>2</term>
<listitem><para>File not found.
</para></listitem></varlistentry>
<varlistentry><term>3</term>
<listitem><para>Path not found.
</para></listitem></varlistentry>
<varlistentry><term>5</term>
<listitem><para>Access denied or busy.
</para></listitem></varlistentry>
<varlistentry><term>16</term>
<listitem><para>Current directory.
</para></listitem></varlistentry>
<varlistentry><term>26</term>
<listitem><para>Not a DOS disk.
</para></listitem></varlistentry>
<varlistentry><term>32</term>
<listitem><para>Sharing violation.
</para></listitem></varlistentry>
<varlistentry><term>108</term>
<listitem><para>Drive locked.
</para></listitem></varlistentry>
<varlistentry><term>123</term>
<listitem><para>Invalid name.
</para></listitem></varlistentry>
<varlistentry><term>145</term>
<listitem><para>Directory not empty.
</para></listitem></varlistentry>
<varlistentry><term>146</term>
<listitem><para>Is Subst Path.
</para></listitem></varlistentry>
<varlistentry><term>147</term>
<listitem><para>Is Join Path.
</para></listitem></varlistentry>
<varlistentry><term>206</term>
<listitem><para>File name exceeds range.
</para></listitem></varlistentry>
</variablelist>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysRmDir</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysRmDir</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysRmDir</secondary></indexterm>
<example id="ex.sysrmkdir">
<title>RexxUtil - SysRmdir</title>
<programlisting>
/* Code */
call SysRmDir "c:\rexx"
</programlisting>
</example>
</section>
<section id="utlSyssaverexxmacrospace"><title>SysSaveRexxMacroSpace</title>
<indexterm><primary>SysSaveRexxMacroSpace</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysSaveRexxMacroSpace</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysSaveRexxMacroSpace(file)---------------------------------><
]]>
</programlisting>
<para>Saves the Rexx macrospace. SysSaveRexxMacroSpace returns the RexxSaveMacroSpace
return code.</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">file</emphasis></term>
<listitem><para>The file used to save the functions in the Rexx macrospace.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSyssearchpath"><title>SysSearchPath</title>
<indexterm><primary>SysSearchPath</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysSearchPath</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysSearchPath(path,filename-+-----------+-)-----------------><
+-,--option-+
]]>
</programlisting>
<para>Searches the specified file path for the specified file. If the file is
found, the search returns the full file specification of the first file found
within the path, and then stops searching. If the file is not found, the search
returns a null string.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">path</emphasis></term>
<listitem><para>An environment variable name. The environment variable must
contain a list of file directories. Examples are "PATH" or "DPATH".
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">filename</emphasis></term>
<listitem><para>The file for which the path is to be searched.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">option</emphasis></term>
<listitem><para>Specifies where the search starts.
<variablelist>
<varlistentry><term>"C"</term>
<listitem><para>Starts the search at the current directory and then along the
specified path. This is the default.
</para></listitem></varlistentry>
<varlistentry><term>"N"</term>
<listitem><para>Starts the search at the path, not at the current directory.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysSearchPath</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysSearchPath</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysSearchPath</secondary></indexterm>
<example id="ex.syssearchpath">
<title>RexxUtil - SysSearchpath</title>
<programlisting>
/* Code */
fspec = SysSearchPath("PATH", "CMD.EXE")
say "CMD.EXE is located at" fspec
/* Output */
CMD.EXE is located at C:\WIN\CMD.EXE
</programlisting>
</example>
</section>
<section id="utlSyssetfiledatetime"><title>SysSetFileDateTime</title>
<indexterm><primary>SysSetFileDateTime</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysSetFileDateTime</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysSetFileDateTime(filename-+--------------------------------+-)-><
+-,--+---------+--+------------+-+
+-newdate-+ +-,--newtime-+
]]>
</programlisting>
<para>Modifies the &quot;Last Modified&quot; date and time of file
<emphasis role="italic">filename</emphasis>. If no new date or time is
specified the file date or time is set to the current time (TOUCH).
If only the date is omitted, the &quot;Last Modified&quot;
date remains unchanged. If only the time is omitted, the &quot;Last
Modified&quot; time remains unchanged.</para>
<para>The <emphasis role="italic">filename</emphasis> can
also be a directory name.</para>
<para>The file that you want to change must not be opened by another process
or must at least allow shared writes to update the time stamp.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">filename</emphasis></term>
<listitem><para>The name of the file to be updated.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">newdate</emphasis></term>
<listitem><para>The new date for the file, to be specified in the format
YYYY-MM-DD, where YYYY > 1800.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">newtime</emphasis></term>
<listitem><para>The new time for the file, to be specified in the format
HH:MM:SS (24-hour format).
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The file date and time were updated correctly.
</para></listitem></varlistentry>
<varlistentry><term>-1</term>
<listitem><para>The update of the file date or time failed.
</para></listitem></varlistentry>
</variablelist>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysSetFileDateTime</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysSetFileDateTime</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysSetFileDateTime</secondary></indexterm>
<example id="ex.syssetfiledatetime">
<title>RexxUtil - SysSetfiledatetime</title>
<programlisting>
Call SysSetFileDateTime "MyFile.Log" /* touch file */
Call SysSetFileDateTime "MyFile.Log", "1998-12-17"
Call SysSetFileDateTime "MyFile.Log", , "16:37:21"
Call SysSetFileDateTime "MyFile.Log", "1998-12-17", "16:37:21"
Call SysSetFileDateTime "C:\MyDir" /* touch dir on Windows NT */
</programlisting>
</example>
</section>
<section id="utlSyssetpriority"><title>SysSetPriority</title>
<indexterm><primary>SysSetPriority</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysSetPriority</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysSetPriority(class,delta)---------------------------------><
]]>
</programlisting>
<para>Changes the priority of the current process. A return code
of 0 indicates no error.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">class</emphasis></term>
<listitem><para>The new process priority class. The allowed classes are:
<variablelist>
<varlistentry><term>0 or &quot;IDLE&quot;</term>
<listitem><para>Idle time priority
</para></listitem></varlistentry>
<varlistentry><term>1 or &quot;NORMAL&quot;</term>
<listitem><para>Regular priority
</para></listitem></varlistentry>
<varlistentry><term>2 or &quot;HIGH&quot;</term>
<listitem><para>High or time-critical priority
</para></listitem></varlistentry>
<varlistentry><term>3 or &quot;REALTIME&quot;</term>
<listitem><para>Real-time priority
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">delta</emphasis></term>
<listitem><para>The change applied to the process priority level.
<emphasis role="italic">delta</emphasis> must be in the range -15 to +15.
It can also be a symbolic name:
<itemizedlist>
<listitem><para>&quot;IDLE&quot; for -15</para></listitem>
<listitem><para>&quot;LOWEST&quot; for -2</para></listitem>
<listitem><para>&quot;BELOW_NORMAL&quot; for -1</para></listitem>
<listitem><para>&quot;NORMAL&quot; for 0</para></listitem>
<listitem><para>&quot;ABOVE_NORMAL&quot; for 1</para></listitem>
<listitem><para>&quot;HIGHEST&quot; for 2</para></listitem>
<listitem><para>&quot;TIME_CRITICAL&quot; for 15</para></listitem>
</itemizedlist>
</para></listitem></varlistentry>
</variablelist>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>No errors.
</para></listitem></varlistentry>
<varlistentry><term>Other</term>
<listitem><para>An error occurred. A Windows System Error code (<xref linkend="systemerrorcodes" />)
is returned. This may be one of the following, but
could be others.
</para></listitem></varlistentry>
<varlistentry><term>307</term>
<listitem><para>Invalid priority class.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSysshutdownsystem"><title>SysShutdownSystem (Windows only)</title>
<indexterm><primary>SysShutdownSystem</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysShutdownSystem</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysShutdownSystem(-+----------+-+----------+-+----------+-+--------+-+---------+-)---><
+-computer-+ +-,message-+ +-,timeout-+ +-,force-+ +-,reboot-+
]]>
</programlisting>
<para>
Provides an interface to the <computeroutput>InitiateSystemShutdown()</computeroutput> API on Windows.
If the user has sufficient privileges, this function can be used to shut down the local machine or a
remote system. In general all users have sufficient privileges to shut down the local machine and only
Administrators have sufficient privileges to shut down remote machines.
</para>
<para>
The user of this function is <emphasis role="bold">strongly</emphasis> encouraged to read the Microsoft
documentation for <computeroutput>InitiateSystemShutdown()</computeroutput> to understand the finer
points to using this function. The documentation is freely available online. A Google search
using <emphasis role="italic">InitiateSystemShutdown MSDN</emphasis> will provide a link to the
documentation. In particular, this function can be used to force a shut down of a system while users
are logged on and applications have unsaved data.
</para>
<para>
If the <emphasis role="italic">timeout</emphasis> argument is not 0, a shut down dialog is displayed on
the machine being shut down, naming the user who initiated the shut down, a timer counting down the
seconds until the machine is shut down, and prompting the user to log off. This dialog can be moved but
it can not be closed and remains on top of all other windows on the system.
</para>
<para>
If any open application has unsaved data, the operating system gives the application a chance to prompt
the user to save and close the application. If the <emphasis role="italic">force</emphasis> argument is
false, the shut down will be delayed until the user responds, and ultimately the user could cancel the
shut down. If the <emphasis role="italic">force</emphasis> argument is true the system will force the
application closed whether the data gets saved or not. The application is still given a chance to
prompt the user to save the data, but the user only has a few seconds to respond before the system
forcibly closing the application.
</para>
<para>
The implications of the preceding two paragraphs are this, if the <emphasis
role="italic">timeout</emphasis> argument is 0 and the <emphasis role="italic">force</emphasis>
argument is true, the system immediately shuts down and any unsaved data is forever lost. This is why
the user of this function is encouraged to fully understand this function before using it.
</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis>computer</emphasis></term>
<listitem>
<para>
Indicates which system to shut down. If omitted or the empty string, the local machine is shut down.
Otherwise this should be the network name of the remote machine.
</para></listitem></varlistentry>
<varlistentry><term><emphasis>message</emphasis></term>
<listitem><para>
An additional message that is added to the shut down dialog. If omitted, no additional message is
added.
</para></listitem></varlistentry>
<varlistentry><term><emphasis>timeout</emphasis></term>
<listitem><para>
The time, in seconds, before the system is shut down. If this value is 0, the system is immediately
shut down and no shut down dialog is displayed. The shut down can not be aborted. If omitted the
default time out is 30 seconds.
</para></listitem></varlistentry>
<varlistentry><term><emphasis>force</emphasis></term>
<listitem>
<para>
If this argument is true, applications with unsaved data will be forced close by the system whether the
data is saved or not. If false, the shut down is delayed until applications with unsaved data responds.
If an application does not respond, the user will be prompted by the system to end the application. At
this point, if the user chooses not to forcibly end the application, the shut down will be aborted.
</para>
<para>
Please <emphasis role="bold">note</emphasis> some consequences of this argument as described by
Microsoft. If this argument is false, i.e. applications are not forced to close, and an application
with unsaved changes is running on the console session, the shutdown will remain in progress until the
user logged into the console session aborts the shutdown, saves changes, closes the application, or
forces the application to close. During this period, the shutdown <emphasis role="italic">may not
be</emphasis> aborted except by the console user, and another shutdown <emphasis role="italic">may not
be</emphasis> initiated. Using true for this argument prevents that situation. But, using true can also
result in unsaved data being lost.
</para></listitem></varlistentry>
<varlistentry><term><emphasis>reboot</emphasis></term>
<listitem><para>
If this argument is true, the system is rebooted after the shut down. If it is false, the system is
shut down. The default if omitted is false.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Returns:</emphasis></para>
<para>
Returns <computeroutput>0</computeroutput> for success or a Windows System Error code (<xref linkend="systemerrorcodes" />)
for failure. For instance a return of 1300 would indicate the user does not
have sufficient privileges to shut down the named system. Use SysGetErrorText() (<xref
linkend="utlSysgeterrortext" />) to get a generic text description for any Windows
System Error code. For example, the description for error code 1300 is <emphasis role="italic">Not all
privileges referenced are assigned to the caller.</emphasis>
</para>
</section>
<section id="utlSyssleep"><title>SysSleep</title>
<indexterm><primary>SysSleep</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysSleep</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysSleep(secs)----------------------------------------------><
]]>
</programlisting>
<para>Pauses a Rexx program for a specified time interval.</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">secs</emphasis></term>
<listitem><para>The number of seconds for which the program is to be paused.
You can specify up to seven decimal places in the number.
</para></listitem></varlistentry>
</variablelist>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysSleep</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysSleep</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysSleep</secondary></indexterm>
<example id="ex.syssleep">
<title>RexxUtil - SysSleep</title>
<programlisting>
Say "Now paused for 2 seconds ..."
Call SysSleep 2
Say "Now paused for 0.1234567 seconds ..."
Call SysSleep 0.1234567
Call SysSleep 0.12345678 -- Error 40: Incorrect call to routine
</programlisting>
</example>
</section>
<section id="utlSysstemcopy"><title>SysStemCopy</title>
<indexterm><primary>SysStemCopy</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysStemCopy</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysStemCopy--(--fromstem--,--tostem-------------------------->
>--+------------------------------------------------------------------+--)-><
+-,--+------+--+-------------------------------------------------+-+
+-from-+ +-,--+----+--+----------------------------------+-+
+-to-+ +-,--+-------+--+----------------+-+
+-count-+ +-,--"--+-I-+--"-+
+-O-+
]]>
</programlisting>
<para>Copies items from the source stem to the target stem. Items in the source
stem are copied starting at the
<emphasis role="italic">from</emphasis> index (default is 1) into the
target stem beginning at the <emphasis role="italic">to </emphasis>
index (default is 1). The number
of items to be copied to the target stem can be specified with the count.
The default is to copy all items in the source stem.</para>
<para>You can also specify that the items are to be inserted into the target
stem at the position and the existing items are shifted to the end.</para>
<para>This function operates only on stem arrays that specify the number of
items in stem.0 and all items must be numbered from 1 to n without omitting
an index.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">fromstem</emphasis></term>
<listitem><para>The name of the source stem.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">tostem</emphasis></term>
<listitem><para>The name of the target stem.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">from</emphasis></term>
<listitem><para>The first index in the source stem to be copied.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">to</emphasis></term>
<listitem><para>The position at which the items are to be inserted in the
target stem.</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">count</emphasis></term>
<listitem><para>The number of items to be copied or inserted.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">insert</emphasis></term>
<listitem><para>Either of the following values:
<variablelist>
<varlistentry><term>I</term>
<listitem><para>Insert items.
</para></listitem></varlistentry>
<varlistentry><term>O</term>
<listitem><para>Overwrite items.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The stem was copied successfully.
</para></listitem></varlistentry>
<varlistentry><term>-1</term>
<listitem><para>Copying the stem failed.
</para></listitem></varlistentry>
</variablelist>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysStemCopy</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysStemCopy</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysStemCopy</secondary></indexterm>
<example id="ex.sysstemcopy">
<title>RexxUtil - SysStemcopy</title>
<programlisting>
Source.0 = 3
Source.1 = "Hello"
Source.2 = "from"
Source.3 = "Rexx"
Call SysStemCopy "Source.", "Target."
Call SysStemCopy "Source.", "Target.", 1, 5, 2, "I"
</programlisting>
</example>
</section>
<section id="utlSysstemdelete"><title>SysStemDelete</title>
<indexterm><primary>SysStemDelete</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysStemDelete</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysStemDelete(stem,startitem-+--------------+-)-------------><
+-,--itemcount-+
]]>
</programlisting>
<para>Deletes the specified item at the index
<emphasis role="italic">startitem</emphasis> in the stem.
If more than one item is to be deleted the
<emphasis role="italic">itemcount</emphasis> must be specified.
After deleting the requested items the stem is compacted, which means that
items following the deleted items are moved to the vacant positions.</para>
<para>This function operates only on stem arrays that specify the number of
items in stem.0 and all items must be numbered from 1 to n without omitting
an index.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">stem</emphasis></term>
<listitem><para>The name of the stem from which the item is to be deleted.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">startitem</emphasis></term>
<listitem><para>The index of the item to be deleted.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">itemcount</emphasis></term>
<listitem><para>The number of items to be deleted if more than one.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>Deleting was successful.
</para></listitem></varlistentry>
<varlistentry><term>-1</term>
<listitem><para>Deleting failed.
</para></listitem></varlistentry>
</variablelist>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysStemDelete</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysStemDelete</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysStemDelete</secondary></indexterm>
<example id="ex.sysstemdelete">
<title>RexxUtil - SysStemdelete</title>
<programlisting>
Call SysStemDelete "MyStem.", 5
Call SysStemDelete "MyStem.", 5, 4
</programlisting>
</example>
</section>
<section id="utlSyssteminsert"><title>SysStemInsert</title>
<indexterm><primary>SysStemInsert</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysStemInsert</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysStemInsert(stem,position,value)--------------------------><
]]>
</programlisting>
<para>Inserts a new item at <emphasis role="italic">position</emphasis>
in the stem. All items in the stem
following this position are shifted down by one position.</para>
<para>This function operates only on stem arrays that specify the number of
items in stem.0 and all items must be numbered from 1 to n without omitting
an index.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">stem</emphasis></term>
<listitem><para>The name of the stem in which an item is to be inserted.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">position</emphasis></term>
<listitem><para>The index at which the new item is to be inserted.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">value</emphasis></term>
<listitem><para>The value of the new item.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>Inserting was successful.
</para></listitem></varlistentry>
<varlistentry><term>-1</term>
<listitem><para>Inserting failed.
</para></listitem></varlistentry>
</variablelist>
<example id="ex.syssteminsert">
<title>RexxUtil - SysSteminsert</title>
<programlisting>
Call SysStemInsert "MyStem.", 5, "New value for item 5"
</programlisting>
</example>
</section>
<section id="utlSysstemsort"><title>SysStemSort</title>
<indexterm><primary>SysStemSort</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysStemSort</secondary></indexterm>
<programlisting>
<![CDATA[
+-A-+ +-C-+ +-1-----+
>>-SysStemSort--(--stem--,--"--+-D-+--"--,--"--+-I-+--"--,--+-start-+-->
+-1--------+
>--,--end--,--+-firstcol-+--,--lastcol--)-----------------------------><
]]>
</programlisting>
<para>Sorts all or the specified items in the stem. The items can
be sorted in ascending or descending order and the case of the strings being
compared can be respected or ignored. Sorting can be further narrowed by
specifying the first and last item to be sorted or the columns used as sort
keys. Because the sort uses a quick-sort algorithm, the order of sorted items
according to the sort key is undetermined.</para>
<para>This function operates only on stems that specify the number
of items in stem.0 and all items must be numbered from 1 to n without omitting
an index. A value of 0 in stem.0 is also valid but no sort will be performed.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">stem</emphasis></term>
<listitem><para>The name of the stem to be sorted.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">order</emphasis></term>
<listitem><para>Either &quot;A&quot; for ascending or &quot;D&quot; for
descending. The default is &quot;A&quot;.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">type</emphasis></term>
<listitem><para>The type of comparison: either &quot;C&quot; for case or
&quot;I&quot; for ignore. The default is &quot;C&quot;.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">start</emphasis></term>
<listitem><para>The index at which the sort is to start. The default is 1.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">end</emphasis></term>
<listitem><para>The index at which the sort is to end. The default is the
last item.</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">firstcol</emphasis></term>
<listitem><para>The first column to be used as sort key. The default is 1.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">lastcol</emphasis></term>
<listitem><para>The last column to be used as sort key. The default is the
last column.</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The sort was successful.
</para></listitem></varlistentry>
<varlistentry><term>-1</term>
<listitem><para>The sort failed.
</para></listitem></varlistentry>
</variablelist>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysStemSort</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysStemSort</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysStemSort</secondary></indexterm>
<example id="ex.sysstemdort">
<title>RexxUtil - SysStemsort</title>
<programlisting>
/* sort all elements descending, use cols 5 to 10 as key */
Call SysStemSort "MyStem.", "D", , , ,5, 10
/* sort all elements ascending, ignore the case */
Call SysStemSort "MyStem.", "A", "I"
/* sort elements 10 to 20 ascending, use cols 1 to 10 as key */
Call SysStemSort "MyStem.", , ,10, 20, 1, 10
</programlisting>
</example>
</section>
<section id="utlSysswitchsession"><title>SysSwitchSession (Windows only)</title>
<indexterm><primary>SysSwitchSession</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysSwitchSession</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysSwitchSession(name)--------------------------------------><
]]>
</programlisting>
<para>
Brings the named window to the foreground. Modern versions of Windows do not always allow a window to
be brought to the foreground programmatically. Instead, the icon for the window on the task bar is set
to flashing.
</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">name</emphasis></term>
<listitem><para>
The name of the window you want to be the foreground window. The name of the window must exactly match
the title of the window, but is not case sensitive. The title of a window is the text displayed in its
title bar.
</para></listitem></varlistentry>
</variablelist>
<para>
O is returned on success and a Windows System Error code (<xref linkend="systemerrorcodes" />) on
failure.
</para>
</section>
<section id="utlSyssystemdirectory"><title>SysSystemDirectory (Windows only)</title>
<indexterm><primary>SysSystemDirectory</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysSystemDirectory</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysSystemDirectory()----------------------------------------><
]]>
</programlisting>
<para>Returns the Windows system directory.</para>
</section>
<section id="utlSystempfilename"><title>SysTempFileName</title>
<indexterm><primary>SysTempFileName</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysTempFileName</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysTempFileName(template-+---------+-)----------------------><
+-,filter-+
]]>
</programlisting>
<para>Returns a unique name for a file or directory that does not currently
exist. If an error occurs or SysTempFileName cannot create a unique name from
the template, it returns a null string (&quot;&quot;). SysTempFileName is useful
when a program requires a temporary file.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">template</emphasis></term>
<listitem><para>The location and base form of the temporary file or directory
name. The <emphasis role="italic">template</emphasis> is a valid file or
directory specification with up to five filter characters.
</para>
<para>
SysTempFileName generates the filter character replacements with a random number algorithm. If the
resulting file or directory already exists, SysTempFileName increments the replacement value until all
possibilities have been exhausted.
</para>
<para>
There are slight differences in how the template works on Windows and Unix/Linux.
</para>
<para>
On Windows: The file name part of the template can be any length. However, the template must contain at
least 1 filter character or the empty string is returned. The unique name is created solely by
substituting random numbers for the filter character(s). If there is a directory name part of the
template in addition to the file name part, and the directory name part contains a non-existent
directory, the function will succeed. However, the temporary file will not be writable unless the user
first creates the non-existent directory, or directories. When the function succeeds, the result is
always the same length as the template.
</para>
<para>
On Unix/Linux: Only the first five characters of the file name part of the template are used. Any
characters after the first five in the file name part are ignored. The unique name is generated by the
operating system adding a random string of characaters to the end of the template. The template does
not have to include any filter characters. If the template does include filter characters, then ooRexx
replaces those filter characters with random numbers. Because the operating system adds a random string
to the end of the template, the result will always be longer than the template. In general, if the
template does not contain a directory part, or if the directory part is not writable by the user, a
writable directory part is added by the operating system (most likely /tmp.) This last behavior may
vary depending on the exact version of the Unix/Linux operating system.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="italic">filter</emphasis></term>
<listitem><para>The filter character used in
<emphasis role="italic">template</emphasis>. SysTempFileName replaces
each filter character in <emphasis role="italic">template</emphasis>
with a numeric value. The resulting string represents a file or directory that
does not exist. The default filter character is ?.
</para></listitem></varlistentry>
</variablelist>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysTempFileName</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysTempFileName</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysTempFileName</secondary></indexterm>
<example id="ex.systempfilename">
<title>RexxUtil - SysTempfilename</title>
<programlisting>
/* Windows Code */
say SysTempFileName("C:\TEMP\MYEXEC.???")
say SysTempFileName("C:\TEMP\MYEXEC.tmp") -- produces the empty string.
say SysTempFileName("C:\TEMP\??MYEXEC.???")
say SysTempFileName("C:\MYEXEC@.@@@", "@")
/* Output */
C:\TEMP\MYEXEC.251
C:\TEMP\10MYEXEC.392
C:\MYEXEC6.019
/* Unix/Linux Code. mydir is an existing directory. */
say SysTempFileName("/mydir/MYEXEC.???") -- filter characters are ignored
say SysTempFileName("/mydir/MYEXEC.tmp") -- produces a unique name
say SysTempFileName("/mydir/??MYEXEC.???")
say SysTempFileName("/bogusdir/??MYEXEC.???")
say SysTempFileName("MYEXEC@.@@@", "@")
/* Output */
/mydir/MYEXEYqY2Hd
/mydir/MYEXET4dwdz
/mydir/77MYELnI0IU
/tmp/77MYEzjoweg
/tmp/MYEXEJNj3JB
</programlisting>
</example>
</section>
<section id="utlSystextscreenread"><title>SysTextScreenRead (Windows
only)</title>
<indexterm><primary>SysTextScreenRead</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysTextScreenRead</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysTextScreenRead(-row,column--+------+--)------------------><
+-,len-+
]]>
</programlisting>
<para>Reads characters from a specified screen location. These include any
carriage return and linefeed characters if the number of character reads spans
multiple lines.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">row</emphasis></term>
<listitem><para>The row from which to start reading.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">col</emphasis></term>
<listitem><para>The column from which to start reading.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">len</emphasis></term>
<listitem><para>The number of characters to read. The default is to read to the
end of the screen.
</para></listitem></varlistentry>
</variablelist>
<para>Note that, on error, a Windows System Error code (<xref linkend="systemerrorcodes" />)
is returned.</para>
<para>Limitations: This function reads in only screen characters
and does not consider the color attributes of each character read. When
restoring a character string to the screen with SAY or the CHAROUT built-in
function, the previous color settings are lost.</para>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysTextScreenRead</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysTextScreenRead</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysTextScreenRead</secondary></indexterm>
<example id="ex.systextscreenread">
<title>RexxUtil - SysTextscreenread</title>
<programlisting>
/* Reading the entire screen */
screen = SysTextScreenRead(0, 0)
/* Reading one line */
line = SysTextScreenRead(2, 0, 80)
</programlisting>
</example>
</section>
<section id="utlSystextscreensize"><title>SysTextScreenSize (Windows
only)</title>
<indexterm><primary>SysTextScreenSize</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysTextScreenSize</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysTextScreenSize()-----------------------------------------><
]]>
</programlisting>
<para>Returns the size of the screen in the format:
<computeroutput>row col</computeroutput>.</para>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysTextScreenSize</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysTextScreenSize</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysTextScreenSize</secondary></indexterm>
<example id="ex.systextscreensize">
<title>RexxUtil - SysTextscreensize</title>
<programlisting>
/* Code */
call RxFuncAdd "SysTextScreenSize", "RexxUtil", "SysTextScreenSize"
parse value SysTextScreenSize() with row col
say "Rows="row", Columns="col
</programlisting>
</example>
</section>
<section id="utlSystounicode"><title>SysToUnicode (Windows only)</title>
<indexterm><primary>SysToUnicode</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysToUnicode</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysToUnicode--(--string, codepage, translateflags, outstem--)-><
]]>
</programlisting>
<para>Maps a character string to a UNICODE string.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">string</emphasis></term>
<listitem><para>A string containing the UNICODE characters to be mapped.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">codepage</emphasis></term>
<listitem><para>Specifies the code page used to perform the conversion.
This parameter can be the value of any code page that is installed or available
in the system. The default is the current original equipment manufacturer
(OEM) code-page identifier for the system.</para>
<para>You can also
specify one of the following values:</para>
<variablelist>
<varlistentry><term>ACP</term>
<listitem><para>ANSI code page.
</para></listitem></varlistentry>
<varlistentry><term>OEMCP</term>
<listitem><para>OEM code page.
</para></listitem></varlistentry>
<varlistentry><term>SYMBOL</term>
<listitem><para>Windows 2000: symbol code page.
</para></listitem></varlistentry>
<varlistentry><term>THREAD_ACP
<indexterm><primary>thread</primary></indexterm>
</term>
<listitem><para>Windows 2000: current thread's ANSI code page.
</para></listitem></varlistentry>
<varlistentry><term>UTF7</term>
<listitem><para>Windows NT 4.0 and Windows 2000: translate using UTF-7.
</para></listitem></varlistentry>
<varlistentry><term>UTF8</term>
<listitem><para>Windows NT 4.0 and Windows 2000: translate using UTF-8. When
this is set, <computeroutput>translateflags</computeroutput> must be set.
</para></listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="italic">translateflags</emphasis></term>
<listitem><para>Indicates whether to translate to precomposed or composite-wide
characters (if a composite form exists), whether to use glyph characters in
place of control characters, and how to deal with invalid characters.</para>
<para>You can specify
a combination of the following flags:</para>
<variablelist>
<varlistentry><term>PRECOMPOSED</term>
<listitem><para>Always use precomposed characters, that is, characters in which
a base character and a nonspacing character have a single character value. This
is the default translation option. Cannot be used with COMPOSITE.
</para></listitem></varlistentry>
<varlistentry><term>COMPOSITE</term>
<listitem><para>Always use composite characters, that is, characters in which a
base character and a nonspacing character have different character values.
Cannot be used with PRECOMPOSED.
</para></listitem></varlistentry>
<varlistentry><term>ERR_INVALID_CHARS</term>
<listitem><para>If the function encounters an invalid input character, it fails
and returns &quot;1113&quot;.
</para></listitem></varlistentry>
<varlistentry><term>USEGLYPHCHARS</term>
<listitem><para>Use glyph characters instead of control characters.
</para></listitem></varlistentry>
</variablelist>
<para>A composite character consists of a base character and a nonspacing
character, each having different character values. A precomposed character
has a single character value for a base-nonspacing character combination.
In the character &egrave;, the "e" is the base character and the "grave" accent
mark is the nonspacing character. The function's default behavior is to
translate to the precomposed form. If a precomposed form does not exist, the
function attempts to translate to a composite form.</para>
<para>The flags PRECOMPOSED and
COMPOSITE are mutually exclusive. The USEGLYPHCHARS flag and the
ERR_INVALID_CHARS can be set regardless of the state of the other flags.</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="italic">outstem</emphasis></term>
<listitem><para>The name of the stem variable that will contain the converted
result. If the conversion was successful the stem will be composed of
the following value(s):
</para>
<variablelist>
<varlistentry><term>outstem.!TEXT</term>
<listitem><para>This variable will contain the converted string.
</para></listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>No errors.
</para></listitem></varlistentry>
<varlistentry><term>Other</term>
<listitem><para>An error occurred. A Windows System Error code (<xref linkend="systemerrorcodes" />)
is returned. This may be one of the following, but
could be others.
</para></listitem></varlistentry>
<varlistentry><term>87</term>
<listitem><para>Incorrect code page or
<computeroutput>codepage</computeroutput> value.
</para></listitem></varlistentry>
<varlistentry><term>1004</term>
<listitem><para>Invalid translate flags.
</para></listitem></varlistentry>
<varlistentry><term>1113</term>
<listitem><para>No mapping for the Unicode character exists in the target code
page.</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSysutilversion"><title>SysUtilVersion</title>
<indexterm><primary>SysUtilVersion</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysUtilVersion</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysUtilVersion()--------------------------------------------><
]]>
</programlisting>
<para>Returns a version number that identifies the current level of the Rexx
Utilities package. It can be used to verify the availability of certain
functions.</para>
<para>Return code: The REXXUTIL version number in the format
<computeroutput>n.mm</computeroutput>.</para>
<para><emphasis role="bold">Examples:</emphasis></para>
<para>Because this function was not part of the original packaging, a sample
logic to check for a certain level of RexxUTIL can look as follows:</para>
<example id="ex.sysutilversion">
<title>RexxUtil - SysUtilVersion</title>
<programlisting>
If RxFuncQuery("SysUtilVersion") = 1 |,
SysUtilVersion() &lt; "2.00" Then
Say "Your RexxUTIL.DLL is not at the current level"
</programlisting>
</example>
<para>If a specific function should be used that was added at a later REXXUTIL
level a similar check can be performed by querying this function as follows:
</para>
<example id="ex.rxfuncquery-1">
<title>RexxUtil - RxFuncquery</title>
<programlisting>
If RxFuncQuery("SysSetFileDateTime") = 1 Then
Say "Your REXXUTIL.DLL is not at the current level"
</programlisting>
</example>
</section>
<section id="utlSysversion"><title>SysVersion</title>
<indexterm><primary>SysVersion</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysVersion</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysVersion()------------------------------------------------><
]]>
</programlisting>
<para>
Returns a string to identify the operating system and version. The first word of the returned string
contains the identifier for the operating system and the rest of the string contains a operating
specific version string. Something like: <computeroutput>WindowsNT x</computeroutput> or
<computeroutput>Linux x</computeroutput>.
</para>
<para>
Some possible output for operating systems supported by ooRexx might be:
</para>
<example id="ex.sysversion">
<title>RexxUtil - SysVersion</title>
<programlisting>
Say SysVersion() -> "Linux #1 SMP Mon Oct 16 14:54:20 EDT 2006.2.6.18-1.2798.fc6"
Say SysVersion() -> "WindowsNT 5.00"
</programlisting>
</example>
<note><title>Note</title><para>
This function can be used to replace the operating-system-specific functions SysWinVer(), and
SysLinVer().
</para></note>
</section>
<section id="utlSysvolumelabel"><title>SysVolumeLabel (Windows only)</title>
<indexterm><primary>SysVolumeLabel</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysVolumeLabel</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysVolumeLabel(--+-------------+--)------------------------------><
+-driveLetter-+
]]>
</programlisting>
<para>Returns the volume label for the specified drive.</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">driveLetter</emphasis></term>
<listitem><para>A drive letter in the form &apos;X:&apos;. If the drive letter
is omitted than the current drive is used.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>Encryption was successful.
</para></listitem></varlistentry>
<varlistentry><term>2</term>
<listitem><para>File not found.
</para></listitem></varlistentry>
<varlistentry><term>4</term>
<listitem><para>Cannot open file.
</para></listitem></varlistentry>
<varlistentry><term>5</term>
<listitem><para>Access denied.
</para></listitem></varlistentry>
<varlistentry><term>82</term>
<listitem><para>Cannot encrypt.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSyswait"><title>SysWait (Unix only)</title>
<indexterm><primary>SysWait</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysWait</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysWait()---------------------------------------------------><
]]>
</programlisting>
<para>Waits for all child processes to end.</para>
<para><emphasis role="bold">Returns:</emphasis></para>
<para>The exit code from the child process.</para>
<para><emphasis role="bold">Example:</emphasis></para>
<para>
SysFork() (<xref linkend="utlSysfork" />) has an example that uses
<computeroutput>wait()</computeroutput>.</para>
</section>
<section id="utlSyswaiteventsem"><title>SysWaitEventSem</title>
<indexterm><primary>SysWaitEventSem</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysWaitEventSem</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysWaitEventSem(handle-+----------+-)-----------------------><
+-,timeout-+
]]>
</programlisting>
<para>Waits on an event semaphore. SysWaitEventSem
returns the WaitForSingleObject return code.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">handle</emphasis></term>
<listitem><para>A handle returned from a previous SysCreateEventSem call.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">timeout</emphasis></term>
<listitem><para>The time, in milliseconds, to wait on the semaphore. The
default <emphasis role="italic">timeout</emphasis> is an infinite wait.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>No errors.
</para></listitem></varlistentry>
<varlistentry><term>Other</term>
<listitem><para>An error occurred. On Windows, a Windows System Error code (<xref linkend="systemerrorcodes" />)
is returned. This may be one of the following, but could be others.
</para></listitem></varlistentry>
<varlistentry><term>6</term>
<listitem><para>Invalid handle.
</para></listitem></varlistentry>
<varlistentry><term>258</term>
<listitem><para>Timeout.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSyswaitnamedpipe"><title>SysWaitNamedPipe (Windows only)</title>
<indexterm><primary>SysWaitNamedPipe</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysWaitNamedPipe</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysWaitNamedPipe(name-+----------+-)------------------------><
+-,timeout-+
]]>
</programlisting>
<para>Performs a timed wait on a named pipe and returns the WaitNamedPipe
return code.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">name</emphasis></term>
<listitem><para>The name of the pipe in the form
&quot;\\servername\pipe\pipename.&quot;
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">timeout</emphasis></term>
<listitem><para>The number of microseconds to be waited. If you omit
<emphasis role="italic">timeout</emphasis> or
specify 0, SysWaitNamedPipe uses the default timeout value. To wait until
the pipe is no longer busy, you can use a value of -1.
</para></listitem></varlistentry>
</variablelist>
<para>Returns 0 on success. A Windows System Error code (<xref linkend="systemerrorcodes" />)
is returned on error.
</para>
</section>
<section id="utlSyswindecryptfile"><title>SysWinDecryptFile (Windows
only)</title>
<indexterm><primary>SysWinDecryptFile</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysWinDecryptFile</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysWinDecryptFile(filename)---------------------------------><
]]>
</programlisting>
<para>Decrypts a given file (Windows 2000 only).</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">filename</emphasis></term>
<listitem><para>The file to be decrypted.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>Decryption was successful.
</para></listitem></varlistentry>
<varlistentry><term>Other</term>
<listitem><para>A Windows System Error code (<xref linkend="systemerrorcodes" />).
This may be one of the following, but could be others.
</para></listitem></varlistentry>
<varlistentry><term>2</term>
<listitem><para>File not found.
</para></listitem></varlistentry>
<varlistentry><term>4</term>
<listitem><para>Cannot open file.
</para></listitem></varlistentry>
<varlistentry><term>5</term>
<listitem><para>Access denied.
</para></listitem></varlistentry>
<varlistentry><term>82</term>
<listitem><para>Cannot decrypt.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSyswinencryptfile"><title>SysWinEncryptFile (Windows
only)</title>
<indexterm><primary>SysWinEncryptFile</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysWinEncryptFile</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysWinEncryptFile(filename)---------------------------------><
]]>
</programlisting>
<para>Encrypts a given file (Windows 2000 only).</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">filename</emphasis></term>
<listitem><para>The file to be encrypted.
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>Encryption was successful.
</para></listitem></varlistentry>
<varlistentry><term>Other</term>
<listitem><para>A Windows System Error code (<xref linkend="systemerrorcodes" />).
This may be one of the following, but could be others.
</para></listitem></varlistentry>
<varlistentry><term>2</term>
<listitem><para>File not found.
</para></listitem></varlistentry>
<varlistentry><term>4</term>
<listitem><para>Cannot open file.
</para></listitem></varlistentry>
<varlistentry><term>5</term>
<listitem><para>Access denied.
</para></listitem></varlistentry>
<varlistentry><term>82</term>
<listitem><para>Cannot encrypt.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSyswingetdefaultprinter"><title>SysWinGetDefaultPrinter (Windows
only)</title>
<indexterm><primary>SysWinGetDefaultPrinter</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysWinGetDefaultPrinter</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysWinGetDefaultPrinter-------------------------------------><
]]>
</programlisting>
<para>Returns the current default printer in the form
"Printername,Drivername,Portname".</para>
</section>
<section id="utlSyswingetprinters"><title>SysWinGetPrinters (Windows
only)</title>
<indexterm><primary>SysWinGetPrinters</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysWinGetPrinters</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysWinGetPrinters(stem.)------------------------------------><
]]>
</programlisting>
<para>Fills a stem with the available printer descriptions.</para>
<para><emphasis role="bold">Parameters:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">stem.0</emphasis></term>
<listitem><para>The number of entries
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="italic">stem.i</emphasis></term>
<listitem><para>Entry
</para></listitem></varlistentry>
</variablelist>
<para>Each entry is of the form "Printername,Drivername,Portname".</para>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>Success
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>Failure
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="utlSyswinsetdefaultprinter"><title>SysWinSetDefaultPrinter (Windows
only)</title>
<indexterm><primary>SysWinSetDefaultPrinter</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysWinSetDefaultPrinter</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysWinSetDefaultPrinter(description)------------------------><
]]>
</programlisting>
<para>Sets the default printer.</para>
<para><emphasis role="bold">Parameter:</emphasis></para>
<variablelist>
<varlistentry><term><emphasis role="italic">description</emphasis></term>
<listitem><para>A string identifying the printer. On Windows 2000 or later this
string can be just the printer name. For earlier versions of Windows, the
string must have the form "Printername,Drivername,Portname".
<note><title>Note</title><para>
For Windows 2000 or later either form of the description string is accepted.
However, using just the printer name is the preferred method. Using the
"Printername,Drivername,Portname" form will invoke an outdated Windows API
that Microsoft has deprecated.
</para></note>
</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="bold">Return codes:</emphasis></para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>Success
</para></listitem></varlistentry>
<varlistentry><term>non-zero</term>
<listitem><para>A Windows System Error code (<xref linkend="systemerrorcodes" />).
You can use SysGetErrortext() to get a description of the error.
</para></listitem></varlistentry>
</variablelist>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysWinSetDefaultPrinter</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysWinSetDefaultPrinter</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysSetDefaultPrinter</secondary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysWinGetDefaultPrinter</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysWinGetDefaultPrinter</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysGetDefaultPrinter</secondary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysWinGetPrinters</secondary>
<tertiary>example</tertiary></indexterm>
<indexterm><primary>SysWinGetPrinters</primary>
<secondary>example</secondary></indexterm>
<indexterm><primary>examples</primary>
<secondary>SysGetPrinters</secondary></indexterm>
<example id="ex.sysgetprinters">
<title>RexxUtil - SysGetprinters and SysGetdefaultprinters</title>
<programlisting>
<![CDATA[
/* set default printer */
default = SysWinGetDefaultPrinter()
parse var default default",".
say 'The Default printer is:' default
say
if SysWinGetPrinters(list.) == 0 then do
say "List of available printers (* = default):"
do i=1 to list.0
parse var list.i pname",".
if pname == default then
say i list.i "*"
else
say i list.i
end
say
say "Please enter number of new default printer (0 = keep default)"
pull i
numberOk = .false
if i~datatype('W') then do
if 0 <= i & i <= list.0 then do
numberOK = .true
if i > 0 then do
/* Assumes we are on Windows 2000 or later. */
parse var list.i pname",".
ret = SysWinSetDefaultPrinter(pname)
if ret <> 0 then do
say "Error setting default printer ("ret"):" SysGetErrorText(ret)
end
else do
say "The new default printer is:" pname
end
end
end
end
if \ numberOk then do
say "You did not enter a valid printer number."
end
end
else do
say "Failed to get a list of the available printers."
end
]]>
</programlisting>
</example>
</section>
<section id="utlSyswinver"><title>SysWinVer (Windows only)</title>
<indexterm><primary>SysWinVer</primary></indexterm>
<indexterm><primary>rexxutil functions</primary>
<secondary>SysWinVer</secondary></indexterm>
<programlisting>
<![CDATA[
>>-SysWinVer()-------------------------------------------------><
]]>
</programlisting>
<para>Returns a string specifying the Windows operating system version
information in the form <computeroutput>x.xx</computeroutput>.</para>
</section>
</chapter>