Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Issue with SITE command in FTP

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: Issue with SITE command in FTP
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: 7904
Location: Bellevue, IA

PostPosted: Thu Jun 10, 2010 6:22 pm    Post subject:
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    Post subject:
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: 7904
Location: Bellevue, IA

PostPosted: Thu Jun 10, 2010 7:26 pm    Post subject:
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    Post subject:
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: 7904
Location: Bellevue, IA

PostPosted: Thu Jun 10, 2010 7:51 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Thu Jun 10, 2010 9:24 pm    Post subject:
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: 7904
Location: Bellevue, IA

PostPosted: Thu Jun 10, 2010 9:27 pm    Post subject:
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    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Thu Jun 10, 2010 9:46 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Thu Jun 10, 2010 9:57 pm    Post subject: Reply to: Issue with SITE command in FTP
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

Site Director


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

PostPosted: Fri Jun 11, 2010 12:23 am    Post subject:
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

Site Director


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

PostPosted: Fri Jun 11, 2010 12:26 am    Post subject:
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".

http://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    Post subject:
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    Post subject:
Reply with quote

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

http://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: 7904
Location: Bellevue, IA

PostPosted: Fri Jun 11, 2010 6:10 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts DFHRESPONSE returns issue divated CICS 3 Wed Nov 02, 2016 6:32 pm
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm
No new posts SDSF Command Avtrix CLIST & REXX 4 Fri Sep 30, 2016 11:13 am
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us