Skip to content

Commit 8bcdd1e

Browse files
committed
final changes before VM Workshop
1 parent 2ca4af0 commit 8bcdd1e

File tree

6 files changed

+69
-14
lines changed

6 files changed

+69
-14
lines changed

execs/README.md

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The following EXECs for z/VM are in this directory:
2020
| HEAD EXEC | Output the first part of files |
2121
| HISTORY EXEC | Display list of commands previously run |
2222
| MAN EXEC | Give help on CMS/CP/XEDIT/TCPIP/REXX commands |
23-
| MKARCZCT EXEC | Create the VMARC file with all EXECs inside |
23+
| MKVMARC EXEC | Create the VMARC file with all EXECs inside |
2424
| QA EXEC | Run QUERY ACCESSED |
2525
| RFN EXEC | Rename file changing only file name |
2626
| RFT EXEC | Rename file changing only file type |
@@ -90,11 +90,6 @@ calc 21 * 5
9090
21 * 5 = 105
9191
```
9292

93-
- Here is an example of using it:
94-
95-
```
96-
calcdasd
97-
9893
### CALCDASD EXEC
9994
The ``CALCDASD EXEC`` calculates the size of all disk space.
10095

@@ -497,6 +492,38 @@ For example, ``man q da`` takes you to the ``CP QUERY DASD`` help screen, and ``
497492
### MKZVMARC EXEC
498493
The ``MKZVMARC EXEC`` creates the z/VM file ``ZVMTOOLS VMARC`` from all of these REXX EXECs.
499494

495+
Here is an example of using it:
496+
```
497+
mkvmarc
498+
Erasing old file: ZVMTOOLS VMARC A
499+
CALC EXEC A1. Bytes in= 735, bytes out= 640 ( 87%).
500+
CALCDASD EXEC A1. Bytes in= 4581, bytes out= 2560 ( 55%).
501+
CALCOSA EXEC A1. Bytes in= 10372, bytes out= 4240 ( 40%).
502+
CFM EXEC A1. Bytes in= 1254, bytes out= 880 ( 70%).
503+
CFN EXEC A1. Bytes in= 1252, bytes out= 880 ( 70%).
504+
CFT EXEC A1. Bytes in= 1298, bytes out= 960 ( 73%).
505+
COPYDISK EXEC A1. Bytes in= 1765, bytes out= 1200 ( 67%).
506+
CPFORMAT EXEC A1. Bytes in= 7773, bytes out= 3840 ( 49%).
507+
DIFF EXEC A1. Bytes in= 6250, bytes out= 3040 ( 48%).
508+
GREP EXEC A1. Bytes in= 12292, bytes out= 4880 ( 39%).
509+
HEAD EXEC A1. Bytes in= 3996, bytes out= 2080 ( 52%).
510+
HISTORY EXEC A1. Bytes in= 4273, bytes out= 2240 ( 52%).
511+
MAN EXEC A1. Bytes in= 1812, bytes out= 1200 ( 66%).
512+
MKVMARC EXEC A1. Bytes in= 1274, bytes out= 1040 ( 81%).
513+
QA EXEC A1. Bytes in= 371, bytes out= 320 ( 86%).
514+
RFN EXEC A1. Bytes in= 1088, bytes out= 800 ( 73%).
515+
RFT EXEC A1. Bytes in= 1090, bytes out= 800 ( 73%).
516+
RM EXEC A1. Bytes in= 1548, bytes out= 1120 ( 72%).
517+
SPC EXEC A1. Bytes in= 1089, bytes out= 720 ( 66%).
518+
SSICMD EXEC A1. Bytes in= 1291, bytes out= 1040 ( 80%).
519+
TAIL EXEC A1. Bytes in= 1217, bytes out= 800 ( 65%).
520+
WC EXEC A1. Bytes in= 4337, bytes out= 2240 ( 51%).
521+
WCZVMTLS EXEC A1. Bytes in= 428, bytes out= 400 ( 93%).
522+
WHICH EXEC A1. Bytes in= 20735, bytes out= 10480 ( 50%).
523+
WHO EXEC A1. Bytes in= 3301, bytes out= 1840 ( 55%).
524+
Created file: ZVMTOOLS VMARC A
525+
```
526+
500527
### QA EXEC
501528
The ``QA EXEC`` simply calls ``QUERY ACCESSED`` to save keystrokes.
502529

