- 论坛徽章:
- 0
|
如果你在5250绿屏上敲命令,F9就可以随时调出历史命令。
如果你想在CLP中跟踪执行命令,你可以参考类似BATCHFTP程序。
如果纯粹是sndpgmmsg,该命令是发送终端提示信息,本身不支持output(*print)参数。其实也没什么意义。
PGM
.....
/*---- BATCH FTP START ------------------------------------*/
SETSVF:
OVRDBF FILE(INPUT) TOFILE(QGPL/BATCHFTP) MBR(FTPCMDS)
OVRDBF FILE(OUTPUT) TOFILE(QGPL/BATCHFTP) MBR(OUT)
FTP RMTSYS('XXX.XXX.XXX.XXX')
DLTOVR FILE(INPUT OUTPUT)
RSTOBJ OBJ(&SRCNAME) SAVLIB(SWIREVER) DEV(*SAVF) +
SAVF(TBASDBLOC/VERSION) RSTLIB(*SAVLIB)
MONMSG MSGID(CPF9999) EXEC(GOTO CMDLBL(ERROR2))
CHGVAR VAR(&SRCNAME) VALUE(' ')
CHGVAR VAR(&ERROR) VALUE(' ')
SNDPGMMSG MSG('BASIS new version batch ftp +
successfully!!!')
GOTO CMDLBL(START)
ERROR1:
...
ERROR2:
...
.....
END:
RETURN
ENDPGM
CLP:FTPCMDS
Columns . . . : 1 71 Browse QGPL/BATCHFTP
SEU==> FTPCMDS
FMT ** ...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7
*************** Beginning of data *************************************
0001.00 USER password
0002.00 CD lib
0003.00 LCD lib
0004.00 BIN
0005.00 GET xxxxx xxxxx (REPLACE
0006.00 QUIT
****************** End of data ***************************************
*
最终程序跑完后,会写进OUT文件里头:
Columns . . . : 1 71 Browse QGPL/BATCHFTP
SEU==> OUT
FMT ** ...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7
0009.00 OS/400 is the remote operating system. The TCP/IP version is "V5R3M0".
0010.00 250 Now using naming format "0".
0011.00 257 "QGPL" is current library.
0012.00 Enter an FTP subcommand.
0013.00 > CD TBASDBLOC
0014.00 250 "TBASDBLOC" is current library.
0015.00 Enter an FTP subcommand.
0016.00 > LCD TBASDBLOC
0017.00 Local working directory is TBASDBLOC
0018.00 Enter an FTP subcommand.
0019.00 > BIN
0020.00 200 Representation type is binary IMAGE.
0021.00 Enter an FTP subcommand.
0022.00 > GET VERSION VERSION (REPLACE
0023.00 227 Entering Passive Mode (192,1,4,18,138,91).
0024.00 150 Retrieving member VERSION in file VERSION in library TBASDBLOC.
0025.00 250 File transfer completed successfully.
F3=Exit F5=Refresh F9=Retrieve F10=Cursor F11=Toggle F12=Cancel
F16=Repeat find F24=More keys |
|