SITE Commands:
Introduction:

This page discusses in detail the SITE commands implemented by this server.
You can issue the SITE command to:

  
Set or override streams.
   Set or override end of record code.
   Set or override translation Tables.
   Set or override VSE data set attributes.



Site Commands may produce undesirable side effects ....BEWARE!!!!
Set or override streams:

The default transfer mode (or stream) is ASCII (i.e., CTL_FTPC_STREAM = ASCII).  The admin may choose an explicit stream by coding CTL_FTPC_STREAM.  However, the client can override this mode. To successfully override the mode, you have to issue two, not one, commands as follows:










Note:

The stream for LIBR members whose types are listed in FTP_LIBR_MEM_TYPE is locked to binary mode.
There is no way for the client to override this behavior.
1. Issue the typical mode-setting command such as IMMAGE, BINARY, ASCII or EBCDIC. This actually just alerts the
    client should it need such awareness. Generally, IBM mainframe-based clients do need to be aware.
    ASCII HOST-based clients, on the other hand,  normally assume that IMMAGE and ASCII are one and the same!!!
   

2. Issue the Server�s SITE STREAM = IMMAGE, BINARY, ASCII or EBCDIC as per your need.

Set or override end of record code:

Ends of record code(s) are unconditionally, i.e., blindly, added by the server even for binary transfers. If the Admin does not code CTL_FTPC_END_OF_REC, or if coded or overridden (by the client) with an invalid value, then the following occurs:

ASCII transfers:       Add Carriage return and Line Feed at the end of each logical record.
EBCDIC transfers:   adds one EBCDIC end-of-line code.
Binary Transfer:      Adds absolutely nothing. 

Therefore, as you see, you really should not override CTL_FTPC_END_OF_REC in the first place.  However, if you need more control, then you may override it as follows:

SITE END_OF_REC = BOTH:

    The server blindly adds Both ASCII carriage return and Line feed to each record, even if it is in BINARY or EBCDIC mode.

SITE END_OF_REC = LF:

    The server blindly adds a single ASCII Line feed to each record, even if it is in binary or EBCDIC mode.

SITE END_OF_REC = CR:

    The server blindly adds a single ASCII Carriage Return to each record, even if it is in EBCDIC or binary mode.

SITE END_OF_REC = NEWLINE

    The server blindly adds one EBCDIC, NEWLINE, code even if it is in ASCII or Binary mode.
Set or override Translation Tables. 

By default, the Server uses table one (1) for translation. You can, however, tell the server to use VSE�s own translation tables, or table zero (0), if you wish.  The advantage of using table 1 is that the Admin has access to it and may change/modify it easily by using A2E or E2A global statements.

At any rate, to use VSE�s own tables, issue SITE TABLE = 0 and to use the server�s own table issue SITE TABLE = 1
Set or override VSE Data Set Attributes.

Most attributes, other than DSNAME, can be "filled in" or "changed"  via the SITE command.


The following is a complete list of all SITE commands you can use in order to modify VSE�s data set attributes:

SITE Command ..                          Modifies                                          Overrides/sets
------------------------------------         -----------------------------------------    ------------------------------------------------

RECFORMAT                                 Record format                                    TGT_RECF
RECLEN                                         Record length                                     TGT_RECL
BLKSIZE                                        Block size                                           TGT_BLKSIZE
DISPOSITION                                File disposition                                    TGT_DISP
CATALOG                                      DLBL for VSAM catalog                      TGT_CATALOG
TPYE                                             File (VSAM) or device(SAM) type         TGT_TYPE
CISIZE                                           File CI SIZE                                        TGT_CISIZE
ERROR_OPTION                            Error option                                        TGT_ERROR_OPTION
FILE_Manager                                 File manager                                       TGT_FM
UNIT                                              Unit                                                    TGT_UNIT
VOLSER                                         VOLSER                                             TGT_VOLSER
ASCII                                             ASCII tape files                                   TGT_ASCII
TAPE_LABEL                                  Lable type                                           TGT_LABEL
TAPE_SEQ                                      File seq num                                       TGT_SEQ
TAPE_MODE                                   Drive mode                                        TGT_MODE
TAPE_BUFFOFF                              Buffer offset                                       TGT_BUFOFF
SPACE_TYPE                                  Space type                                          TGT_SPACE_TYPE
SPACE_PRIMARY                           Primary qunatity                                  TGT_SPACE_PRIMARY
SPACE_SECONDARY                      Secondary quantity                              TGT_SPACE_SECONDARY
EXPIRATION                                  Expiry date                                         TGT_EXPIRARION
Site Commands: BEWARE!!!!

Please note the following points about SITE commands:








































   
SITE Commands can, and do, screw up file views, or even the server itself. Use them very carefully.  SITE commands, once issued, remain valid, and blindly, override corresponding attributes. This may cause a problem
if the user switches to a different view.  Therefore, please TURN OFF all site commands as soon as you are finished
with them. To turn them off, just issue
SITE PARM = OFF.

As an example, the server will complain if you issued SITE TYTPE = ESDS then change, and try to work with, specific SAM views. Other effects can even be more hideous and may ABEND the server.
The server, as soon as it recognizes the command, ignores everything else till it hits the equal, =, sign. Once it hits the equal sign, it skips leading blanks till it hits the value.

Therefore,

            SITE TAPE_S = 5
           SITE TAPE_SEQ = 5
           SITE TAPE_SEQUENCE NUMBER = 5
           SITE TAPE_SEQ File number = 5

Are identical.
SITE inheritance and Duplicate User IDs:

The server allows the same user id to establish as many client sessions as he desires. A user who logs in automatically inherits the SITE values issued by the same, already-logged-in user id. This feature is necessary to support those sneaky, mostly graphical, clients that establish a unique FTP session for every up/down-load. 

Therefore, if you know that multiple users use the same user id simultaneously, then advice them to always turn off   all values as soon as they do login.
Some Clients, such as Windows 95/98 line-mode FTP client, do not directly support the SITE command.  Look around and see if they support a command that sends an arbitrary string to the server. These commands are  normally something like �LITERAL� or �QUOTE�. You can use these commands to send SITE commands to the server Make sure, though, that keyword �SITE� is separated from the parameter by EXACTLY one blank.
        
For example, the server may not recognize this command:
LITERAL SITE      RECL = 80
but will certainly recognize 
LITERAL SITE RECL = 80
Hosted by www.Geocities.ws

1