Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Coverting ASCII to EBCDIC via FTP on MVS Host

Status
Not open for further replies.

wossilat

Programmer
Mar 21, 2002
8
DE
Hello together,

i knew this is not still the right forum, but i think there are a lot of ibm-host programmers here and i hope that anyone can help me.

i have a little problem and hope anyone can help me.
I must receive a ascii file from a unix host to store it on an mvs-host. First problem is that the file is line-sequential und some data in the records looks like an CR/LF, so when i transfer it in TYPE A the file on the mvs-host has more CR and the records are damaged.
So i transfer it in TYPE I an WRAP the records fix after 255 byte.
No i have an ascii fle on the mvs-host and must converted it in ebcdic. An ascii to ebcdic converter works fine on that file but uses a lot of cpu-time.
So i had the idea to translate it via ftp on the same host.

he ftp statements looks like these:

USER
PASSWORT

TYPE A

GET ASCII-FILE 'EBCDIC-FILE-NAME'
quit

But it won't work. The new file is not converted

Does anyone know waht i did wrong ??

Thanks for your help

Regards
 
Hello,

I'm using following z/OS FTP-Server site-command:
Code:
quote site sbd=(IBM-273,IBM-850)

This will translate the file from EBCDIC-German to ASCII.

When you are using the ftp-client on z/os you can see all site-specific FTP-site-commands by entering: "help locsite"

Here is the output:
Code:
help locsite
Usage : LOCSITE parameters
AUTORecall      Permits migrated data sets to be recalled
                automatically.
NOAUTORecall    Prevents migrated data sets from being
                recalled automatically.
AUTOMount       Allows data sets on volumes that are
                not mounted to be mounted automatically.
NOAUTOMount     Prevents data sets on volumes that are not
                mounted from being mounted automatically
DIRECTORYMode   Treats each level of a data set as a directory.
                Only the next lower level is used for MPUT or
                server MGET, LS and DIR commands.
DATASetmode     Treats all subsequent levels as a data set
                (disables directory mode)
PDSTYPE=[{PDS|PDSE}] Specifies whether new MVS directories are
                allocated as PDS or PDSE data sets. If no value
                is specified, PDSTYPE will not be used when
                allocating new MVS directories.
PRImary=value   Specifies the amount of storage for the primary
                allocation for new data sets.
SECondary=value Specifies the amount of storage for the secondary
                allocation for new data sets.
DIrectory=value Specifies the number of directory blocks when
                allocating a new PDS.
BLocks          Specifies primary and secondary allocation
                are in blocks
TRacks          Specifies primary and secondary allocation
                are in tracks.
CYlinders       Specifies primary and secondary allocation
                are in cylinders.
VOLume=value    Specifies the name of a volume for allocation
                If no value is given, the previous value is removed
                and the system default volume list is used.
RECfm=value     Specifies the record format for new data sets
LRecl=value     Specifies the logical record length for new data sets
BLOCKSIze=value Specifies the blocksize for new data sets
DCbdsn=data_set Specifies that FTP should allocate any new data sets
                with the same attributes as this data set. Data_set is
                either a fully qualified data set name in quotes
                or appended to the present directory name prefix
Qdisk=volume    Lists the amount of space available on a volume
                If no volume is given all the storage volumes
                are listed
Unit=value      Specifies the name of a unit for allocation
                If no value is given, the previous value is removed
                and the system default unit is used.
FILEtype=value  Specifies filetype (SEQ or SQL)
                SEQ is for standard sequential files, the default and
                    most common.
                SQL is for submitting DB2 queries.
CHKptint=value  Interval for generating Checkpoint markers.
ISPFStat        Update statistics for PDS member
NOISPFStat      Do not update statistics for PDS member
RESTGet         Checkpoint data set will be opened for GET.
NORESTGet       Checkpoint data set will not be opened for GET.
CHKPTPrefix=value Home, Local or Userid determines the HLQ of the
                FTP.CHKPOINT file.
BLKsize=value   Specifies the blocksize for new data sets
MIGratevol=vol  Volume Serial Number of Migrated Files.
RETpd=value     Retention period for newly created data sets.
RDw             RDW from VB/VBS files is retained as data.
NORDw           RDW from VB/VBS files is discarded as not data.
READTAPEFormat=value Format of input tape data sets. Valid formats are
                F (for fixed), V (for variable), S (for spanned),   
                X (for lrecl X), and blank (unspecified).
