blob: f0c9c44baa9fbb0096418b9a77b5fbafafddf504 [file] [log] [blame]
Bram Moolenaarfff2bee2010-05-15 13:56:02 +02001*os_390.txt* For Vim version 7.3a. Last change: 2008 Dec 17
Bram Moolenaar071d4272004-06-13 20:20:40 +00002
3
4 VIM REFERENCE MANUAL by Ralf Schandl
5
6 *zOS* *z/OS* *OS390* *os390* *MVS*
7This file contains the particulars for the z/OS UNIX version of Vim.
8
91. Open source on z/OS UNIX |zOS-open-source|
102. Your feedback is needed |zOS-feedback|
113. Building VIM for z/OS UNIX |zOS-building|
124. ASCII/EBCDIC dependent scripts |zOS-has-ebcdic|
135. XTerm Problems |zOS-xterm|
146. Motif Problems |zOS-Motif|
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000157. Bugs |zOS-Bugs|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000168. Known weaknesses |zOS-weaknesses|
179. Changes |zOS-changes|
18
19DISCLAIMER: ~
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000020We are IBM employees, but IBM is not responsible for this port. This is our
Bram Moolenaar071d4272004-06-13 20:20:40 +000021private fun, and is provided in the hopes that it may be useful to others.
22
23Please note that this software has NOT been submitted to any formal IBM
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000024testing and is published AS IS. Please do not contact IBM for support for this
25software, as it is not an official component of any IBM product. IT IS NOT
Bram Moolenaar071d4272004-06-13 20:20:40 +000026SUPPORTED, GUARANTEED, OR RELATED WHATSOEVER TO IBM.
27
28Contributors: ~
29The port to z/OS UNIX was done by Ralf Schandl for the Redbook mentioned
30below.
31
32Changes, bug-reports, or both by:
33
34 David Moore
35 Anthony Giorgio <agiorgio@fastmail.fm>
36 and others
37
38This document was written by Ralf Schandl and revised by Anthony Giorgio.
39
40==============================================================================
411. Open source on z/OS UNIX *OS390-open-source* *zOS-open-source*
42
43If you are interested in other Open Source Software on z/OS UNIX, have a
44look at the following Redbook:
45
46 Mike MacIsaac et al
47 "Open Source Software for z/OS and OS/390 UNIX"
48 IBM Form Number: SG24-5944-01
49 ISBN: 0738424633
50
51You can find out more information, order a hard copy, or download a PDF
52version of these Redbooks at:
53
54 http://www.redbooks.ibm.com
55
56==============================================================================
572. Your feedback is needed *OS390-feedback* *zOS-feedback*
58
59Vim should compile, link, and run right out of the box on a standard IBM z/OS
60UNIX mainframe. I've personally run it on z/OS V1R2 and V1R3 machines without
61problems.
62
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000063Many changes had to be done to the code to port Vim to z/OS UNIX. As like
64most UNIX programs, Vim contained heavy ASCII dependencies. I might have
Bram Moolenaar071d4272004-06-13 20:20:40 +000065missed an ASCII dependency, or it is possible that a new one has been added
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000066with a feature or bug fix. Most programmers are simply not aware of possible
67ASCII/EBCDIC conversion issues. If you hit a problem that seems related to
Bram Moolenaar071d4272004-06-13 20:20:40 +000068this, feel free to contact us at the email addresses above.
69
70One indication of ASCII/EBCDIC conversion problems is screen corruption with
71"unprintable" characters. For example, at one point the errorbell was broken
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000072in Vim. Any time Vim tried to ring the terminal bell an ASCII character 0x07
73would be printed. This works fine on most terminals, but is broken on an
74EBCDIC one. The correct solution was to define a different value for the bell
Bram Moolenaar071d4272004-06-13 20:20:40 +000075character on EBCDIC systems.
76
77Remember, it's only possible to fix a bug if the community knows about it.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000078Don't rely on someone else to report it! See the section |bug-reports|.
Bram Moolenaar071d4272004-06-13 20:20:40 +000079
80==============================================================================
813. Building VIM for z/OS UNIX *OS390-building* *zOS-building*
82
83A word on debugging code first: ~
84
85The normal run of configure adds the flag '-g' to the compiler options,
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000086to include debugging information into the executable. This information
Bram Moolenaar071d4272004-06-13 20:20:40 +000087are normally removed from the executable with the strip command during
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000088installation. On z/OS UNIX, it is not possible to remove this from
89the executable. The strip command exists on z/OS UNIX and is called
Bram Moolenaar071d4272004-06-13 20:20:40 +000090during the installation, but it does nothing. It is equivalent to the
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000091'touch' command. This is due to the way debug symbols are stored in the
Bram Moolenaar071d4272004-06-13 20:20:40 +000092objects generated by the compiler.
93
94If you want to build Vim without debugging code, export the environment
95variable CFLAGS set to an empty string before you call the configure script.
96>
97 export CFLAGS=""
98
99
100Building without X11: ~
101
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000102Note: Use cc to build Vim. The c89 compiler has stricter syntax checking
Bram Moolenaar071d4272004-06-13 20:20:40 +0000103and will not compile Vim cleanly.
104
105If you build VIM without X11 support, compiling and building is
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000106straightforward. Don't forget to export _CC_CCMODE=1 before calling
Bram Moolenaar071d4272004-06-13 20:20:40 +0000107configure and make.
108>
109 $ export _CC_CCMODE=1
110 $./configure --with-features=big --without-x --enable-gui=no
111 $ make
112 $ make test
113<
114 Test notes:
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
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000117 feature. (David Moore: "Doesn't work _yet_! :-) I'll see what I
Bram Moolenaar071d4272004-06-13 20:20:40 +0000118 can do.")
119>
120
121 $ make install
122
123
124Building with X11: ~
125
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000126There are two ways for building Vim with X11 support. You can link it
127statically with the X11 libraries or can bind it with the X11 DLLs. The
Bram Moolenaar071d4272004-06-13 20:20:40 +0000128statically linked version results in a huge executable (~13MB), while the
129dynamically linked executable is much smaller (~4.5MB).
130
131Here is what you do, if you want Motif:
132
133 a) Static link >
134 $ configure --with-features=big --enable-gui=motif
135 $ make
136<
137 VIM is now linked statically with the X11 libraries.
138
139 b) Dynamic link:
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000140 Make VIM as described for the static link. Then change the contents of
Bram Moolenaar071d4272004-06-13 20:20:40 +0000141 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
146<
147 Then do: >
148 $ rm vim
149 $ make
150<
151 Now Vim is linked with the X11-DLLs.
152
153See the Makefile and the file link.sh on how link.sed is used.
154
155==============================================================================
1564. ASCII/EBCDIC dependent scripts *OS390-has-ebcdic* *zOS-has-ebcdic*
157
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000158For the internal script language the feature "ebcdic" was added. With this
Bram Moolenaar071d4272004-06-13 20:20:40 +0000159you can fix ASCII dependent scripts like this:
160>
161 if has("ebcdic")
162 let space = 64
163 else
164 let space = 32
165 endif
166<
167==============================================================================
1685. XTerm problems *OS390-xterm* *zOS-xterm*
169
170Note: This problem was resolved in version 6.1b. ~
171
172I saw one problem with XTerm on z/OS UNIX. The terminal code for moving the
173cursor to the left is wrong in the termlib database. Perhaps not wrong, but
174it didn't work with VIM syntax highlighting and command line cursor movement.
175
176If the highlighting is messed up while you type, but is okay after you refreshed
177the screen with <C-L> or if you can't move to the left with the cursor key on
178the command line, try adding >
179 :set t_le=^H
180<
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000181to your .vimrc. Note: '^H' is one character, hit <C-V><C-H> to get it.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000182
183==============================================================================
1846. Motif Problems *OS390-Motif* *zOS-Motif*
185
186It seems that in porting the Motif library to z/OS, a translation from EBCDIC
187to ASCII for the accelerator characters of the pull-down menus was forgotten.
188Even after I tried to hand convert the menus, the accelerator keys continued
189to only work for the opening of menus (like <Alt-F> to open the file menu).
190They still do not work for the menu items themselves (like <Alt-F>O to open
191the file browser).
192
193There is no solution for this as of yet.
194
195==============================================================================
1967. Bugs *OS390-bugs* *zOS-Bugs*
197
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.
201
202==============================================================================
2038. Known weaknesses *OS390-weaknesses* *zOS-weaknesses*
204
205- No binary search in tag files.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000206 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
Bram Moolenaar071d4272004-06-13 20:20:40 +0000209 be a permanent restriction.
210
211- Multibyte support (utf-8) doesn't work, it's disabled at compile time.
212 (|multibyte|)
213
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
220 make any progress.
221
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.
224
225Never tested:
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|)
234 ...
235
236If you try any of these features and they work, drop us a note!
237
238==============================================================================
2399. Changes *OS390-changes* *zOS-changes*
240
241This is a small reference of the changes made to the z/OS port of Vim. It is
242not an exhaustive summary of all the modifications made to the code base.
243
2446.1b (beta):
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.
247
248 Anthony Giorgio updated this document:
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000249 - Changed OS/390 to z/OS where appropriate. IBM decided to rename
Bram Moolenaar071d4272004-06-13 20:20:40 +0000250 all of its servers and operating systems. z/OS and OS/390
251 are the same product, but the version numbering system was
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000252 reset for the name change (e.g. OS/390 V2R11 == z/OS V1R1).
Bram Moolenaar071d4272004-06-13 20:20:40 +0000253 - 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.
257
2586.0au:
259 Changed configure.in
260 Changed documentation.
261 Anthony Giorgio fixed the errorbell.
262
263 David Moore found some problems, which were fixed by Bram and/or David for
264 6.0au.
265
2666.0q (alpha):
267 Minor changes for nrformats=alpha (see |'nrformats'|).
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000268 Problem with hard-coded keycode for the English pound sign. Added a define in
Bram Moolenaar071d4272004-06-13 20:20:40 +0000269 ascii.h
270 Disabled multibyte for EBCDIC in feature.h
271
2726.0f (alpha):
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000273 First compile of Vim 6 on z/OS UNIX. Some minor changes were needed.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000274
275 Finally found the reason why make from the top level didn't work (I must have
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000276 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
Bram Moolenaar071d4272004-06-13 20:20:40 +0000278 list, only on z/OS UNIX it evaluates to the last one :-(.
279
2805.6-390d:
281 Cleaned up some hacks.
282
2835.6-390c:
284 I grepped through the source and examined every spot with a character
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100285 involved in an operation (+-). I hope I now found all EBCDIC/ASCII
Bram Moolenaar071d4272004-06-13 20:20:40 +0000286 stuff, but ....
287
288 Fixed:
289 - fixed warning message in do_fixdel()
290 - fixed translation from Ctrl-Char to symbolic name (like ^h to CTRL-H)
291 for :help
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
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000298 Ctrl chars where wrong. (Not used on OS/390 UNIX)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000299
300
301 ctags:
302 - added trigraphs support (used in prolog of system header files)
303 (get.c)
304 - fixed sorting order with LC_COLLATE=S390 to force EBCDIC sorting.
305 (sort.c)
306
3075.6-390b:
308 Changed:
309 - configure.in:
310 - added test for OS/390 UNIX
311 - added special compiler and linker options if building with X11
312 - configure:
313 - after created via autoconf hand-edited it to make the test for
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100314 ICEConnectionNumber work. This is an autoconf problem. OS/390 UNIX
Bram Moolenaar071d4272004-06-13 20:20:40 +0000315 needs -lX11 for this.
316 - Makefile
317 - Don't include the lib directories ('-L...') into the variable
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000318 ALL_LIBS. Use own variable ALL_LIB_DIRS instead. A fully POSIX
Bram Moolenaar071d4272004-06-13 20:20:40 +0000319 compliant compiler must not accept objects/libraries and options
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000320 mixed. Now we can call the linker like this:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000321
322 $(CC) $(LDFLAGS) $(ALL_LIB_DIRS) $(OBJ) $(ALL_LIBS)
323
324 Fixed:
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
328 is the double quote.
329 - fixed ':fixdel'
330
3315.6-390a:
332 first alpha release for OS/390 UNIX.
333
334 Addition:
335 - For the internal script language I added the feature "ebcdic".
336 This can be queried with the has()-function of the internal
337 script language.
338
339------------------------------------------------------------------------------
340 vim:tw=78:fo=tcq2:ts=8:ft=help:norl: