1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 fs_chname: proc;
16
17 dcl rcode fixed bin,
18 count fixed bin,
19 (dp, ep, op, np) ptr,
20 (dl, el, ol, nl) fixed bin,
21 dir char (dl) based (dp),
22 entry char (el) based (ep),
23 oldname char (ol) based (op),
24 newname char (nl) based (np);
25
26 dcl cu_$arg_count ext entry (fixed bin),
27 cu_$arg_ptr ext entry (fixed bin, ptr, fixed bin, fixed bin),
28 com_err_ ext entry,
29 hcs_$chname ext entry,
30 ioa_ ext entry;
31
32
33
34
35
36
37 call cu_$arg_count (count);
38 if count ^= 4 then do;
39 call ioa_ ("^/Usage is:^-fs_chname dir entry oldname newname^/");
40 return;
41 end;
42
43
44
45 call cu_$arg_ptr (1, dp, dl, rcode);
46 if rcode ^= 0 then do;
47 argerr: call com_err_ (rcode, "fs_chname", "");
48 return;
49 end;
50
51
52
53 call cu_$arg_ptr (2, ep, el, rcode);
54 if rcode ^= 0 then go to argerr;
55
56
57
58 call cu_$arg_ptr (3, op, ol, rcode);
59 if rcode ^= 0 then go to argerr;
60
61 call cu_$arg_ptr (4, np, nl, rcode);
62 if rcode ^= 0 then go to argerr;
63
64
65
66 call hcs_$chname (dir, entry, oldname, newname, rcode);
67 if rcode ^= 0 then
68 call com_err_ (rcode, "fs_chname", entry);
69
70 return;
71
72 end;