A Mainframe IDE Powered By Unix Technology [12] - Integrate submit JCL and compile with Vim
2010-05-28 21:36
393 查看
For integrate submit JCL and compile with Vim, we need some pre-works:
1. One shell script: use ftp and site command to submit JCL to jes, we call it ftpwj.sh, JCL file name is passed as parameter.
2. One shell script: generate JCL for compile programs, the compile mode and program name can be passed to shell as parameters. We call it comp2jes.sh
Use shc compile the two scripts to executable files, and move them to folder which in $PATH.
Now we can use vim's scirpt to call these executable files to submit JCL or compile programs:
Submit JCL:
1
function
! SubmitJCL(
...
)
"{{{
2
if
&ft==
"jcl"
3
let
s:sourceFile=
substitute
(
expand
(
"%"
)
,"
//
"
,"/"
,"g"
)
4
else
5
echohl
ErrorMsg
| echo
"Not a JCL file"
|
echohl
NONE
6
return
7
endif
8
if
a:0
==
1
9
let
s:siteSys =
a:1
10
if
s:siteSys ==
"w"
11
exec
"silent !ftpwj put "
.
s:sourceFile
12
elseif
s:siteSys ==
"q"
13
exec
"silent !ftpqj put "
.
s:sourceFile
14
endif
15
else
16
exec
"silent !ftpwj put "
.
s:sourceFile
17
endif
18
endfunction
"}}}
JCL file is the parameter passed to function SubmitJCL and then passed to ftpwj.exe, ftpwj.exe will put it to JES.
ftpqj is another application like ftpwj, they can send JCL to diffrent server.
Compile programs:
20
function
! CompFile(
...
)
"{{{
21
if
&ft==
"pli"
22
let
s:sourceFile=
substitute
(
expand
(
"%"
)
,"
//
"
,"/"
,"g"
)
23
else
24
echohl
ErrorMsg
| echo
"Not a source file"
|
echohl
NONE
25
return
26
endif
27
if
a:0
==
1
28
let
s:sourceType =
a:1
29
call
FtpMput
()
30
if
s:sourceType ==
"bat"
31
exec
"!comp2jes "
.
s:sourceFile .
" BAT"
32
elseif
s:sourceType ==
"onl"
33
exec
"!comp2jes "
.
s:sourceFile .
" ONL"
34
endif
35
else
36
echohl
ErrorMsg
| echo
"Parameter needed"
|
echohl
NONE
37
endif
38
endfunction
"}}}
BAT or ONL is the compilation mode as parm transfer to comp2jes.
Program name also is one parm. Here call FtpMput function to transfer source to server then compile.
1. One shell script: use ftp and site command to submit JCL to jes, we call it ftpwj.sh, JCL file name is passed as parameter.
2. One shell script: generate JCL for compile programs, the compile mode and program name can be passed to shell as parameters. We call it comp2jes.sh
Use shc compile the two scripts to executable files, and move them to folder which in $PATH.
Now we can use vim's scirpt to call these executable files to submit JCL or compile programs:
Submit JCL:
1
function
! SubmitJCL(
...
)
"{{{
2
if
&ft==
"jcl"
3
let
s:sourceFile=
substitute
(
expand
(
"%"
)
,"
//
"
,"/"
,"g"
)
4
else
5
echohl
ErrorMsg
| echo
"Not a JCL file"
|
echohl
NONE
6
return
7
endif
8
if
a:0
==
1
9
let
s:siteSys =
a:1
10
if
s:siteSys ==
"w"
11
exec
"silent !ftpwj put "
.
s:sourceFile
12
elseif
s:siteSys ==
"q"
13
exec
"silent !ftpqj put "
.
s:sourceFile
14
endif
15
else
16
exec
"silent !ftpwj put "
.
s:sourceFile
17
endif
18
endfunction
"}}}
JCL file is the parameter passed to function SubmitJCL and then passed to ftpwj.exe, ftpwj.exe will put it to JES.
ftpqj is another application like ftpwj, they can send JCL to diffrent server.
Compile programs:
20
function
! CompFile(
...
)
"{{{
21
if
&ft==
"pli"
22
let
s:sourceFile=
substitute
(
expand
(
"%"
)
,"
//
"
,"/"
,"g"
)
23
else
24
echohl
ErrorMsg
| echo
"Not a source file"
|
echohl
NONE
25
return
26
endif
27
if
a:0
==
1
28
let
s:sourceType =
a:1
29
call
FtpMput
()
30
if
s:sourceType ==
"bat"
31
exec
"!comp2jes "
.
s:sourceFile .
" BAT"
32
elseif
s:sourceType ==
"onl"
33
exec
"!comp2jes "
.
s:sourceFile .
" ONL"
34
endif
35
else
36
echohl
ErrorMsg
| echo
"Parameter needed"
|
echohl
NONE
37
endif
38
endfunction
"}}}
BAT or ONL is the compilation mode as parm transfer to comp2jes.
Program name also is one parm. Here call FtpMput function to transfer source to server then compile.
相关文章推荐
- A Mainframe IDE Powered By Unix Technology [16] - Compile local file with Rational Developer for System z
- A Mainframe IDE Powered By Unix Technology [11] - Submit JCL from ftp command or shell script
- Step by Step Setup Git Server on Windows with CopSSH + msysGit and Integrate Git with Visual Studio
- Step by Step Setup Git Server on Windows with CopSSH + msysGit and Integrate Git with Visual Studio
- Step by Step Setup Git Server on Windows with CopSSH + msysGit and Integrate Git with Visual Studio
- [Unix] Make VIM as a powerful C++ IDE
- [TypeScript] Configuring TypeScript Which Files to Compile with "Files" and "OutDir"
- Coping With Labor Scarcity in Information Technology: Strategies and Practices for Effective Recruit
- A Fast and Scalable Web Platform by Extending NGINX with Lua
- Cool Tips and Tricks with ASP.NET 2.0 posted by Scott
- Openstack Integration with VMware vCenter by Devstack and Opencontrail
- dotfiles for linux/unix users automatically! (python Vim IDE)
- How to build monitoring system with Face Recognization by HTC Hero、VideoLAN and EmguCV.
- Dowload and compile android source code implemented by qualcomm
- 如何使用MySQL Joins and More ORDER BY With LIMIT
- SELECT list is not in GROUP BY clause and contains nonaggregated column this is incompatible with sql_mode=only_full_group_by
- Create Spring MVC dynamic web project with Maven and make it support Eclipse IDE
- Non-rigid Registration of Images with Geometric and Photometric Deformation by Using Local Affine Fo
- compile vim and patch vimgdb
- Exception in thread "main" java.lang.Error: Always run main and tests with assertions enabled