DB2=value       DB2 subsystem name (default is DB2)
SPRead          SQL output sent in SPREADsheet format.
NOSPRead        SQL output sent in REPORT format.
SQLCol=         Column headings use N(ames), L(abels), or A(ny)
MGmtclass=name  SMS Mgmt class for new data sets or *.
STOrclass=name  SMS Stor class for new data sets or *.
DATAClass=name  SMS Data class for new data sets or *.
WRAPrecord      Wrapping the data into next record.
NOWRAPrecord    Do not wrap the data into next record.
TRUNcate        Truncated records will not be treated as an error
NOTRUNcate      Truncated records will be treated as an error
                and the file transfer will fail
ASAtrans        Specifies that ASA control characters in ASA files
                opened for text processing should be converted to
                C control character sequences during file transfer.
NOASAtrans      Specifies that ASA control characters in ASA files
                opened for text processing should be transferred
                as ASA control characters.
BUfno=value     Number of access method buffers.
CONDdisp=disp   Specifies the conditional disposition of a data set
                as Catlg (catalogue) or Delete.
QUOtesoverride  Specifies that single quotes around a filename
                indicate that the filename should override the
                current working directory rather than be
                appended to the current working directory
NOQUOtesoverride Specifies that single quotes at the beginning of
                a file name should be treated as part of
                the file name
TRAILingblanks  Returns trailing blanks for fixed
                format data sets that are retrieved.
NOTRAILingblanks Removes trailing blanks for fixed
                format data sets that are retrieved.
CHMod newmode filename Changes the permission bits of a HFS file.
                newmode may be specified as an octal mask, or as
                {who}{operation}{permission} where {who} is u, g,
                o, or a, {operation} is +, -, or =, and {permission}
                is some combination of r, w, x. filename is the
                HFS file whose permission bits are changed.
UMask mask      Specifies the octal UMASK to be used when
                allocating new HFS files. UMASK will restrict the
                setting of the permission bits.
WRTAPEFastio    Allow tape write to use BSAM I/O
NOWRTAPEFastio  Do not allow tape write to use BSAM I/O
ENcoding=value  Specifies whether multi-byte or single-byte data
                converson is to be performed on ASCII data transfers.
                The values allowed are Mbcs and Sbcs for multi-byte
                and single-byte, respectively.
MBdataconn=value Specifies the conversion table names for the
                data connection when ENcoding has a value of
                MBCS.  'value' is a pair of code pages with
                the format (file_system_cp,network_transfer_cp).
SBDataconn=value Specifies the translation tables for the data
                connection.  'value' may be a pair of code pages (cp)
                with the format (file_system_cp,network_transfer_cp),
                the name of an MVS data set or HFS file that contains
                the translate tables, or the string FTP_STANDARD_TABLES
                Omit '=value' or give value of * to reset.
DBSUB           Enable substitution for double-byte data transfer
NODBSUB         Disable substitution for double-byte data transfer
SBSUB           Enable substitution for single-byte data transfer
NOSBSUB         Disable substitution for single-byte data transfer
SBSUBChar=value Specifies the substitution character for single-byte
                data transfer
UCSHostcs codepage Specifies the EBCDIC codepage to use
                for conversion to/from UCS.
UCSSub          Specifies that the EBCDIC substitution character
                will be used to replace any Unicode character that can
                not be converted. Data transfer will continue.
NOUCSSub        Specifies data transfer will be terminated if any
                Unicode character can not be successfully converted.
UCSTrunc        Specifies data transfer will continue even if EBCDIC
                data is truncated during Unicode conversion.
NOUCSTrunc      Specifies data transfer will be terminated if the
                logical record length of the receiving data set is
                too small to contain the data after conversion from
                Unicode to EBCDIC.
FWFriendly      Data connections for client are firewall friendly.
NOFWFriendly    Data connections for client are not firewall friendly.
SECUREIMPlicitzos    Client will initiate TLSPORT security after the  initial 220 reply from the server. Required to login to the zr
NOSECUREIMPlicitzos  Client will initiate TLSPORT security before the initial 220 reply from the server

Probably you're problem with CR/LF could be solved with "NOWRAPrecord" FTP-site-command.

Good Luck :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top