• No results found

Coded character set identifier conversions

In document Networking File Transfer Protocol (Page 141-144)

Thei5/OSoperatingsystem usescoded charactersetidentifier(CCSID)informationtointerprettheinput dataandtoprovidetheoutputdatainthecorrect formatfordisplay.Theinputmight beAmerican StandardCodeforInformationInterchange(ASCII)or ExtendedBinaryCodedDecimalInterchangeCode (EBCDIC).

ThefollowingtopicsprovidedetailedinformationaboutCCSIDconversions.

Specifyingmappingtables:

ForFileTransfer Protocol(FTP)client,theASCIImapping tablesarespecifiedintheFTPcommand. For FTPserverthisisdoneintheChangeFTPAttributes(CHGFTPA)command.

TospecifytheFTPclientmappingtables: 1. EnterthecommandFTP.

2. PressF4.TheStartTCP/IPFTP displayisshown.

SpecifytheCCSID(andhencethemappingtables) tobeusedfortheFTPclient.Whenthe*DFTvalueis notchanged,theCCSIDvalue00819 (ISO8859-1 8bitASCII)isused.Youmightalso specifyaspecific CCSIDfor bothinboundandoutbound transfers.TheuseofCCSIDsisdiscussedinNationalLanguage SupportconsiderationsforFTP.

Notes:

v Double-bytecharacterset (DBCS)CCSIDvaluesarenotpermittedfortheCCSIDparameter on

theCHGFTPAcommand. TheDBCSCCSIDvaluescanbe specifiedusingtheTYPE (Specify FileTransfer Type)subcommand.

v IBMincludesmappingsupport inFTPtoensurecompatibilitywith releasesbefore V3R1.Use

ofmappingtablesforincomingTYPEAfiletransfersresultsinthelossofCCSIDtaggingif the targetfilemust becreated.IBMstronglyrecommends thatyouuseCCSIDsupport fornormal operations.

Related reference

“National languagesupport considerationsforFTP”onpage137

Thistopicprovidesseveralpointsthatyouneedtobe awareofwhenusingFileTransferProtocol (FTP)inanenvironmentwith differentprimarylanguages.

“TYPE(SpecifyFile TransferType)”onpage91

TheTYPE i5/OSFTPclientsubcommand specifiesthefile-transfertype,ortherepresentationin whichthetransferistotakeplace.

CCSIDcodepage taggingfori5/OSfiles:

NewfilescreatedbyFileTransferProtocol(FTP)onthei5/OSoperatingsystemaretagged witha coded charactersetidentifier(CCSID)orthecodepageofthatCCSID.TheCCSIDcodepagetaggingidentifies thecharacterdatainthefiles.

Whenreplacingorappendingdatatoanexistingfile,thetagofthefileisnotchanged.

Thefollowingtablesummarizeshow FTPassignsthesevaluesfordifferentfilesystemsand transfer types.

Start TCP/IP File Transfer (FTP)

Type choices, pressEnter.

Remote system . .. . . . Internet address .. . . .

Coded character setidentifier *DFT 1-65533, *DFT

Additional Parameters

Outgoing EBCDIC/ASCIItable

. . *CCSID Name, *CCSID,*DFT

Library . . . .. . . Name, *LIBL,*CURLIB

Incoming ASCII/EBCDICtable

. . *CCSID Name, *CCSID,*DFT

Library . . . .. . . Name, *LIBL,*CURLIB

Bottom

F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How touse this display

F24=More keys

Table5.CCSIDcodepagetaggingfori5/OSfiles

Receivingfilesystem

TransfertypeA (ASCII)

Transfertransfertype C(’ccsid’)

TransfertypeE (EBCDIC)

TransfertypeI (Image/Binary) QSYS.LIB CCSIDspecifiedby

theEBCDICcoded characterset identifierfornew databasefiles (CRTCCSID)setting.

’ccsid’ifEBCDIC CCSID.Ifccsidis ASCII,thenrelated defaultEBCDIC CCSID.

65535 65535

″root″,QOpenSys, QDLS,QOPT

DefaultASCIICCSID. ’ccsid’valuespecified inTYPECccsid# subcommand.

