2010-03-13 169 views
0

我想從ftp文件從unix到as400並在腳本中執行iseries命令。 FTP工作正常,我得到的JOBD命令是錯誤的作爲使用Iseries命令的Unix shell腳本

HOST=KCBNSXDD.svr.us.bank.net 
USER=test    
PASS=1234   #This is the password for the FTP user. 
ftp -env $HOST << EOF 
# Call 2. Here the login credentials are supplied by calling the variables. 
user $USER $PASS 
# Call 3. Here you will change to the directory where you want to put or get 
cd "\$QARCVBEN" 
# Call4. Here you will tell FTP to put or get the file. 
#Ebcdic 
#Mode b 
quote site crtccsid *user 
quote site crtccsid *sysval 
put prod.txt 
quote rcmd sbmjob cmd(call pgm(pmtiprcc0) parm('prod' 'DEV')) job(\$pmtiprcc) jobd(orderbatch) 
 
550-Error occurred on command SBMJOB cmd(call pgm(pmtiprcc0)) job($pmtiprcc) jobd(orderbatch). 
550 Errors occurred on SBMJOB command.. 
221 QUIT subcommand received. 
+0

既然你是新來的,歡迎來到StackOverflow。我編輯了你的問題,以包含在pre標籤中的相關部分......以便閱讀...... – t0mm13b 2010-03-13 17:53:25

回答

0

我幫不了,因爲訪問這個link,你可能會錯過本想......

 
QUOTE RCMD OS/400 CL command | program [parameter1, parameter2, . . .parameterx] (Remote Command) 

應該你的FTP命令腳本是...

 
quote os/400 cl sbmjob cmd(call pgm(pmtiprcc0) parm('prod' 'DEV')) job(\$pmtiprcc) jobd(orderbatch)