1
2
3
4
5 get_ascii_file_name: proc (fnia, cfdl, acfp)returns (bit (1));
6
7
8
9
10
11
12 dcl fnia bit(1)parm ;
13 dcl cfdl fixed bin(18)unsigned unal parm ;
14 dcl acfp ptr parm ;
15
16 ap = acfp;
17 cat_filedescr_name_offset = 0;
18
19 if (cfdl < mem_bottom) |
20 (cfdl+5 > mem_top) then do;
21 goto return_err4;
22 end;
23 descriptor_ptr = addrel (gseg, cfdl);
24
25 if cfd2.USERID = -1 then do;
26 descriptor_ptr -> bit72 = gtss_ust.lid;
27 cfd2.USERID_password = (12)"20"b3;
28 end;
29
30 cat_filedescr_name_offset = cfdl;
31
32 do nic = 0 to 5;
33 if nic = 0 then
34 if cdf4.end_of_list = -1 then do;
35 acf.nn = 1;
36 goto gal;
37 end;
38
39 if (cfdl+ (nic*2)+6) > mem_top then do;
40 goto return_err4;
41 end;
42
43 if cfd2.end_of_list = -1 then do;
44 cat_filedescr_name_offset = cfdl + (nic*4) + 4;
45 acf.nn = nic+2;
46
47 gal: ;
48 do i = 1 to acf.nn;
49
50
51
52 if (i > 1) & (i = acf.nn) & fnia then do;
53 callers_buf.restore_switch = "000000000001"b3;
54 acf.name (i) = translate (cfd3 (i).name,
55 "abcdefghijklmnopqrstuvwxyz",
56 "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
57 end;
58 else
59 call gtss_bcd_ascii_$lc (
60 addr (cfd3 (i).name)
61 , 12
62 , addr (acf.name (i))
63 );
64 end;
65
66 if substr (string (gtss_ext_$db), 09, 11) then do;
67 call ioa_ ("cat/filedescr:");
68 do i = 1 to acf.nn;
69 call ioa_ ("^3i. ""^a""", i, acf.name (i));
70 end;
71 end;
72
73 if substr (acf.name (1), 1, 6) = "!!!!!!"
74 then acf.name (1) = gse_ext_$umc_name;
75 callers_buf.file_id_in_ascii = substr(acf.name (acf.nn),1,8);
76 return ("0"b);
77 end;
78 end;
79
80
81 cat_filedescr_name_offset = 0;
82 return ("1"b);
83
84 dcl ap ptr ;
85 dcl 1 acf aligned based(ap) like ascii_cat_file;
86
87 dcl 1 callers_buf aligned based(buffer_ptr),
88 3 restore_switch bit(36),
89 3 file_id_in_ascii char(8);
90
91 dcl 1 cfd2 aligned based(descriptor_ptr)
92 , 3 user_master_catalog
93 , 4 USERID fixed bin(71)
94 , 4 USERID_password bit(72)
95 , 3 intermediate_catalogs (nic)
96 , 4 CATALOG bit(72)
97 , 4 CATALOG_password bit(72)
98 , 3 file_to_be_accessed
99 , 4 FILENAME bit(72)
100 , 4 FILENAME_password bit(72)
101 , 3 end_of_list fixed bin(35)
102 ;
103
104 dcl 1 cfd3 (7) aligned based(descriptor_ptr)
105 , 3 name char(8)
106 , 3 password bit(72)
107 ;
108
109 dcl 1 cdf4 aligned based(descriptor_ptr)
110 , 3 user_master_catalog
111 , 4 USERID fixed bin(71)
112 , 4 USERID_password bit(72)
113 , 3 end_of_list fixed bin(35)
114 ;
115 end ;
116
117