troubleshooting Question

How to pull in binnary from a mainframe using Direct Connect

Avatar of HIONSPD
HIONSPD asked on
Unix OSShell Scripting
11 Comments1 Solution4851 ViewsLast Modified:
Hey Guys,

A Direct Connect question:
I’m writing a script to pull a file from a mainframe in binary mode but I don’t know were within connect direct add the parameters to convert the file in to binary mode …any ideas…?
Thanks for your help..!!!  


 more MF_Pull.ksh
#!/bin/ksh
# Created by XXXXXXXX XXX  
# Purpose: Pull a file from XXXXXXXX
# This script invokes the Connectirect UNIX CLI
# and submits a process inline to copy a file to a remote
# node.

#       1. Source folder )>
#       2. Source file
#       3. Target folder $XXXX
#       4. Target file
#       5. The Target connect direct node.
#

#       Get Parameters for pull file

dol=$
ofile=$2
sodir=$1
rnode=$5
ifile=$4
tidir=$3

log=/nfsshare/autosys/qa1/out/`date "+%y%m%d%H%M"`_MF_Pull$rnode.log

sdir=`eval echo $sodir`
tdir=`eval echo $dol$tidir`

#sfile=$sdir/$ofile
sfile=$ofile
tfile=$tdir/$ifile

echo source file is $sfile > $log
echo destination file is $tfile >> $log
echo source node is $rnode >> $log

#lset -lset -vvILCODE.EXTRACT.S1S
/opt/cdunix/ndm/bin/ndmcli  -x << EOJ
submit hold=no maxdelay=0 proc1    process    snode=$rnode
       step1    copy from  (file=$sfile snode)
               ckpt = 5M compress = extended
           to   (file=$tfile pnode disp = rpl)
pend ;
EOJ

status=$?

echo Status is $status >> $log
if [ $status -ne 0 ]
then
        echo Transmission of $sfile to $tfile from $rnode FAILED >> $log
        exit $status
else
        echo $sfile pulled to $tfile from $rnode >> $log
        exit 0
fi

ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros