Knowledge

Control Language

Source 📝

1574: 1222: 25: 1546: 1242: 1232: 507:
Prompting is further enhanced to allow the programmer to find what values are valid for each parameter. To do this during prompting the user would move the cursor to the parameter field in question and press F4 again. The system would then display a screen describing the type of input required and an
676:
If one only knows part of a command or if third party software is being used where the commands don't conform to the AS/400 abbreviation standard then you would enter that part of the command that is known, attach an asterisk (to make it generic), and press enter. The system will then display a list
519:
Cursor sensitive help can also be provided on commands but it's not required. If help has been provided one can view help for a parameter by moving the cursor to the desired parameter field and pressing F1 (help). To get help for the entire command itself (and all of its parameters) the user would
428:
CL-name | qualified-CL-name | "*"special-value | generic-CL-name"*" | "'"alphanumeric-value"'" | numeric-value |
321:
At its most basic a command names a single program to call when the user types or prompts the command and presses the Enter key. The command takes all of the parameters typed by the user, and those not typed by the user, and builds a parameter list that it passes to the program when it's called.
713:
PGM (&IN &TYP) DCL &IN *CHAR 6 DCL &OUT *CHAR 8 DCL &TYP *CHAR 1 IF (&TYP = J) + DO CVTDAT DATE(&IN) TOVAR(&OUT) FROMFMT(*MDY) + TOFMT(*JUL) TOSEP(*NONE) ENDDO ELSE IF (&TYP = M) + DO CVTDAT
282:
While thousands of commands were written by IBM developers to perform system level tasks like compiling programs, backing up data, changing system configurations, displaying system object details, or deleting them, commands are not limited to systems level concerns and can be drafted for user
313:
The developer's solution to this problem was the command object (*CMD). While the parameters on the command can be specified in any order, each parameter is defined to be passed in a specific order to the program. The programmer can also define, among other things, the parameter's
476:
In reality the system will pass many more parameters than the four specified above. This is because the rest of the CHGPGM command's parameters were not specified, so default values will be passed instead. For every parameter on this, aside from the PGM parameter, that default is
318:, unique parameter name, descriptive text (for prompting), default value (used only if the parameter isn't specified during execution), if the values are restricted to a certain set or range, if the data entered should be changed to another value before calling the program, etc. 298:) defined in the main procedures of all traditional System/38 and AS/400 programs are hard coded lists that are made up of parameters that can be numeric, alphanumeric, boolean, etc. and the order in which parameters are passed is important. This is a stark difference from the 503:
Required parameters are listed first, and parameters with system-supplied default values are listed last of all. To see all parameters, press F10. If any one choice requires further selections, those are cued as you select that value for that parameter, by appearing onscreen.
557:
There are 2,262 built-in IBM commands contained in V7R3, but finding them isn't all that hard because of several designs of the system that make life easier. These labor saving designs are: Standardized Abbreviations, Command Grouping Menus, and Command Selection.
548:
A skeleton UIM panel group will be automatically generated including all parameters described by the command. The result file can be edited (seu, wdsc, rdi), then compiled with the CRTPNLGRP command, and finally associated with the command via CHGCMD HLPPNLGRP().
701:
parameter which is the date string to be converted. If a Julian string it should be in the format YYNNN where YY is the year number and NNN is the day number of the year. If a MDY string it must be in the format MMDDYY. The second parameter is
462:
MYPGM: A positional parameter (PGM), and the only required parameter. In this case it's the name of the program being changed. Positional parameters are always first. Once a named parameter appears all parameters that follow must be named
696:
The following is a sample of CL programming. The program interactively converts dates from Julian to MDY and vice versa. Results are displayed on line 24 of the terminal. It accepts two parameters. The
278:
Although CL is a scripting language for system administration, it is used mainly to create compiled programs. The use of interpreted CL scripts through the SBMDBJOB command is in fact extremely limited.
714:
DATE(&IN) TOVAR(&OUT) FROMFMT(*JUL) + TOFMT(*MDY) TOSEP(*NONE) ENDDO SNDPGMMSG MSG('IN=' || &IN || ' OUT=' || &OUT) + MSGTYPE(*COMP) ENDPGM
641:
Likewise, "Control Language Programming" was abbreviated CLP, and the source type was accordingly CLP. With the introduction of the ILE programming model, the source type was changed to "CLLE".
535:
It's a good idea to create help screens for new commands and their parameters. All help screens use panel group objects (*PNLGRP) and these can be created using the UIM language described in the
497:. An OS/400 command can also be prompted by typing a ? before the command. (This is useful in an interactive program which cues a command string, having already filled in some values.) 649:
The VERB and SUBJECT menus are part of what are called the Command Grouping Menus. For every Three (or four) Letter abbreviation there is a menu devoted to it that starts with the letters
469:
RMVOBS(*BLKORD *PRCORD): A named parameter (Remove Observability) specifying multiple special values. In this case telling it to remove two kinds of profiling data from the program.
267:
and consists of a set of command objects (*CMD) used to invoke traditional programs or get help on what those programs do. CL can also be used to create CL programs (congruent to
511:
To enter a longer name, or extend the list to allow you to enter extra values, type a plus sign instead of a value. (As when listing names of objects to be saved or restored.)
441:
naming conventions which, generally speaking, means the name starts with a letter and can be up to ten characters in length. (CL commands are also case-insensitive.)
528:
New commands can be created to call non-system programs and they will work exactly like the inbuilt variety. The Command Definition Language is described in the
665: 748: 466:
OPTIMIZE(*FULL): A named parameter specifying a single element which is a special value. In this case it will change the program to be fully optimized.
472:
TEXT('My program.'): Another named parameter specifying a single alphanumeric value. In this case it's changing the descriptive text of the program.
837: 500:
The system will then present a screen with the set of parameters that the program accepts/requires (required parameters are usually highlighted).
1278: 664:
There are other menus besides the Command Grouping Menus. The starting point for the menuing system can be accessed by pressing F4 on an empty
681:
that match the generic names just typed. One can then page through the list looking for the command needed and then select it using option 1.
886: 1562: 1567: 89: 1557: 61: 684:
In the background the system is using the SLTCMD command to perform this function. If one wants to select all commands in a
830: 1298: 1271: 68: 1235: 1303: 803: 108: 42: 1308: 75: 1122: 823: 542:
Beginning in V5R3 of the operating system a new, much simpler method of creating help was added: run the command
782: 1577: 1509: 1382: 1264: 706:
which is the type of date to be converted to. It must be 'J' (Julian) or 'M' (MDY). For example: the command
310:
is a set or array of character pointers and more often than not the parameters are not positionally dependent.
272: 46: 1552: 1530: 1484: 1457: 1432: 1392: 57: 529: 1598: 1524: 1427: 1397: 1245: 1105: 291: 1499: 1494: 1437: 1417: 815: 1442: 1338: 1321: 1225: 536: 1452: 1407: 1154: 1489: 1372: 307: 256: 186: 1608: 1033: 35: 1358: 1100: 1043: 1038: 1027: 132: 82: 1127: 295: 678: 1287: 566:
The IBM developers standardized the abbreviations used to create command names. Verbs like
264: 212: 127: 8: 1363: 1165: 271:) where there are additional commands that provide program-like functionality (IF/ELSE, 1201: 1132: 245: 228: 151: 1343: 1055: 849: 799: 771: 489:
All CL commands can be prompted directly from the command line or within CL program
331: 197: 181: 1603: 1196: 1073: 1022: 1012: 906: 545:
GENCMDDOC CMD(MYLIB/MYCMD) TODIR('/QSYS.LIB/MYLIB.LIB/QPNLSRC.FILE) GENOPT(*UIM)
139: 1115: 685: 438: 1592: 1462: 1000: 995: 990: 985: 977: 630:, etc. You can see every possible verb and subject used on the system in the 1514: 1353: 1206: 1017: 1007: 972: 520:
press F1 anywhere on the prompt display and then press F2 (extended help).
494: 268: 845: 1146: 1048: 490: 451:
CHGPGM MYPGM OPTIMIZE(*FULL) RMVOBS(*BLKORD *PRCORD) TEXT('My program.')
1256: 1422: 1065: 964: 454:
The above command is passing four parameters to the program that does
1519: 1160: 334:
for a much simplified CL command syntax would be defined as follows:
315: 253: 24: 1191: 1186: 1088: 1079: 952: 947: 942: 937: 929: 924: 919: 914: 891: 881: 876: 871: 866: 858: 1412: 1402: 1181: 895: 1479: 1447: 1331: 723: 260: 710:
will convert the Julian date 04180 to 062804 (June 28, 2004).
1387: 1377: 1348: 1326: 1110: 190: 1469: 728: 688:
then prompt this command and enter the special value *ALL.
657:
commands the user would execute the command GO CMDCHG. For
299: 216: 306:
worlds where the parameter list in Unix shell scripts and
1504: 1474: 846: 303: 249: 156: 144: 263:(now known as IBM i). It bears a resemblance to the IBM 638:
menus, just enter the commands GO VERB or GO SUBJECT.
429:"X'"hexadecimal-value"'" 49:. Unsourced material may be challenged and removed. 749:"IBM System/38 Control Language Reference Manual" 537:IBM AS/400 Application Display Programming manual 1590: 444:A good example of a typical CL command is the 1272: 831: 561: 552: 796:Control Language Programming for the AS/400 1545: 1279: 1265: 838: 824: 493:by typing the command and pressing the F4 1286: 644: 109:Learn how and when to remove this message 887:1800 Data Acquisition and Control System 523: 286: 16:IBM operating system scripting language 1591: 793: 1260: 819: 1241: 1231: 1089:Applications, software, and concepts 708:CALL PGM(ICVTDATC) PARM('04180' 'M') 671: 508:available list of allowable values. 47:adding citations to reliable sources 18: 798:(2nd ed.). 29th Street Press. 661:commands the menu would be CMDPGM. 13: 14: 1620: 1573: 1572: 1544: 1240: 1230: 1221: 1220: 23: 1123:Programming Development Manager 514: 34:needs additional citations for 1217:* Also based on the System/36 787: 776: 765: 741: 691: 1: 734: 384:parameter-name "(" 1106:Dynamic Logical Partitioning 484: 433:The items above that end in 7: 852:, workstations, and servers 717: 481:, meaning don't change it. 168:; 46 years ago 10: 1625: 1187:3790 Communications System 562:Standardized abbreviations 1540: 1317: 1294: 1215: 1174: 1145: 1064: 963: 905: 877:1500 instructional system 857: 677:of commands in the job's 553:Finding the right command 458:processing and they are: 355:positional-parameter-list 325: 227: 222: 211: 206: 196: 180: 162: 150: 138: 126: 1236:Minicomputers on Commons 448:(CHGPGM) command below: 336: 257:Control Program Facility 187:Control Program Facility 1192:8100 Information System 953:7330 Magnetic Tape Unit 850:mini/midrange computers 570:are always rendered as 1101:Dealer Business System 948:1442 card reader/punch 938:1402 card reader/punch 872:1442 card reader/punch 794:Meyers, Bryan (1997). 645:Command grouping menus 399:parameter-element-list 389:parameter-element-list 296:command-line arguments 283:applications as well. 248:originally created by 1288:Programming languages 1155:ThinkPad Power Series 1128:Quick Response Engine 598:, etc. Subjects like 530:CL Programmer's Guide 524:Creating new commands 287:Commands and programs 376:named-parameter-list 275:, file input, etc.) 273:variable declaration 265:Job Control Language 213:Job Control Language 43:improve this article 1599:Scripting languages 1080:RS64 microprocessor 163:First appeared 123: 1246:Servers on Commons 1133:Single-level store 259:and later used in 246:scripting language 229:Windows PowerShell 121: 58:"Control Language" 1586: 1585: 1568:Non-English-based 1254: 1253: 1141: 1140: 943:1403 line printer 882:1627 drum plotter 867:1132 line printer 754:. IBM. 1982-09-10 672:Command selection 234: 233: 119: 118: 111: 93: 1616: 1576: 1575: 1548: 1547: 1281: 1274: 1267: 1258: 1257: 1244: 1243: 1234: 1233: 1224: 1223: 1096:Control Language 1086: 1085: 840: 833: 826: 817: 816: 810: 809: 791: 785: 780: 774: 769: 763: 762: 760: 759: 753: 745: 709: 705: 700: 653:. So to see all 427: 424: 421: 418: 415: 412: 409: 406: 403: 400: 397: 394:")" 393: 390: 387: 383: 380: 377: 374: 371: 368: 365: 362: 359: 356: 353: 350:command-name 349: 346: 343: 340: 238:Control Language 176: 174: 169: 140:Designed by 124: 122:Control Language 120: 114: 107: 103: 100: 94: 92: 51: 27: 19: 1624: 1623: 1619: 1618: 1617: 1615: 1614: 1613: 1589: 1588: 1587: 1582: 1536: 1313: 1290: 1285: 1255: 1250: 1211: 1170: 1166:Academic System 1137: 1084: 1060: 959: 901: 853: 844: 814: 813: 806: 792: 788: 781: 777: 770: 766: 757: 755: 751: 747: 746: 742: 737: 720: 715: 707: 703: 698: 694: 674: 647: 564: 555: 546: 526: 517: 487: 452: 431: 430: 425: 422: 420:parameter-value 419: 416: 413: 411:parameter-value 410: 407: 404: 401: 398: 395: 391: 388: 385: 381: 378: 375: 372: 369: 367:parameter-value 366: 363: 360: 357: 354: 351: 347: 344: 341: 338: 328: 289: 172: 170: 167: 115: 104: 98: 95: 52: 50: 40: 28: 17: 12: 11: 5: 1622: 1612: 1611: 1609:Command shells 1606: 1601: 1584: 1583: 1581: 1580: 1570: 1565: 1560: 1555: 1541: 1538: 1537: 1535: 1534: 1527: 1522: 1517: 1512: 1507: 1502: 1497: 1492: 1487: 1482: 1477: 1472: 1467: 1466: 1465: 1455: 1450: 1445: 1440: 1435: 1430: 1425: 1420: 1415: 1410: 1405: 1400: 1395: 1390: 1385: 1380: 1375: 1370: 1369: 1368: 1367: 1366: 1361: 1346: 1341: 1336: 1335: 1334: 1324: 1318: 1315: 1314: 1312: 1311: 1306: 1301: 1295: 1292: 1291: 1284: 1283: 1276: 1269: 1261: 1252: 1251: 1249: 1248: 1238: 1228: 1216: 1213: 1212: 1210: 1209: 1204: 1202:IntelliStation 1199: 1194: 1189: 1184: 1178: 1176: 1172: 1171: 1169: 1168: 1163: 1159:Predecessors: 1157: 1151: 1149: 1143: 1142: 1139: 1138: 1136: 1135: 1130: 1125: 1120: 1119: 1118: 1108: 1103: 1098: 1092: 1090: 1083: 1082: 1077: 1070: 1068: 1062: 1061: 1059: 1058: 1053: 1052: 1051: 1046: 1041: 1036: 1032:Predecessors: 1030: 1020: 1015: 1010: 1005: 1004: 1003: 998: 993: 988: 975: 969: 967: 961: 960: 958: 957: 956: 955: 950: 945: 940: 932: 927: 922: 917: 911: 909: 903: 902: 900: 899: 889: 884: 879: 874: 869: 863: 861: 855: 854: 843: 842: 835: 828: 820: 812: 811: 804: 786: 775: 764: 739: 738: 736: 733: 732: 731: 726: 719: 716: 712: 693: 690: 673: 670: 646: 643: 563: 560: 554: 551: 544: 525: 522: 516: 513: 486: 483: 474: 473: 470: 467: 464: 456:Change Program 450: 446:Change Program 337: 327: 324: 288: 285: 232: 231: 225: 224: 220: 219: 209: 208: 204: 203: 200: 194: 193: 184: 178: 177: 164: 160: 159: 154: 148: 147: 142: 136: 135: 130: 117: 116: 31: 29: 22: 15: 9: 6: 4: 3: 2: 1621: 1610: 1607: 1605: 1602: 1600: 1597: 1596: 1594: 1579: 1571: 1569: 1566: 1564: 1561: 1559: 1556: 1554: 1551: 1543: 1542: 1539: 1533: 1532: 1528: 1526: 1523: 1521: 1518: 1516: 1513: 1511: 1508: 1506: 1503: 1501: 1498: 1496: 1493: 1491: 1488: 1486: 1483: 1481: 1478: 1476: 1473: 1471: 1468: 1464: 1463:Object Pascal 1461: 1460: 1459: 1456: 1454: 1451: 1449: 1446: 1444: 1441: 1439: 1436: 1434: 1431: 1429: 1426: 1424: 1421: 1419: 1416: 1414: 1411: 1409: 1406: 1404: 1401: 1399: 1396: 1394: 1391: 1389: 1386: 1384: 1381: 1379: 1376: 1374: 1371: 1365: 1362: 1360: 1357: 1356: 1355: 1352: 1351: 1350: 1347: 1345: 1342: 1340: 1337: 1333: 1330: 1329: 1328: 1325: 1323: 1320: 1319: 1316: 1310: 1307: 1305: 1302: 1300: 1297: 1296: 1293: 1289: 1282: 1277: 1275: 1270: 1268: 1263: 1262: 1259: 1247: 1239: 1237: 1229: 1227: 1219: 1218: 1214: 1208: 1205: 1203: 1200: 1198: 1195: 1193: 1190: 1188: 1185: 1183: 1180: 1179: 1177: 1173: 1167: 1164: 1162: 1158: 1156: 1153: 1152: 1150: 1148: 1144: 1134: 1131: 1129: 1126: 1124: 1121: 1117: 1114: 1113: 1112: 1109: 1107: 1104: 1102: 1099: 1097: 1094: 1093: 1091: 1087: 1081: 1078: 1075: 1072: 1071: 1069: 1067: 1063: 1057: 1056:Power Systems 1054: 1050: 1047: 1045: 1042: 1040: 1037: 1035: 1031: 1029: 1026: 1025: 1024: 1021: 1019: 1016: 1014: 1011: 1009: 1006: 1002: 999: 997: 994: 992: 989: 987: 984: 983: 982: 981: 976: 974: 971: 970: 968: 966: 962: 954: 951: 949: 946: 944: 941: 939: 936: 935: 933: 931: 928: 926: 923: 921: 918: 916: 913: 912: 910: 908: 904: 897: 893: 890: 888: 885: 883: 880: 878: 875: 873: 870: 868: 865: 864: 862: 860: 856: 851: 848: 841: 836: 834: 829: 827: 822: 821: 818: 807: 805:9781882419760 801: 797: 790: 784: 779: 773: 768: 750: 744: 740: 730: 727: 725: 722: 721: 711: 689: 687: 682: 680: 669: 667: 662: 660: 656: 652: 642: 639: 637: 633: 629: 625: 621: 617: 613: 609: 605: 601: 597: 593: 589: 585: 581: 577: 573: 569: 559: 550: 543: 540: 538: 533: 531: 521: 512: 509: 505: 501: 498: 496: 492: 482: 480: 471: 468: 465: 461: 460: 459: 457: 449: 447: 442: 440: 436: 335: 333: 323: 319: 317: 311: 309: 305: 301: 297: 293: 284: 280: 276: 274: 270: 269:shell scripts 266: 262: 258: 255: 251: 247: 243: 239: 230: 226: 221: 218: 214: 210: 207:Influenced by 205: 201: 199: 195: 192: 188: 185: 183: 179: 165: 161: 158: 155: 153: 149: 146: 143: 141: 137: 134: 131: 129: 125: 113: 110: 102: 91: 88: 84: 81: 77: 74: 70: 67: 63: 60: –  59: 55: 54:Find sources: 48: 44: 38: 37: 32:This article 30: 26: 21: 20: 1563:Generational 1553:Alphabetical 1549: 1529: 1354:Visual Basic 1095: 979: 934:peripherals 892:1627 plotter 795: 789: 778: 772:itjungle.com 767: 756:. Retrieved 743: 695: 683: 679:library list 675: 666:command line 663: 658: 654: 650: 648: 640: 635: 631: 627: 623: 619: 615: 611: 607: 603: 599: 595: 591: 587: 583: 579: 575: 571: 567: 565: 556: 547: 541: 534: 527: 518: 515:Command help 510: 506: 502: 499: 495:function key 488: 478: 475: 455: 453: 445: 443: 434: 432: 329: 320: 312: 290: 281: 277: 241: 237: 235: 105: 99:October 2017 96: 86: 79: 72: 65: 53: 41:Please help 36:verification 33: 1558:Categorical 1197:BladeCenter 1074:Advanced/36 1034:PS/2 Server 1013:System 9000 692:Sample code 602:are always 463:parameters. 202:Proprietary 1593:Categories 1423:JavaScript 1299:Comparison 965:IBM System 758:2021-03-24 735:References 342:CL-command 308:C programs 292:Parameters 223:Influenced 133:imperative 69:newspapers 1520:Smalltalk 1044:Netfinity 1039:PC Server 1028:iDataPlex 1001:System/38 996:System/36 991:System/34 986:System/32 485:Prompting 316:data type 254:System/38 152:Developer 1578:Category 1344:Assembly 1304:Timeline 1226:Category 1207:Series/1 1023:System x 1018:System p 1008:System/7 978:System/3 973:System/3 907:IBM 1400 859:IBM 1130 718:See also 704:&TYP 252:for the 128:Paradigm 1531:more... 1510:Scratch 1413:Haskell 1403:Fortran 1359:classic 1309:History 1182:IBM 801 1147:RS/6000 1049:eServer 896:Calcomp 783:IBM.com 699:&IN 686:library 659:program 636:SUBJECT 600:program 576:display 437:follow 244:) is a 198:License 171: ( 83:scholar 1604:AS/400 1550:Lists: 1485:Python 1480:Prolog 1458:Pascal 1448:MATLAB 1433:Kotlin 1393:Erlang 1332:Simula 1116:object 1111:OS/400 1066:AS/400 802:  724:Qshell 624:server 616:module 592:create 568:change 491:source 439:object 326:Syntax 261:OS/400 85:  78:  71:  64:  56:  1525:Swift 1515:Shell 1428:Julia 1398:Forth 1388:COBOL 1349:BASIC 1327:ALGOL 1175:Other 1161:RT PC 752:(PDF) 479:*SAME 435:-name 191:IBM i 90:JSTOR 76:books 1500:Rust 1495:Ruby 1470:Perl 1438:Lisp 1418:Java 1364:.NET 930:1460 925:1440 920:1410 915:1401 800:ISBN 729:Rexx 634:and 632:VERB 608:user 584:work 423:> 417:< 414:> 408:< 402:> 396:< 392:> 386:< 379:> 373:< 370:> 364:< 358:> 352:< 345:> 339:< 330:The 302:and 300:Unix 236:The 217:PL/I 173:1978 166:1978 62:news 1505:SQL 1475:PHP 1443:Lua 1378:C++ 1339:APL 1322:Ada 847:IBM 655:CHG 651:CMD 628:SVR 626:is 620:MOD 618:is 612:USR 610:is 604:PGM 596:CRT 594:as 588:WRK 586:as 580:DSP 578:as 572:CHG 426:::= 405:::= 382:::= 361:::= 348:::= 332:BNF 304:DOS 250:IBM 157:IBM 145:IBM 45:by 1595:: 1453:ML 1408:Go 1383:C# 668:. 622:, 614:, 606:, 590:, 582:, 574:, 539:. 532:. 242:CL 215:, 189:, 182:OS 1490:R 1373:C 1280:e 1273:t 1266:v 1076:* 980:X 898:) 894:( 839:e 832:t 825:v 808:. 761:. 294:( 240:( 175:) 112:) 106:( 101:) 97:( 87:· 80:· 73:· 66:· 39:.

Index


verification
improve this article
adding citations to reliable sources
"Control Language"
news
newspapers
books
scholar
JSTOR
Learn how and when to remove this message
Paradigm
imperative
Designed by
IBM
Developer
IBM
OS
Control Program Facility
IBM i
License
Job Control Language
PL/I
Windows PowerShell
scripting language
IBM
System/38
Control Program Facility
OS/400
Job Control Language

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.