IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Issue with SITE command in FTP


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rulerofera

New User


Joined: 03 Jun 2008
Posts: 30
Location: India

PostPosted: Thu Jun 10, 2010 6:12 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jun 10, 2010 6:22 pm
Reply with quote

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
View user's profile Send private message
rulerofera

New User


Joined: 03 Jun 2008
Posts: 30
Location: India

PostPosted: Thu Jun 10, 2010 6:49 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jun 10, 2010 7:26 pm
Reply with quote

What is the FTP server on the other end of the connection -- z/OS, Unix, Windows, or something else?
Back to top
View user's profile Send private message
rulerofera

New User


Joined: 03 Jun 2008
Posts: 30
Location: India

PostPosted: Thu Jun 10, 2010 7:47 pm
Reply with quote

I am connecting to UNIX ftp server.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jun 10, 2010 7:51 pm
Reply with quote

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
View user's profile Send private message
rulerofera

New User


Joined: 03 Jun 2008
Posts: 30
Location: India

PostPosted: Thu Jun 10, 2010 9:20 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jun 10, 2010 9:24 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jun 10, 2010 9:27 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jun 10, 2010 9:31 pm
Reply with quote

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
View user's profile Send private message
rulerofera

New User


Joined: 03 Jun 2008
Posts: 30
Location: India

PostPosted: Thu Jun 10, 2010 9:31 pm
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Jun 10, 2010 9:46 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Jun 10, 2010 9:57 pm
Reply with quote

I could swear we've already been through this in another similar topic started by the O/P ...
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jun 11, 2010 12:23 am
Reply with quote

Hello,

Now, do as requested and post the "output" in hex. . .
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jun 11, 2010 12:26 am
Reply with quote

Hi Kevin,
Quote:

I could swear we've already been through this in another similar topic started by the O/P ...

Maybe here. . .? Same idea "going the other way".

ibmmainframes.com/viewtopic.php?p=237929&highlight=#237929
Back to top
View user's profile Send private message
rulerofera

New User


Joined: 03 Jun 2008
Posts: 30
Location: India

PostPosted: Fri Jun 11, 2010 5:11 pm
Reply with quote

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
View user's profile Send private message
rulerofera

New User


Joined: 03 Jun 2008
Posts: 30
Location: India

PostPosted: Fri Jun 11, 2010 5:20 pm
Reply with quote

Quote:
Maybe here. . .? Same idea "going the other way".

ibmmainframes.com/viewtopic.php?p=237929&highlight=#237929

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Jun 11, 2010 6:10 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Sysplex System won't IPL at DR site I... All Other Mainframe Topics 2
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
Search our Forums:

Back to Top