Ricky

链接

RSS

RSS Link
VBA中调用Shell执行外部命令并返回结果
Rexx调用ISPF命令

Rexx提交JCL的两种方式

Ricky posted @ 2013年10月29日 16:30 in Other , 3374 阅读

1 生成临时文件并释放到JES:

QUEUE "//FTPFILE  EXEC PGM=FTP,                                     "
QUEUE "//         PARM='hostname (EXIT'                         "
QUEUE "//SYSMDUMP DD   SYSOUT=*                                     "
QUEUE "//SYSPRINT DD   SYSOUT=*                                     "
QUEUE "//INPUT DD *                                                 "
QUEUE "username                                                          "
QUEUE "password                                                       "
QUEUE "cd /dwh                                                      "
QUEUE "prompt off                                                   "
QUEUE "locsite encoding=m                                     "      
QUEUE "locsite mbdataconn=(utf-8,utf-8)                       "      
QUEUE "locsite mbsendeol=LF                                   "      
QUEUE "put 'TSOID."||TNAME"' "||TNAME".txt                 "
QUEUE "quit                                                         "
QUEUE "/*                                                           "
      "ALLOC F(JCL) SYSOUT WRITER(INTRDR) RECFM(F B) LRECL(80)"
      "EXECIO" QUEUED() "DISKW JCL (FINIS"
      "FREE F(JCL)"                   
Return                                                              

这里顺便提一下发送utf-8编码的文件到Unix服务器要设置encoding为m(mbcs)

以及换行符为LF

 

2. 通过JES提交JCL:

QUEUE " JCL STMT"
QUEUE "/*                                                           "
QUEUE 'NN'                                                           
'SUBMIT * END(NN)'                                                   
                                                                     
RETURN                                   

 

第二种方式会将JCL所有字符转换成大写,所以调用FTP命令用第一种适用于用户名和密码对大小写敏感的情况。


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter