HIONSPD
asked on
How to pull in binnary from a mainframe using Direct Connect
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$rno de.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
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/
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
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
Sorry for the delay, I'll test this option and I'll let you know..
Thanks
Thanks
ASKER
Receiving the following error:
$SCRIPTDIR/MF_Pull.ksh MPDP.MAILCODE.EXTRACT.S1S. G3339V00 MPDP.MAILCODE.EXTRACT.S1S. G3339V00 STGAMER MAILCODEEXTRACT.txt ndm1s
************************** ********** ********** ********
* *
* Connect:Direct for UNIX *
* *
*------------------------- ---------- ---------- -------*
* Copyright (c) 1992, 2006 Sterling Commerce, Inc. *
* Version 3.8.00 *
************************** ********** ********** ********
Enter a ';' at the end of a command to submit it. Type 'quit;' to exit CLI.
Direct> submit hold=no maxdelay=0 proc1 process snode=ndm1s
step1 copy from (file='MPDP.MAILCODE.EXTRA CT.S1S.G33 39V00' snode)
ckpt = 5M compress = extended
to (file=/nfsshare/Interface/ Stage/amer icas/MAILC ODEEXTRACT .txt pnode disp = rpl)
pend ;
**** Error returned...
XPAE003I Return Code: 8 Feedback: 0
:&KEYWD='MPDP.MAILCODE.EXT RACT.S1S.G 3339V00':
XPAM001I Return Code: 8 Feedback: 0
Errors Parsing
Direct>
Connect:Direct CLI Terminated...
any ideas...?
$SCRIPTDIR/MF_Pull.ksh MPDP.MAILCODE.EXTRACT.S1S.
**************************
* *
* Connect:Direct for UNIX *
* *
*-------------------------
* Copyright (c) 1992, 2006 Sterling Commerce, Inc. *
* Version 3.8.00 *
**************************
Enter a ';' at the end of a command to submit it. Type 'quit;' to exit CLI.
Direct> submit hold=no maxdelay=0 proc1 process snode=ndm1s
step1 copy from (file='MPDP.MAILCODE.EXTRA
ckpt = 5M compress = extended
to (file=/nfsshare/Interface/
pend ;
**** Error returned...
XPAE003I Return Code: 8 Feedback: 0
:&KEYWD='MPDP.MAILCODE.EXT
XPAM001I Return Code: 8 Feedback: 0
Errors Parsing
Direct>
Connect:Direct CLI Terminated...
any ideas...?
Where do the single qoutes ( ' ... ' ) around the "from" filename come from? I think they're wrong!
And where has the new "sysopts=..." statement gone?
wmp
And where has the new "sysopts=..." statement gone?
wmp
ASKER
Here is the output again:
$SCRIPTDIR/MF_Pull.ksh MPDP.MAILCODE.EXTRACT.S1S. G3339V00 MPDP.MAILCODE.EXTRACT.S1S. G3339V00 STGAMER MAILCODEEXTRACT.txt ndm1s
************************** ********** ********** ********
* *
* Connect:Direct for UNIX *
* *
*------------------------- ---------- ---------- -------*
* Copyright (c) 1992, 2006 Sterling Commerce, Inc. *
* Version 3.8.00 *
************************** ********** ********** ********
Enter a ';' at the end of a command to submit it. Type 'quit;' to exit CLI.
Direct> submit hold=no maxdelay=0 proc1 process snode=ndm1s
step1 copy from (file=MPDP.MAILCODE.EXTRAC T.S1S.G333 9V00 snode
sysopts=":datatype=binary: strip.blan ks=no:")
ckpt = 5M compress = extended
to (file=/nfsshare/Interface/ Stage/amer icas/MAILC ODEEXTRACT .txt pnode disp = rpl
sysopts=":datatype=binary: strip.blan ks=no:")
pend ;
Process Submitted, Process Number = 3408
Return code = 8
Message id = XCMM041I
Direct>
Connect:Direct CLI Terminated...
Thanks
$SCRIPTDIR/MF_Pull.ksh MPDP.MAILCODE.EXTRACT.S1S.
**************************
* *
* Connect:Direct for UNIX *
* *
*-------------------------
* Copyright (c) 1992, 2006 Sterling Commerce, Inc. *
* Version 3.8.00 *
**************************
Enter a ';' at the end of a command to submit it. Type 'quit;' to exit CLI.
Direct> submit hold=no maxdelay=0 proc1 process snode=ndm1s
step1 copy from (file=MPDP.MAILCODE.EXTRAC
sysopts=":datatype=binary:
ckpt = 5M compress = extended
to (file=/nfsshare/Interface/
sysopts=":datatype=binary:
pend ;
Process Submitted, Process Number = 3408
Return code = 8
Message id = XCMM041I
Direct>
Connect:Direct CLI Terminated...
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
MESSAGE ID==> XCMM041I
MODULE ==> nucmsu00
========================== ========== ========== ========== ==========
SHORT TEXT==> The process is on Hold queue with HE status.
LONG TEXT:
LINE 1 ==> The process is on Hold queue with HE
LINE 2 ==> (Held due to Error) status.
LINE 3 ==>
LINE 4 ==> SYSTEM ACTION: The process completed with error.
.....???
MODULE ==> nucmsu00
==========================
SHORT TEXT==> The process is on Hold queue with HE status.
LONG TEXT:
LINE 1 ==> The process is on Hold queue with HE
LINE 2 ==> (Held due to Error) status.
LINE 3 ==>
LINE 4 ==> SYSTEM ACTION: The process completed with error.
.....???
ASKER
hint for you...
ndmmsg -f /opt/cdunix/ndm/cfg/****SE RVER_NAME* ***/msgfil e.cfg XCMM041I
ndmmsg -f /opt/cdunix/ndm/cfg/****SE
ASKER
but im not sure what does that mean yet...
Since the job was successfully submitted to the Dispatch queue to then be placed on the Hold queue I still assume that it's syntactically correct but that there's some required resource missing.
- Input file present? Access permissions correct?
- Node names OK?
- Do you have access to the job log?
- Input file present? Access permissions correct?
- Node names OK?
- Do you have access to the job log?
ASKER
Thank You
/opt/cdunix/ndm/bin/ndmcli
submit hold=no maxdelay=0 proc1 process snode=$rnode
step1 copy from ( file=$sfile snode
sysopts=":datatype=binary:
ckpt = 5M compress = extended
to ( file=$tfile pnode disp = rpl
sysopts=":datatype=binary:
pend ;
EOJ
wmp