View previous topic :: View next topic
|
Author |
Message |
rulerofera
New User
Joined: 03 Jun 2008 Posts: 30 Location: India
|
|
|
|
Following is sysout for my FTP step;
701I >>> USER xxxxxxx
Password required for xxxxxxx
789I PASSWORD:
701I >>> PASS
User xxxxxx logged in.
460I Command:
736I SI SBD=(IBM-037,ISO8859-1)
701I >>> SITE SBD=(IBM-037,ISO8859-1)
'SITE SBD=(IBM-037,ISO8859-1)': command not understood.
460I Command:
736I cd /folder1/folder2
701I >>> CWD /folder1/folder2
CWD command successful.
460I Command:
736I pwd
701I >>> PWD
If you see the execution related to SI command, the system was not able to understand the command, but it was successfully able to interpret SI as SITE command.
Could you please point out error in here. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Try
Code: |
quote site sbd=(ibm-037,iso8859-1) |
as not all FTP servers and clients understand the site command. They should all recognize the quote, however, and pass on the data as is. |
|
Back to top |
|
|
rulerofera
New User
Joined: 03 Jun 2008 Posts: 30 Location: India
|
|
|
|
I tried as you said and its still not working;; please see ftp log below
460I Command:
736I quote site sbd=(ibm-037,iso8859-1)
701I >>> site sbd=(ibm-037,iso8859-1)
'SITE SBD=(IBM-037,ISO8859-1)': command not understood.
735I Std Return Code = 30500, Error Code = 00002
701I >>> QUIT
You have transferred 0 bytes in 0 files.
Total traffic for this session was 270 bytes in 0 transfers.
Thank you for using the FTP service on xxxxxxxxxx.
Goodbye.
Is its something to do with what type of server we are executing the command on, like, does SITE command work on both UNIX and WINDOWS server, any clue ? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
What is the FTP server on the other end of the connection -- z/OS, Unix, Windows, or something else? |
|
Back to top |
|
|
rulerofera
New User
Joined: 03 Jun 2008 Posts: 30 Location: India
|
|
|
|
I am connecting to UNIX ftp server. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
SBD is specific to z/OS FTP -- it is not standard FTP. You need to find out what, if any, support the Unix server has for code page conversions. You may have to do the code page conversion on the mainframe and transfer the converted file in binary to the Unix server. |
|
Back to top |
|
|
rulerofera
New User
Joined: 03 Jun 2008 Posts: 30 Location: India
|
|
|
|
Thanks a lot Robert for responding and for your suggestions.
OK, now as you suggested to do code page conversion on Mainframe side, I created and ran a job using EDCICONV utility for converting from code IBM-037 to ISO8859-1.
But converted dataset looks to be all messed up and its not readable at all.
This is the JCL I created
//EDCICONV EXEC PGM=EDCICONV,
// PARM=('FROMCODE(IBM-277),TOCODE(ISO8859-1)')
//SYSUT1 DD DSNAME=XXXXXTT.TEST.FIRST1,DISP=SHR
//SYSUT2 DD DSNAME=XXXXXTT.TEST.FINAL,
// DISP=(,CATLG,DELETE),
// LIKE=XXXXXTT.TEST.FIRST1
//SYSPRINT DD SYSOUT=*
I was expecting some ASCII readable data in o/p dataset in sysut2 file. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Look at the output dataset in hex. . . . You should see ASCII sharacters.
If there is confusion, post the first few records in hex here. Use copy/paste and the "Code" tag. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
But converted dataset looks to be all messed up and its not readable at all. |
ASCII will appear to be messed up and cannot be read on an EBCDIC mainframe. You will need to transfer the data in binary since it has already been converted. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
on the later versions of ISPF, there is a command while in BROWSE mode that will convert UFT-8 (I know it is not ascii) to ebcdic.
maybe there is an option for ascii, also. |
|
Back to top |
|
|
rulerofera
New User
Joined: 03 Jun 2008 Posts: 30 Location: India
|
|
|
|
ok,
here's my orginal dataset
Code: |
4352182002DIGSLSNNNNYY DIGD GM6SDANB Z
4352017002RETAILNNNNYN CHICGOGM6XRETL
5489300001DFS NNNNYY CHIPLBC24LCEDR
7069593002LEASAMNNNNYY DANKRG1201CEDR
3438808002TRANAMNNNNYY CITIVDM058CANA
|
and here's the converted one
Code: |
àñåë<ë++++ßß àñåà å( ëà +â !
êáè ñ<++++ß+ äçñäå|å( ìêáè< b
àãë ++++ßß äçñ&<âä <äáàê
<á ë (++++ßß à +.êå äáàê
èê + (++++ßß äñèñîà( ä +
|
How is this suppose to be compared ? |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
If you would display the converted one in hex, it would be much clearer.
Note that the 'Z' on the original has been converted to an '!'.
Note also that a capital Z in ascii is a X'5A' which is the '!' in ebcdic.
Note that proves a conversion has occurred. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I could swear we've already been through this in another similar topic started by the O/P ... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Now, do as requested and post the "output" in hex. . . |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
Back to top |
|
|
rulerofera
New User
Joined: 03 Jun 2008 Posts: 30 Location: India
|
|
|
|
Quote: |
ASCII will appear to be messed up and cannot be read on an EBCDIC mainframe. You will need to transfer the data in binary since it has already been converted.
|
Thanks Robert, this essentially answered all my questions, and I have finally decided to stick with BINARY transfer mode during FTP and then perform code conversion at mainframe side.
Thanks everybody else for your suggestions.
Now, there's something else, when I am getting file from UNIX in binary mode the records simply flow one after other on same row, while if I implement ASCII transfer each record takes up single row, which is what I am looking for.
So I tried few things to make BINARY mode display record just like ASCI mode does, for which I used LOCSITE WRAPRECORD TRUE/FLASE option while getting file but the record layout hardly changes, it's still same - freeflowing format.
Is there any other option to use during BINARY transfer to keep record layout intact at receiving side. |
|
Back to top |
|
|
rulerofera
New User
Joined: 03 Jun 2008 Posts: 30 Location: India
|
|
|
|
Yes, you are right, Dick.
Infact, I would rather say, that was very early period for me, when I was trying different things and that being one of those many things, which ultimately doesn't seemed to yield valid and accepted results. So I had to scrap that and go on looking for another approach, which is why we are on this thread.
Thanks a lot for all your suggestions so far. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
Is there any other option to use during BINARY transfer to keep record layout intact at receiving side. |
As far as FTP is concerned for a binary transfer, an MVS file does not have records and blocks -- each block is a record. If you look in the Communications Server User's Guide manual, there are a number of options that can impact how data is sent for a binary transfer -- RDW option and the MODE and TYPE commands being a few of them. However, since mainframe file structures are fundamentally incompatible with Unix file structures, you may have to make some decisions about how to handle the data since binary transfers are more tied to the file structure. I strongly recommend you read up on binary transfers and the various options and commands in the User's Guide. |
|
Back to top |
|
|
|