Here use PLI as example: 2 choices to integete compile results with vim:
.
1. Compile source on Mainframe then use XDC command to save results into dataset or use ftp and site command to fetch result from job's sysout. After this we can reformat result and integrate with vim.
I already introduced that, first use one shell to reformat result that vim can read it, then use vim command to open error file in quickfix window.
2. Compile local file with Rational developer for System z(RDZ), this is much more fast than option 1.
.
Today, I will show you how to compile with RDZ.
.
You can download RDZ from ibm.com for 50 days' trial version. After installation, add X:/Program Files/IBM/SPD/bin/ into enviroment variable PATH. Then you can call pli.exe to compile pli source in command window with this format:
pli.exe file_name.pli (Compile time option
In order to integrate with vim, do the steps bellow:
1. Change $VIMRUNTIME/compiler/pli.vim:
let current_compiler = "pli" “compiler type
CompilerSet makeprg=rdzpli.exe "shell script to call pli.exe and pass compile time option to pli.exe
CompilerSet errorformat=%f.pli(%l:2)/ :/ IBM%nI/ %t/ %m "error message file format
.
2.Create one shell script "rdzpli.sh" and use shc compile as executable file, then move to Cygwin/bin.
So we can call rdzpli to compile pli source:
rdzpli filename or rdzpli -i filename to throw out information level's msg.
pli.exe receive filename as parm and then search for filename.pli to compile, we almost use file without extention file name.
So copy filename to filename.pli then compile it.
/(include /(ext/(/' /',Inc,Cpy/)/) is compile time option pass to pli.exe, this configure copybook file's extention name, and search in sequence: blank, inc and cpy.
.
3. Add one system virable INCLUDE which value is the folder contains copybook. pli.exe search IBM.SYSLIB and then INCLUDE to find copybook.
.
4. Compile: I use the source from multics: www.multicians .org
Use vim open it and edit, then use :make % command, % means current filename.
Vim will call rdzpli.exe in this format: rdzpli.exe <current_filename>, the compilation result will be open in quickfix window automaticlly after compile complete.
Quickfix:
Maybe it's not the best way to compile pli, but it can integrate with vim to locate error position in quickfix then use vim's advantage. Perhaps we can integrate vim with RDZ based on ecplise in the future.
本文介绍如何使用Rational Developer for System z (RDZ) 和 vim 集成编译 PL/I 代码。通过安装 RDZ 并配置环境变量,可以利用 RDZ 的 pli.exe 进行本地编译,并通过自定义 shell 脚本 rdzpli.sh 实现自动化错误定位。最后,在 vim 中设置相应的编译选项和错误格式,即可实现在 vim 中快速查看和定位编译错误。
2888

被折叠的 条评论
为什么被折叠?



