`
richiewu
  • 浏览: 33796 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
文章分类
社区版块
存档分类
最新评论

A Mainframe IDE Powered By Unix Technology [16] - Compile local file with Rational Developer for System z

 
阅读更多

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.

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics