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
|
*os_390.txt* For Vim version 7.2. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Ralf Schandl
*zOS* *z/OS* *OS390* *os390* *MVS*
This file contains the particulars for the z/OS UNIX version of Vim.
1. Open source on z/OS UNIX |zOS-open-source|
2. Your feedback is needed |zOS-feedback|
3. Building VIM for z/OS UNIX |zOS-building|
4. ASCII/EBCDIC dependent scripts |zOS-has-ebcdic|
5. XTerm Problems |zOS-xterm|
6. Motif Problems |zOS-Motif|
7. Bugs |zOS-Bugs|
8. Known weaknesses |zOS-weaknesses|
9. Changes |zOS-changes|
DISCLAIMER: ~
We are IBM employees, but IBM is not responsible for this port. This is our
private fun, and is provided in the hopes that it may be useful to others.
Please note that this software has NOT been submitted to any formal IBM
testing and is published AS IS. Please do not contact IBM for support for this
software, as it is not an official component of any IBM product. IT IS NOT
SUPPORTED, GUARANTEED, OR RELATED WHATSOEVER TO IBM.
Contributors: ~
The port to z/OS UNIX was done by Ralf Schandl for the Redbook mentioned
below.
Changes, bug-reports, or both by:
David Moore
Anthony Giorgio <agiorgio@fastmail.fm>
and others
This document was written by Ralf Schandl and revised by Anthony Giorgio.
==============================================================================
1. Open source on z/OS UNIX *OS390-open-source* *zOS-open-source*
If you are interested in other Open Source Software on z/OS UNIX, have a
look at the following Redbook:
Mike MacIsaac et al
"Open Source Software for z/OS and OS/390 UNIX"
IBM Form Number: SG24-5944-01
ISBN: 0738424633
You can find out more information, order a hard copy, or download a PDF
version of these Redbooks at:
http://www.redbooks.ibm.com
==============================================================================
2. Your feedback is needed *OS390-feedback* *zOS-feedback*
Vim should compile, link, and run right out of the box on a standard IBM z/OS
UNIX mainframe. I've personally run it on z/OS V1R2 and V1R3 machines without
problems.
Many changes had to be done to the code to port Vim to z/OS UNIX. As like
most UNIX programs, Vim contained heavy ASCII dependencies. I might have
missed an ASCII dependency, or it is possible that a new one has been added
with a feature or bug fix. Most programmers are simply not aware of possible
ASCII/EBCDIC conversion issues. If you hit a problem that seems related to
this, feel free to contact us at the email addresses above.
One indication of ASCII/EBCDIC conversion problems is screen corruption with
"unprintable" characters. For example, at one point the errorbell was broken
in Vim. Any time Vim tried to ring the terminal bell an ASCII character 0x07
would be printed. This works fine on most terminals, but is broken on an
EBCDIC one. The correct solution was to define a different value for the bell
character on EBCDIC systems.
Remember, it's only possible to fix a bug if the community knows about it.
Don't rely on someone else to report it! See the section |bug-reports|.
==============================================================================
3. Building VIM for z/OS UNIX *OS390-building* *zOS-building*
A word on debugging code first: ~
The normal run of configure adds the flag '-g' to the compiler options,
to include debugging information into the executable. This information
are normally removed from the executable with the strip command during
installation. On z/OS UNIX, it is not possible to remove this from
the executable. The strip command exists on z/OS UNIX and is called
during the installation, but it does nothing. It is equivalent to the
'touch' command. This is due to the way debug symbols are stored in the
objects generated by the compiler.
If you want to build Vim without debugging code, export the environment
variable CFLAGS set to an empty string before you call the configure script.
>
export CFLAGS=""
Building without X11: ~
Note: Use cc to build Vim. The c89 compiler has stricter syntax checking
and will not compile Vim cleanly.
If you build VIM without X11 support, compiling and building is
straightforward. Don't forget to export _CC_CCMODE=1 before calling
configure and make.
>
$ export _CC_CCMODE=1
$./configure --with-features=big --without-x --enable-gui=no
$ make
$ make test
<
Test notes:
Test 11 will fail if you do not have gzip installed.
Test 42 will fail, as VIM on z/OS UNIX doesn't support the multibyte
feature. (David Moore: "Doesn't work _yet_! :-) I'll see what I
can do.")
>
$ make install
Building with X11: ~
There are two ways for building Vim with X11 support. You can link it
statically with the X11 libraries or can bind it with the X11 DLLs. The
statically linked version results in a huge executable (~13MB), while the
dynamically linked executable is much smaller (~4.5MB).
Here is what you do, if you want Motif:
a) Static link >
$ configure --with-features=big --enable-gui=motif
$ make
<
VIM is now linked statically with the X11 libraries.
b) Dynamic link:
Make VIM as described for the static link. Then change the contents of
the 'auto/link.sed' file by appending: >
s%-lXm *%/usr/lib/Xm.x %g
s%-lX11 *%/usr/lib/X11.x %g
s%-lSM *%/usr/lib/SM.x %g
s%-lICE *%/usr/lib/ICE.x %g
<
Then do: >
$ rm vim
$ make
<
Now Vim is linked with the X11-DLLs.
See the Makefile and the file link.sh on how link.sed is used.
==============================================================================
4. ASCII/EBCDIC dependent scripts *OS390-has-ebcdic* *zOS-has-ebcdic*
For the internal script language the feature "ebcdic" was added. With this
you can fix ASCII dependent scripts like this:
>
if has("ebcdic")
let space = 64
else
let space = 32
endif
<
==============================================================================
5. XTerm problems *OS390-xterm* *zOS-xterm*
Note: This problem was resolved in version 6.1b. ~
I saw one problem with XTerm on z/OS UNIX. The terminal code for moving the
cursor to the left is wrong in the termlib database. Perhaps not wrong, but
it didn't work with VIM syntax highlighting and command line cursor movement.
If the highlighting is messed up while you type, but is okay after you refreshed
the screen with <C-L> or if you can't move to the left with the cursor key on
the command line, try adding >
:set t_le=^H
<
to your .vimrc. Note: '^H' is one character, hit <C-V><C-H> to get it.
==============================================================================
6. Motif Problems *OS390-Motif* *zOS-Motif*
It seems that in porting the Motif library to z/OS, a translation from EBCDIC
to ASCII for the accelerator characters of the pull-down menus was forgotten.
Even after I tried to hand convert the menus, the accelerator keys continued
to only work for the opening of menus (like <Alt-F> to open the file menu).
They still do not work for the menu items themselves (like <Alt-F>O to open
the file browser).
There is no solution for this as of yet.
==============================================================================
7. Bugs *OS390-bugs* *zOS-Bugs*
- Vim will consistently hang when a large amount of text is selected in
visual block mode. This may be due to a memory corruption issue. Note that
this occurs in both the terminal and gui versions.
==============================================================================
8. Known weaknesses *OS390-weaknesses* *zOS-weaknesses*
- No binary search in tag files.
The program /bin/sort sorts by ASCII value by default. This program is
normally used by ctags to sort the tags. There might be a version of
ctags out there, that does it right, but we can't be sure. So this seems to
be a permanent restriction.
- Multibyte support (utf-8) doesn't work, it's disabled at compile time.
(|multibyte|)
- The cscope interface (|cscope|) doesn't work for the version of cscope
that we use on our mainframe. We have a copy of version 15.0b12, and it
causes Vim to hang when using the "cscope add" command. I'm guessing that
the binary format of the cscope database isn't quite what Vim is expecting.
I've tried to port the current version of cscope (15.3) to z/OS, without
much success. If anyone is interested in trying, drop me a line if you
make any progress.
- No glib/gtk support. I have not been able to successfully compile glib on
z/OS UNIX. This means you'll have to live without the pretty gtk toolbar.
Never tested:
- Perl interface (|perl|)
- Hangul input (|hangul|)
- Encryption support (|encryption|)
- Langmap (|'langmap'|)
- Python support (|Python|)
- Right-to-left mode (|'rightleft'|)
- SNiFF+ interface (|sniff|)
- TCL interface (|tcl|)
...
If you try any of these features and they work, drop us a note!
==============================================================================
9. Changes *OS390-changes* *zOS-changes*
This is a small reference of the changes made to the z/OS port of Vim. It is
not an exhaustive summary of all the modifications made to the code base.
6.1b (beta):
Changed KS_LE in term.c to be "\b" instead of "\010" This fixed the
screen corruption problems in gVim reported by Anthony Giorgio.
Anthony Giorgio updated this document:
- Changed OS/390 to z/OS where appropriate. IBM decided to rename
all of its servers and operating systems. z/OS and OS/390
are the same product, but the version numbering system was
reset for the name change (e.g. OS/390 V2R11 == z/OS V1R1).
- Added information about second edition of the Open Source Redbook.
- Moved Redbook information to a separate section.
- Various tweaks and changes.
- Updated testing section.
6.0au:
Changed configure.in
Changed documentation.
Anthony Giorgio fixed the errorbell.
David Moore found some problems, which were fixed by Bram and/or David for
6.0au.
6.0q (alpha):
Minor changes for nrformats=alpha (see |'nrformats'|).
Problem with hard-coded keycode for the English pound sign. Added a define in
ascii.h
Disabled multibyte for EBCDIC in feature.h
6.0f (alpha):
First compile of Vim 6 on z/OS UNIX. Some minor changes were needed.
Finally found the reason why make from the top level didn't work (I must have
been blind before!). The Makefile contained a list of targets in one target
line. On all other UNIX's the macro $@ evaluates to the first target in this
list, only on z/OS UNIX it evaluates to the last one :-(.
5.6-390d:
Cleaned up some hacks.
5.6-390c:
I grepped through the source and examined every spot with a character
involved in a operation (+-). I hope I now found all EBCDIC/ASCII
stuff, but ....
Fixed:
- fixed warning message in do_fixdel()
- fixed translation from Ctrl-Char to symbolic name (like ^h to CTRL-H)
for :help
- fixed yank/delete/... into register
- fixed :register command
- fixed viminfo register storing
- fixed quick-access table in findoptions()
- fixed 'g^H' select mode
- fixed tgetstr() 'get terminal capability string', ESC and
Ctrl chars where wrong. (Not used on OS/390 UNIX)
ctags:
- added trigraphs support (used in prolog of system header files)
(get.c)
- fixed sorting order with LC_COLLATE=S390 to force EBCDIC sorting.
(sort.c)
5.6-390b:
Changed:
- configure.in:
- added test for OS/390 UNIX
- added special compiler and linker options if building with X11
- configure:
- after created via autoconf hand-edited it to make the test for
ICEConnectionNumber work. This is a autoconf problem. OS/390 UNIX
needs -lX11 for this.
- Makefile
- Don't include the lib directories ('-L...') into the variable
ALL_LIBS. Use own variable ALL_LIB_DIRS instead. A fully POSIX
compliant compiler must not accept objects/libraries and options
mixed. Now we can call the linker like this:
$(CC) $(LDFLAGS) $(ALL_LIB_DIRS) $(OBJ) $(ALL_LIBS)
Fixed:
- Double quote couldn't be entered
Missed ASCII dependencies while setting up terminal
In ASCII 127 is the delete char, in EBCDIC codepage 1047 the value 127
is the double quote.
- fixed ':fixdel'
5.6-390a:
first alpha release for OS/390 UNIX.
Addition:
- For the internal script language I added the feature "ebcdic".
This can be queried with the has()-function of the internal
script language.
------------------------------------------------------------------------------
vim:tw=78:fo=tcq2:ts=8:ft=help:norl:
|