views:

239

answers:

1

I am trying to ftp a file from unix to as400 and executing iseries command in the script. ftp is working fine,I am getting an error in jobd command as

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. 
A: 

I cannot help thinking since visiting this link that you could be missing this...

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

Should your FTP command script be...

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