JobCCSIDifitisnot 65535.IfJobCCSIDis 65535,assignDefault JobCCSID.

DefaultASCIICCSID.

Note: ThedefaultASCIICCSIDisdefinedwhentheFTPjobisstarted:Fortheclient,theCCSIDparameterofthe STRTCPFTP(andFTP)command.Fortheserver,theCCSIDparameteroftheFTPConfigurationattributeswhich canbechangedusingtheCHGFTPAcommand.QFileSvr.400fileassignmentsdependonthefilesystemreceiving thefile.

Related reference

“Transferringroot,QOpenSys,QDLS,andQOPTfiles”onpage131

Youmustusestreammode(MODES)andfilestructure(STRUCT F)whentransferringfilesinthe root,QOpenSys,QDLS, andQOPTfilesystems.

NationallanguagesupportconsiderationsforFTP:

Thistopicprovides severalpointsthatyouneed tobeawareofwhenusingFileTransfer Protocol(FTP) inanenvironmentwith differentprimary languages.

v WhendataistransferredusingTYPE E(orEBCDIC),thedataisstoredasisandthereforewillbe in

theEBCDICcodepageofthefilethatitcamefrom.Thiscanresult inthestoredfilebeingtaggedwith aninappropriateCCSIDvaluewhentheprimarylanguageofthetwosystemsisdifferent.

Forexample,whendataincodepage237 issent usingTYPE EtotheQSYS.LIBfilesystemona machinewherethefiledoesnotexist,thedataisstoredasisina newfiletaggedwithCCSID65535.If thereceivingfilealreadyexists,then thedatawillbe receivedasisandtaggedwith theexistingfile CCSID,whichcannotbe237.

ToavoidincorrectCCSIDtagging,youcanusetheTYPECCCSIDsubcommand(forexample,TYPEC 237)tospecifytheCCSIDofthedatabeingtransferred.WhenaCCSIDisspecifiedonatransfer and thedataiswritten toanexistingfile,thedataisconvertedtotheCCSIDof theexistingfile.Ifnotarget fileexistsbeforethetransfer,afileiscreatedandtagged withthespecifiedCCSID.

Inthepreceding example,if thetarget filedoesnotexist,a filewitha CCSIDof237 iscreatedonthe receivingsystem.Whenthetargetfilealreadyexists,thedataisconvertedfromCCSID237tothe CCSIDofthetargetfile.

v When starting the FTP client, message TCP3C14: Unable to convert data from CCSID &1 to CCSID &2,

maybedisplayed.ThisoccursifnocharacterconversionisavailablebetweentheEBCDICCCSID specifiedbyyourjobandtheASCIICCSIDspecified forthethis FTPsession.

YoucanchangetheASCIICCSIDbyspecifyinga valueforthecodedcharacterset identifierparameter oftheSTRTCPFTPCLcommand.CCSID850,whichcontainstheIBMPersonalComputerLatin-1 codedcharacterset,isanASCII CCSIDforwhichcharacterconversionsareavailable toallvalidjob CCSIDvalues.

v WhenusingFTPinASCIImodebetweentwoEBCDICsystems, thedataonthesystemsendingthefile

isconvertedfromitsstored EBCDICcodepagetoASCII,and thenfromASCIItotheEBCDICcode pageofthereceivingsystem.Typicallythis doesnotpresentaproblembecausethe7-bitASCIIcode pageusedbythetwosystemsisthesame unlesstheEBCDICcharacters onthesendingsystemare not definedintheASCIIcodepage.Also, somecharacters intheASCIIcodepagemight bemapped

differentlybetweenthetwodifferentEBCDICcode pages.Thismight occurifsomeoftheASCII charactersarevariant (thecharacteroccupies adifferenthexadecimalcodepointin anEBCDICcode page).Thevariantcharactermightbe interpreteddifferentlyonthereceivingsystemiftheEBCDIC codepageisdifferentfromthatof thesystem sendingthefile.

Related reference

“Specifyingmapping tables”onpage135

For FileTransferProtocol(FTP)client,theASCIImappingtablesare specifiedintheFTPcommand. For FTPserverthisisdoneintheChangeFTPAttributes (CHGFTPA)command.

In document Networking File Transfer Protocol (Page 141-144)