1847845 Members
3470 Online
104021 Solutions
New Discussion

Re: Script Issue

 
Omprakash_2
Frequent Advisor

Script Issue

Hi,

Can any one pls help me to understand what exactly the mentioned script works,

FTPCOPY=/usr/mfgpro/ftpcopy; export FTPCOPY
UID_PASSWD=XXXXXXX/123456; export UID_PASSWD
OUT=/home/yyyyyy/out; export OUT

echo ${1} > $OUT/debug

$FTPCOPY/ftpcopy $OUT/${1} \
$UID_PASSWD@xxx.xx.x.xx:\'WA.AA.MBOX.SEND.ZSNANE61.${1}\'
6 REPLIES 6
Steven Schweda
Honored Contributor

Re: Script Issue

Apparently, it runs "/usr/mfgpro/ftpcopy",
whatever that is, with some arguments,
including one ("${1}") from its command line.
From the looks of things, it uses FTP to copy
a user-specified file to or from some IBM
(MVS?) system.

I see no reason for the various "export"
commands.

Were you looking for a psychic to tell you
exactly what "/usr/mfgpro/ftpcopy" does?
Dennis Handly
Acclaimed Contributor

Re: Script Issue

Actually it is running /usr/mfgpro/ftpcopy/ftpcopy and passing it two parms.
$OUT must be a directory.
Omprakash_2
Frequent Advisor

Re: Script Issue

Hi,

This Script is used to ftp a file to remote server. Its normally done automatically by daily morning 6:45 AM, but for past 4 days its not happened.

I can able to do it manually i.e ftp 123.12.1.12 server.

How can i check ftp service status, and i required few logs related to this.

Can someone suggest me for the same...
Dennis Handly
Acclaimed Contributor

Re: Script Issue

>automatically by daily morning 6:45 AM,

By cron? If so, look at /var/adm/cron/log.

>I can able to do it manually

By using the script?
What's in /home/yyyyyy/out/?
Ganesan R
Honored Contributor

Re: Script Issue

Hi Omprakash,

It seems you have job scheduled in cron to do the ftp transfer from unix to Mainframe server by using the above script.

First thing is you should look into script(probably /usr/mfgpro/ftpcopy/ftpcopy) and find if any log file is defined to captured the script output. Check the log to find what happen when it runs as per the schedule.

If it was running earlier as per schedule and not running now, then you need to check cron. Check cron daemon is running. User should be listed in /var/adm/cron/cron.allow.
cron entry should have altered by someone. Check all these things.

Best wishes,

Ganesh.
Omprakash_2
Frequent Advisor

Re: Script Issue

Thanks i have checked and now its working fine