1 *os_390.txt* For Vim version 7.2b. Last change: 2005 Mar 29
4 VIM REFERENCE MANUAL by Ralf Schandl
6 *zOS* *z/OS* *OS390* *os390* *MVS*
7 This file contains the particulars for the z/OS UNIX version of Vim.
9 1. Open source on z/OS UNIX |zOS-open-source|
10 2. Your feedback is needed |zOS-feedback|
11 3. Building VIM for z/OS UNIX |zOS-building|
12 4. ASCII/EBCDIC dependent scripts |zOS-has-ebcdic|
13 5. XTerm Problems |zOS-xterm|
14 6. Motif Problems |zOS-Motif|
16 8. Known weaknesses |zOS-weaknesses|
17 9. Changes |zOS-changes|
20 We are IBM employees, but IBM is not responsible for this port. This is our
21 private fun, and is provided in the hopes that it may be useful to others.
23 Please note that this software has NOT been submitted to any formal IBM
24 testing and is published AS IS. Please do not contact IBM for support for this
25 software, as it is not an official component of any IBM product. IT IS NOT
26 SUPPORTED, GUARANTEED, OR RELATED WHATSOEVER TO IBM.
29 The port to z/OS UNIX was done by Ralf Schandl for the Redbook mentioned
32 Changes, bug-reports, or both by:
35 Anthony Giorgio <agiorgio@fastmail.fm>
38 This document was written by Ralf Schandl and revised by Anthony Giorgio.
40 ==============================================================================
41 1. Open source on z/OS UNIX *OS390-open-source* *zOS-open-source*
43 If you are interested in other Open Source Software on z/OS UNIX, have a
44 look at the following Redbook:
47 "Open Source Software for z/OS and OS/390 UNIX"
48 IBM Form Number: SG24-5944-01
51 You can find out more information, order a hard copy, or download a PDF
52 version of these Redbooks at:
54 http://www.redbooks.ibm.com
56 ==============================================================================
57 2. Your feedback is needed *OS390-feedback* *zOS-feedback*
59 Vim should compile, link, and run right out of the box on a standard IBM z/OS
60 UNIX mainframe. I've personally run it on z/OS V1R2 and V1R3 machines without
63 Many changes had to be done to the code to port Vim to z/OS UNIX. As like
64 most UNIX programs, Vim contained heavy ASCII dependencies. I might have
65 missed an ASCII dependency, or it is possible that a new one has been added
66 with a feature or bug fix. Most programmers are simply not aware of possible
67 ASCII/EBCDIC conversion issues. If you hit a problem that seems related to
68 this, feel free to contact us at the email addresses above.
70 One indication of ASCII/EBCDIC conversion problems is screen corruption with
71 "unprintable" characters. For example, at one point the errorbell was broken
72 in Vim. Any time Vim tried to ring the terminal bell an ASCII character 0x07
73 would be printed. This works fine on most terminals, but is broken on an
74 EBCDIC one. The correct solution was to define a different value for the bell
75 character on EBCDIC systems.
77 Remember, it's only possible to fix a bug if the community knows about it.
78 Don't rely on someone else to report it! See the section |bug-reports|.
80 ==============================================================================
81 3. Building VIM for z/OS UNIX *OS390-building* *zOS-building*
83 A word on debugging code first: ~
85 The normal run of configure adds the flag '-g' to the compiler options,
86 to include debugging information into the executable. This information
87 are normally removed from the executable with the strip command during
88 installation. On z/OS UNIX, it is not possible to remove this from
89 the executable. The strip command exists on z/OS UNIX and is called
90 during the installation, but it does nothing. It is equivalent to the
91 'touch' command. This is due to the way debug symbols are stored in the
92 objects generated by the compiler.
94 If you want to build Vim without debugging code, export the environment
95 variable CFLAGS set to an empty string before you call the configure script.
100 Building without X11: ~
102 Note: Use cc to build Vim. The c89 compiler has stricter syntax checking
103 and will not compile Vim cleanly.
105 If you build VIM without X11 support, compiling and building is
106 straightforward. Don't forget to export _CC_CCMODE=1 before calling
109 $ export _CC_CCMODE=1
110 $./configure --with-features=big --without-x --enable-gui=no
115 Test 11 will fail if you do not have gzip installed.
116 Test 42 will fail, as VIM on z/OS UNIX doesn't support the multibyte
117 feature. (David Moore: "Doesn't work _yet_! :-) I'll see what I
126 There are two ways for building Vim with X11 support. You can link it
127 statically with the X11 libraries or can bind it with the X11 DLLs. The
128 statically linked version results in a huge executable (~13MB), while the
129 dynamically linked executable is much smaller (~4.5MB).
131 Here is what you do, if you want Motif:
134 $ configure --with-features=big --enable-gui=motif
137 VIM is now linked statically with the X11 libraries.
140 Make VIM as described for the static link. Then change the contents of
141 the 'auto/link.sed' file by appending: >
142 s%-lXm *%/usr/lib/Xm.x %g
143 s%-lX11 *%/usr/lib/X11.x %g
144 s%-lSM *%/usr/lib/SM.x %g
145 s%-lICE *%/usr/lib/ICE.x %g
151 Now Vim is linked with the X11-DLLs.
153 See the Makefile and the file link.sh on how link.sed is used.
155 ==============================================================================
156 4. ASCII/EBCDIC dependent scripts *OS390-has-ebcdic* *zOS-has-ebcdic*
158 For the internal script language the feature "ebcdic" was added. With this
159 you can fix ASCII dependent scripts like this:
167 ==============================================================================
168 5. XTerm problems *OS390-xterm* *zOS-xterm*
170 Note: This problem was resolved in version 6.1b. ~
172 I saw one problem with XTerm on z/OS UNIX. The terminal code for moving the
173 cursor to the left is wrong in the termlib database. Perhaps not wrong, but
174 it didn't work with VIM syntax highlighting and command line cursor movement.
176 If the highlighting is messed up while you type, but is okay after you refreshed
177 the screen with <C-L> or if you can't move to the left with the cursor key on
178 the command line, try adding >
181 to your .vimrc. Note: '^H' is one character, hit <C-V><C-H> to get it.
183 ==============================================================================
184 6. Motif Problems *OS390-Motif* *zOS-Motif*
186 It seems that in porting the Motif library to z/OS, a translation from EBCDIC
187 to ASCII for the accelerator characters of the pull-down menus was forgotten.
188 Even after I tried to hand convert the menus, the accelerator keys continued
189 to only work for the opening of menus (like <Alt-F> to open the file menu).
190 They still do not work for the menu items themselves (like <Alt-F>O to open
193 There is no solution for this as of yet.
195 ==============================================================================
196 7. Bugs *OS390-bugs* *zOS-Bugs*
198 - Vim will consistently hang when a large amount of text is selected in
199 visual block mode. This may be due to a memory corruption issue. Note that
200 this occurs in both the terminal and gui versions.
202 ==============================================================================
203 8. Known weaknesses *OS390-weaknesses* *zOS-weaknesses*
205 - No binary search in tag files.
206 The program /bin/sort sorts by ASCII value by default. This program is
207 normally used by ctags to sort the tags. There might be a version of
208 ctags out there, that does it right, but we can't be sure. So this seems to
209 be a permanent restriction.
211 - Multibyte support (utf-8) doesn't work, it's disabled at compile time.
214 - The cscope interface (|cscope|) doesn't work for the version of cscope
215 that we use on our mainframe. We have a copy of version 15.0b12, and it
216 causes Vim to hang when using the "cscope add" command. I'm guessing that
217 the binary format of the cscope database isn't quite what Vim is expecting.
218 I've tried to port the current version of cscope (15.3) to z/OS, without
219 much success. If anyone is interested in trying, drop me a line if you
222 - No glib/gtk support. I have not been able to successfully compile glib on
223 z/OS UNIX. This means you'll have to live without the pretty gtk toolbar.
226 - Perl interface (|perl|)
227 - Hangul input (|hangul|)
228 - Encryption support (|encryption|)
229 - Langmap (|'langmap'|)
230 - Python support (|Python|)
231 - Right-to-left mode (|'rightleft'|)
232 - SNiFF+ interface (|sniff|)
233 - TCL interface (|tcl|)
236 If you try any of these features and they work, drop us a note!
238 ==============================================================================
239 9. Changes *OS390-changes* *zOS-changes*
241 This is a small reference of the changes made to the z/OS port of Vim. It is
242 not an exhaustive summary of all the modifications made to the code base.
245 Changed KS_LE in term.c to be "\b" instead of "\010" This fixed the
246 screen corruption problems in gVim reported by Anthony Giorgio.
248 Anthony Giorgio updated this document:
249 - Changed OS/390 to z/OS where appropriate. IBM decided to rename
250 all of its servers and operating systems. z/OS and OS/390
251 are the same product, but the version numbering system was
252 reset for the name change (e.g. OS/390 V2R11 == z/OS V1R1).
253 - Added information about second edition of the Open Source Redbook.
254 - Moved Redbook information to a separate section.
255 - Various tweaks and changes.
256 - Updated testing section.
260 Changed documentation.
261 Anthony Giorgio fixed the errorbell.
263 David Moore found some problems, which were fixed by Bram and/or David for
267 Minor changes for nrformats=alpha (see |'nrformats'|).
268 Problem with hard-coded keycode for the English pound sign. Added a define in
270 Disabled multibyte for EBCDIC in feature.h
273 First compile of Vim 6 on z/OS UNIX. Some minor changes were needed.
275 Finally found the reason why make from the top level didn't work (I must have
276 been blind before!). The Makefile contained a list of targets in one target
277 line. On all other UNIX's the macro $@ evaluates to the first target in this
278 list, only on z/OS UNIX it evaluates to the last one :-(.
281 Cleaned up some hacks.
284 I grepped through the source and examined every spot with a character
285 involved in a operation (+-). I hope I now found all EBCDIC/ASCII
289 - fixed warning message in do_fixdel()
290 - fixed translation from Ctrl-Char to symbolic name (like ^h to CTRL-H)
292 - fixed yank/delete/... into register
293 - fixed :register command
294 - fixed viminfo register storing
295 - fixed quick-access table in findoptions()
296 - fixed 'g^H' select mode
297 - fixed tgetstr() 'get terminal capability string', ESC and
298 Ctrl chars where wrong. (Not used on OS/390 UNIX)
302 - added trigraphs support (used in prolog of system header files)
304 - fixed sorting order with LC_COLLATE=S390 to force EBCDIC sorting.
310 - added test for OS/390 UNIX
311 - added special compiler and linker options if building with X11
313 - after created via autoconf hand-edited it to make the test for
314 ICEConnectionNumber work. This is a autoconf problem. OS/390 UNIX
315 needs -lX11 for this.
317 - Don't include the lib directories ('-L...') into the variable
318 ALL_LIBS. Use own variable ALL_LIB_DIRS instead. A fully POSIX
319 compliant compiler must not accept objects/libraries and options
320 mixed. Now we can call the linker like this:
322 $(CC) $(LDFLAGS) $(ALL_LIB_DIRS) $(OBJ) $(ALL_LIBS)
325 - Double quote couldn't be entered
326 Missed ASCII dependencies while setting up terminal
327 In ASCII 127 is the delete char, in EBCDIC codepage 1047 the value 127
332 first alpha release for OS/390 UNIX.
335 - For the internal script language I added the feature "ebcdic".
336 This can be queried with the has()-function of the internal
339 ------------------------------------------------------------------------------
340 vim:tw=78:fo=tcq2:ts=8:ft=help:norl: