在qshell里运行cobol程序的输出问题
(2011-12-23 06:02:25)
标签:
程序
杂谈
在qshell里运行cobol程序的输出问题我是一个标准的cobol+as400的菜鸟。。最近的一个项目的porting,要把cobol程序移植到40
gucci香水 insert or selected delete
with the DB2/400 database. To achieve this, we use roundabout ways
such as RUNSQLSTM, writing new RPG program, etc.
Qshell makes life easier by using the following command:
Syntax: QSH CMD('db2 "
statement">)
Example:
QSH CMD('db2 "UPDATE MYLIB.MYFILE SET MYFLD =
''P''" ')
QSH CMD('db2 "INSERT INTO MYLIB.MYTABLE
VALUES(''jagannath''http://www.yzbcdq.com,
104.20)"')
Things to note:
Usage for IFS operation
It is always a headache to handle IFS files using RPG programs. We
have to write separate RPG programs using C APIs to handle this
functionality. But QShell commands ease this process.
Syntax:
To replace the contents of the IFS and write the fresh text
QSH CMD('print It is working >
/home/mydir/myfile.txt')
To append to the contents of the IFS file in next line
QSH CMD('print It is working >>
/home/mydir/myfile.txt')
分享:
喜欢
0
赠金笔
加载中,请稍候......
评论加载中,请稍候...
发评论
登录名: 密码: 找回密码 注册记住登录状态
昵 称:
评论并转载此博文
发评论
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。