|
|
FTP Binary File and Verify
I am trying to write a program to download a binary file from the
mainframe to a pc and verify it. The pc file does not match the
original. Any suggestion would be appreciated.
FILENAME A ' main.report.PDF' DISP=SHR;
FILENAME B FTP 'report.PDF' HOST='my.mainframe.com'
USER='xxxxx' PASS='xxxxx' RECFM=S DEBUG;
* down load binary file*
DATA NULL;
INFILE A;
FILE B;
INPUT;
PUT _INFILE_;
RUN;
*compare it the pc copy to the original mainframe file*;
DATA NULL;
INFILE A _INFILE_=MF;
INPUT;
INFILE B _INFILE_=PC NBYTE=N;
INPUT;
PUT MF=;
PUT PC=;
RUN;
|
|
0
|
|
|
|
Reply
|
bracyr (12)
|
11/2/2006 1:52:12 PM |
|
Hi,
did you use PROC UPLOAD or PROC DOWNLOAD already ??
example:
RSUBMIT;
FILENAME DATA "MAINFRAME.DSNN.TEST" ;
PROC download
infile = data
outFILE="c:\temp\test.txt"
;
run;
ENDRSUBMIT;
Why compare afterwards ??!!!!???
There is also the BINARY option to preserve the bits and bytes !!
Greetz,
Herman
bracyr@gmail.com wrote:
> I am trying to write a program to download a binary file from the
> mainframe to a pc and verify it. The pc file does not match the
> original. Any suggestion would be appreciated.
>
> FILENAME A ' main.report.PDF' DISP=SHR;
>
> FILENAME B FTP 'report.PDF' HOST='my.mainframe.com'
> USER='xxxxx' PASS='xxxxx' RECFM=S DEBUG;
>
> * down load binary file*
>
> DATA NULL;
> INFILE A;
> FILE B;
> INPUT;
> PUT _INFILE_;
> RUN;
>
> *compare it the pc copy to the original mainframe file*;
>
> DATA NULL;
> INFILE A _INFILE_=MF;
> INPUT;
> INFILE B _INFILE_=PC NBYTE=N;
> INPUT;
> PUT MF=;
> PUT PC=;
> RUN;
|
|
0
|
|
|
|
Reply
|
hejacobs (85)
|
11/2/2006 2:01:41 PM
|
|
I need to compare in case the FTP fails. I am going to put this in
loop and keep sending the file until it is verified or times out.
Thanks for the tip on proc download and upload.
|
|
0
|
|
|
|
Reply
|
bracyr (12)
|
11/2/2006 2:25:38 PM
|
|
A solution is to compare the original mainframe file by reading it
through the mainframe's FTP server. Filename A and C are the some
file if filename B equals C then the download was successful.
FILENAME A 'ADRP.REPORT.PDF' DISP=SHR;
FILENAME B FTP '\EMITS\REPORT.PDF' HOST='XX.X.XXX.223'
USER='XXXX' PASS='XXXXX' RECFM=S DEBUG;
* SEND BINARY PDF TO THE PC *';
DATA NULL;
INFILE A;
FILE B;
INPUT;
PUT _INFILE_;
RUN;
FILENAME C FTP "'ADRP.REPORT.PDF'"
HOST='XXXXXXX.XXXXX.XXX.XXX'
USER='XXXX' PASS='XXXXXXX' RECFM=S DEBUG;
*COMPARE THE PC COPY VIA FTP TO THE MAINFRAME COPY VIA FTP*;
DATA NULL;
INFILE B _INFILE_=PC RECFM=S NBYTE=N;
INPUT;
INFILE C _INFILE_=MF RECFM=S NBYTE=N;
INPUT;
IF PC NE MF THEN PUT '!!!!PC PDF DOES NOT MATCH MF PDF!!!!';
RUN;
|
|
0
|
|
|
|
Reply
|
bracyr (12)
|
11/14/2006 8:24:27 PM
|
|
|
3 Replies
45 Views
(page loaded in 0.391 seconds)
Similiar Articles: Detect end-of-file of Binary file - comp.unix.programmer ...Hi All, I want to transfer the binary file over the network using tcp socket. ... options are: 1) Use a dedicated socket connection for the transfer (like ftp ... gnuplot data.txt file with CR+LF - comp.graphics.apps.gnuplot ...FTP LF/CR Problem - comp.sys.unisys How to FTP Text files to UNIX without CR/LF: ftp ... This must not be used on binary files. Usually binary files and text files ... Save file not created via FTP but a PF - comp.sys.ibm.as400.misc ...... that can read & write the 528-byte records in binary more ... object netURL_obj ... computers connected via the File Transfer Protocol (FTP ... ... If I make a save file ... EBCDIC packed fields conversion - comp.unix.programmerI have a need to generate an EBCDIC file on a Unix platform to FTP up to a mainframe. The file ... You will have to distinguish text encoded in EBCDIC and binary data ... root CA certificates for wget/openssl - comp.unix.solaris ...Solaris 10 comes with a wget binary which is linked ... of downloaded ISO images for the OS the verification of the ... pretty > nifty solution using wget -i, a temp file ... FTP: lost connection while transfering multiple files - comp.unix ...... of any incomplete files at the point of failure (binary ... Transferring Files Between Computers with FTP... files between computers connected via the File Transfer Protocol ... IDL Error GCPC data - comp.lang.idl-pvwaveAt the > > end no output file is generated, I'm expecting to read a binary file ... ftp put file on windows using IDL - comp.lang.idl-pvwave ... IDL Error GCPC data ... Sending many files attachment with mailx - comp.unix.solaris ...... schily.blogspot.com/ URL: http://cdrecord.berlios.de/old/private/ ftp ... lang.python Hi there, Using Python 3.1.2 I am having a problem sending binary attachment files ... sftp (authenticity can't be established) - comp.unix.shell ...I am trying to using sftp to transfer a file source ... to continue connecting (yes/no)? no Host key verification ... phartman@diamond <<EOF > > =A0 cd /tmp > > =A0 binary ... Accessing vxWorks FTP server via MFC - comp.os.vxworksHello, I have an vxWorks (5.4.2) FTP server running. I want to transfer a file to that server, but ... GetErrorMessage returns "200 > Type set to I, binary mode 200 ... Ftp: binary - Microsoft Corporation: Software, Smartphones, Online ...To verify infrared support on a computer ... Ftp supports both ASCII and binary image file transfer types. You should use binary when transferring ... ftp - Linux Command - Unix Command - Linux Operating System and ...... File Transfer Protocol. The program allows a user to transfer files ... file If interactive prompting is on, ftp will prompt the user to verify that ... files. ftp> binary ... 7/25/2012 3:16:37 PM
|
|
|
|
|
|
|
|
|