execs/calc.exec

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ if args = '' | args = "?" | args = "-H" then do
1111
say "Exmpl: CALC 5 + 6"
1212
exit
1313
end
14-
interpret "result =" args
15-
say args "=" result
14+
15+
signal on syntax name mathError /* trap non-numerice expressions */
16+
interpret "result =" args /* do the math */
17+
say args "=" result /* show expression and answer */
18+
exit
19+
20+
mathError:
21+
say "SYNTAX ERROR"
22+
exit
1623

execs/grep.exec

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
/* Licensed under the Apache License, Version 2.0 */
55
/* https://github.com/openmainframeproject/zvm-community-tools/execs */
66
/*--------------------------------------------------------------------*/
7-
/* parse for quoted pattern, if not found => single word pattern */
8-
/* trace i */
97
parse arg args /* get all args */
108
numArgs = WORDS(args) /* get number of args */
119
call parseArgs args /* parse them */

execs/mkvmarc.exec

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@
44
/* Licensed under the Apache License, Version 2.0 */
55
/* Source: https://github.com/mike99mac/zvm-tools */
66
/*-------------------------------------------------------------------*/
7+
parse upper arg args /* get all args */
8+
if args = "?" | args = "-H" then do /* give help */
9+
say "Name: MKVMARC EXEC - Create a VMARC file of all EXECs"
10+
say "Usage: MKVMARC"
11+
exit
12+
end
713
vmarcFile = "ZVMTOOLS VMARC A" /* output file */
814
'ESTATE' vmarcFile
9-
if rc = 0 then do
15+
if rc = 0 then do /* old file exists */
1016
say "Erasing old file:" vmarcFile
1117
'ERASE' vmarcFile
1218
if rc <> 0 then do
@@ -16,12 +22,13 @@ if rc = 0 then do
1622
end
1723

1824
/* List of EXECs */
19-
execs = "CALCDASD CALCOSA CFM CFN CFT COPYDISK CPFORMAT ",
25+
execs = "CALC CALCDASD CALCOSA CFM CFN CFT COPYDISK CPFORMAT ",
2026
||"DIFF GREP HEAD HISTORY MAN MKVMARC QA RFN RFT RM ",
2127
||"SPC SSICMD TAIL WC WCZVMTLS WHICH WHO"
22-
do i = 1 to WORDS(execs) /* Add each to the VMARC file */
28+
numExecs = WORDS(execs)
29+
do i = 1 to numExecs /* Add each to the VMARC file */
2330
nextFile = SUBWORD(execs,i,1) "EXEC A"
2431
address COMMAND "VMARC PACK" nextFile vmarcFile "(APPEND"
2532
end
26-
say "Created file:" vmarcFile
33+
say "Created file:" vmarcFile "with" numExecs "EXECs"
2734

execs/wczvmtls.exec

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*-------------------------------------------------------------------*/
2+
/* WCZVMTLS EXEC - count words in zvm-community-tools EXECs */
3+
/* This assumes all the execs are on your A disk */
4+
/* Licensed under the Apache License, Version 2.0 */
5+
/* Source: https://github.com/mike99mac/zvm-tools */
6+
/*-------------------------------------------------------------------*/
7+
execs = "CALC CALCDASD CALCOSA CFM CFN CFT COPYDISK CPFORMAT ",
8+
||"DIFF GREP HEAD HISTORY MAN MKVMARC QA RFN RFT RM ",
9+
||"SPC SSICMD TAIL WC WCZVMTLS WHICH WHO"
10+
files = "" /* list of EXECs */
11+
do i = 1 to WORDS(execs)
12+
nextFile = SUBWORD(execs,i,1) "EXEC A" /* change if different fm */
13+
files = files nextFile
14+
end
15+
wc files
16+

0 commit comments

Comments
 (0)