1255
|
1 *os_390.txt* For Vim version 7.1. Last change: 2005 Mar 29
|
7
|
2
|
|
3
|
|
4 VIM REFERENCE MANUAL by Ralf Schandl
|
|
5
|
|
6 *zOS* *z/OS* *OS390* *os390* *MVS*
|
|
7 This file contains the particulars for the z/OS UNIX version of Vim.
|
|
8
|
|
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|
|
236
|
15 7. Bugs |zOS-Bugs|
|
7
|
16 8. Known weaknesses |zOS-weaknesses|
|
|
17 9. Changes |zOS-changes|
|
|
18
|
|
19 DISCLAIMER: ~
|
236
|
20 We are IBM employees, but IBM is not responsible for this port. This is our
|
7
|
21 private fun, and is provided in the hopes that it may be useful to others.
|
|
22
|
|
23 Please note that this software has NOT been submitted to any formal IBM
|
236
|
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
|
7
|
26 SUPPORTED, GUARANTEED, OR RELATED WHATSOEVER TO IBM.
|
|
27
|
|
28 Contributors: ~
|
|
29 The port to z/OS UNIX was done by Ralf Schandl for the Redbook mentioned
|
|
30 below.
|
|
31
|
|
32 Changes, bug-reports, or both by:
|
|
33
|
|
34 David Moore
|
|
35 Anthony Giorgio <agiorgio@fastmail.fm>
|
|
36 and others
|
|
37
|
|
38 This document was written by Ralf Schandl and revised by Anthony Giorgio.
|
|
39
|
|
40 ==============================================================================
|
|
41 1. Open source on z/OS UNIX *OS390-open-source* *zOS-open-source*
|
|
42
|
|
43 If you are interested in other Open Source Software on z/OS UNIX, have a
|
|
44 look 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
|
|
51 You can find out more information, order a hard copy, or download a PDF
|
|
52 version of these Redbooks at:
|
|
53
|
|
54 http://www.redbooks.ibm.com
|
|
55
|
|
56 ==============================================================================
|
|
57 2. Your feedback is needed *OS390-feedback* *zOS-feedback*
|
|
58
|
|
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
|
|
61 problems.
|
|
62
|
236
|
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
|
7
|
65 missed an ASCII dependency, or it is possible that a new one has been added
|
236
|
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
|
7
|
68 this, feel free to contact us at the email addresses above.
|
|
69
|
|
70 One indication of ASCII/EBCDIC conversion problems is screen corruption with
|
|
71 "unprintable" characters. For example, at one point the errorbell was broken
|
236
|
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
|
7
|
75 character on EBCDIC systems.
|
|
76
|
|
77 Remember, it's only possible to fix a bug if the community knows about it.
|
236
|
78 Don't rely on someone else to report it! See the section |bug-reports|.
|
7
|
79
|
|
80 ==============================================================================
|
|
81 3. Building VIM for z/OS UNIX *OS390-building* *zOS-building*
|
|
82
|
|
83 A word on debugging code first: ~
|
|
84
|
|
85 The normal run of configure adds the flag '-g' to the compiler options,
|
236
|
86 to include debugging information into the executable. This information
|
7
|
87 are normally removed from the executable with the strip command during
|
236
|
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
|
7
|
90 during the installation, but it does nothing. It is equivalent to the
|
236
|
91 'touch' command. This is due to the way debug symbols are stored in the
|
7
|
92 objects generated by the compiler.
|
|
93
|
|
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.
|
|
96 >
|
|
97 export CFLAGS=""
|
|
98
|
|
99
|
|
100 Building without X11: ~
|
|
101
|
236
|
102 Note: Use cc to build Vim. The c89 compiler has stricter syntax checking
|
7
|
103 and will not compile Vim cleanly.
|
|
104
|
|
105 If you build VIM without X11 support, compiling and building is
|
236
|
106 straightforward. Don't forget to export _CC_CCMODE=1 before calling
|
7
|
107 configure 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
|
236
|
117 feature. (David Moore: "Doesn't work _yet_! :-) I'll see what I
|
7
|
118 can do.")
|
|
119 >
|
|
120
|
|
121 $ make install
|
|
122
|
|
123
|
|
124 Building with X11: ~
|
|
125
|
236
|
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
|
7
|
128 statically linked version results in a huge executable (~13MB), while the
|
|
129 dynamically linked executable is much smaller (~4.5MB).
|
|
130
|
|
131 Here 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:
|
236
|
140 Make VIM as described for the static link. Then change the contents of
|
7
|
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
|
|
146 <
|
|
147 Then do: >
|
|
148 $ rm vim
|
|
149 $ make
|
|
150 <
|
|
151 Now Vim is linked with the X11-DLLs.
|
|
152
|
|
153 See the Makefile and the file link.sh on how link.sed is used.
|
|
154
|
|
155 ==============================================================================
|
|
156 4. ASCII/EBCDIC dependent scripts *OS390-has-ebcdic* *zOS-has-ebcdic*
|
|
157
|
236
|
158 For the internal script language the feature "ebcdic" was added. With this
|
7
|
159 you 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 ==============================================================================
|
|
168 5. XTerm problems *OS390-xterm* *zOS-xterm*
|
|
169
|
|
170 Note: This problem was resolved in version 6.1b. ~
|
|
171
|
|
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.
|
|
175
|
|
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 >
|
|
179 :set t_le=^H
|
|
180 <
|
236
|
181 to your .vimrc. Note: '^H' is one character, hit <C-V><C-H> to get it.
|
7
|
182
|
|
183 ==============================================================================
|
|
184 6. Motif Problems *OS390-Motif* *zOS-Motif*
|
|
185
|
|
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
|
|
191 the file browser).
|
|
192
|
|
193 There is no solution for this as of yet.
|
|
194
|
|
195 ==============================================================================
|
|
196 7. 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 ==============================================================================
|
|
203 8. Known weaknesses *OS390-weaknesses* *zOS-weaknesses*
|
|
204
|
|
205 - No binary search in tag files.
|
236
|
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
|
7
|
209 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
|
|
225 Never 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
|
|
236 If you try any of these features and they work, drop us a note!
|
|
237
|
|
238 ==============================================================================
|
|
239 9. Changes *OS390-changes* *zOS-changes*
|
|
240
|
|
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.
|
|
243
|
|
244 6.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:
|
236
|
249 - Changed OS/390 to z/OS where appropriate. IBM decided to rename
|
7
|
250 all of its servers and operating systems. z/OS and OS/390
|
|
251 are the same product, but the version numbering system was
|
236
|
252 reset for the name change (e.g. OS/390 V2R11 == z/OS V1R1).
|
7
|
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.
|
|
257
|
|
258 6.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
|
|
266 6.0q (alpha):
|
|
267 Minor changes for nrformats=alpha (see |'nrformats'|).
|
236
|
268 Problem with hard-coded keycode for the English pound sign. Added a define in
|
7
|
269 ascii.h
|
|
270 Disabled multibyte for EBCDIC in feature.h
|
|
271
|
|
272 6.0f (alpha):
|
236
|
273 First compile of Vim 6 on z/OS UNIX. Some minor changes were needed.
|
7
|
274
|
|
275 Finally found the reason why make from the top level didn't work (I must have
|
236
|
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
|
7
|
278 list, only on z/OS UNIX it evaluates to the last one :-(.
|
|
279
|
|
280 5.6-390d:
|
|
281 Cleaned up some hacks.
|
|
282
|
|
283 5.6-390c:
|
|
284 I grepped through the source and examined every spot with a character
|
236
|
285 involved in a operation (+-). I hope I now found all EBCDIC/ASCII
|
7
|
286 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
|
236
|
298 Ctrl chars where wrong. (Not used on OS/390 UNIX)
|
7
|
299
|
|
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
|
|
307 5.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
|
236
|
314 ICEConnectionNumber work. This is a autoconf problem. OS/390 UNIX
|
7
|
315 needs -lX11 for this.
|
|
316 - Makefile
|
|
317 - Don't include the lib directories ('-L...') into the variable
|
236
|
318 ALL_LIBS. Use own variable ALL_LIB_DIRS instead. A fully POSIX
|
7
|
319 compliant compiler must not accept objects/libraries and options
|
236
|
320 mixed. Now we can call the linker like this:
|
7
|
321
|
|
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
|
|
331 5.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:
|