LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2001, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 25 May 2001 17:52:23 +0100
Reply-To:     Peter Crawford <peter.crawford@DB.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Peter Crawford <peter.crawford@DB.COM>
Subject:      FTP a Packed Decimal File 390
Comments: To: all_terra@hotmail.com
Content-type: text/plain; charset=iso-8859-1

Over ftp, packed decimal doesn't transfer from ebcdic to ascii very well :-) I do this with binary transfer and informats $ebcdic for strings and s370Fxxx for mvs binary informats like s370FPD It becomes more complex if your records have VB record format on the host - then carefully read of sas technical document ts642 at www.sas.com/techsup.download.technote/ts642.html

I get binary ftp transfer from os390 with

filename mfdsnsf ftp "'ABC.XXXFILE.G0794V00'" host = "xxxx.xxxx.xxxx.xxxx" user = "&userid" /* your mainframe user ID */ prompt /*or PASS= "your host password" */ rcmd = 'image' /* requests binary transfer */ debug /* show default settingsto and explain any error messages */ ;

For fixed data layout the infile statement would have options infile mfdsnsf RECFM=F lrecl=<the value on the mainframe> truncover ;

read a character and a packed decimal variable (in 8bytes with two implied decimal places) with input statement like input string $ebcdic30. pkvalu s370FPD8.2 @;

Datum: 25/05/2001 16:09 An: SAS-L@listserv.uga.edu

Antwort an: all_terra@hotmail.com

Betreff: FTP a Packed Decimal File 390 Nachrichtentext:

I can't figure out how to FTP a Packed Decimal file correctly, but I think I'm close. The problem is that the packed deciman fields look different on the PC side.

This is what appears on a mainframe packed decimal record: 0001680 001350C

This is what appears on a PC packed decimal record: 0001DF0 0013D8C

Here's the code I use:

FILENAME ABCDATA FTP 'ABC.XXXFILE.G0794V00' debug USER='ABCUSER' PASS='XXXXXX' HOST='XXX.XXX.COM' RCMD='CDUP';

DATA TEST; INFILE ABCDATA OBS=4 LRECL=518; INPUT @10 CHAR $5. @53 NUMBER S370FPD7.;

Any idea what I'm doing wrong?

--

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


Back to: Top of message | Previous page | Main SAS-L page