Rob,

Thanks. I had planned on going direct to the qsys.lib file system.

Question, though: I ran basically the same steps as your first example -
with two changes. First I switched to namefmt 1 manually. Second, I did
not change to binary mode. Could either one of these (or both) account for
this:

DSPPFM JERRY/TESTME
*...+....1....+....2....+....3....+....4
This is a file,01.12,the walrus is dead

My understanding from my reading was that, if the file already exists on the
System i, that the CCSID (37 here) would be maintained as part of the
transfer translation.

Preferably, again because of laziness, I would prefer a fixed-format file
transfer into a DDS or DDL file simply because it saves me the trouble of
doing a CPYF or for CSV formats writing a parser program.

Jerry C. Adams
IBM i Programmer/Analyst
The average Christmas tree has about 30,000 bugs and insects on it according
to a Norwegian scientist. -EUI
--
A&K Wholesale
Murfreesboro, TN
615-867-5070


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Tuesday, November 15, 2011 1:09 PM
To: Midrange Systems Technical Discussion
Subject: Re: FTP Format

I guess you could go straight to the /qsys.lib file system. Bypasses
having to read stream files. Which may simplify it for you.

C:\qtemp\PMR\logs>copy con testme.txt
This is a file,01.12,the walrus is dead^Z
1 file(s) copied.

C:\qtemp\PMR\logs>ftp gdisys
Connected to gdisys.dekko-1.
220-QTCP at GDISYS.
220 Connection will close if idle more than 5 minutes.
User (gdisys.dekko-1:(none)): rob
331 Enter password.
Password:
230 ROB logged on.
ftp> bin
200 Representation type is binary IMAGE.
ftp> put testme.txt /qsys.lib/rob.lib/testmez.file/testme.mbr
200 PORT subcommand request successful.
150-NAMEFMT set to 1.
150 Sending file to member TESTME in file TESTMEZ in library ROB.
226 File transfer completed successfully.
ftp: 39 bytes sent in 0.00Seconds 39000.00Kbytes/sec.

DSPPFM FILE(ROB/TESTMEZ) MBR(TESTME)
all garbage!
dltf rob/testmez

ftp> asc
200 Representation type is ASCII nonprint.
ftp> put testme.txt /qsys.lib/rob.lib/testmez.file/testme.mbr
200 PORT subcommand request successful.
150 Sending file to member TESTME in file TESTMEZ in library ROB.
226 File transfer completed successfully.
ftp: 39 bytes sent in 0.00Seconds 39000.00Kbytes/sec.

DSPPFM FILE(ROB/TESTMEZ) MBR(TESTME)
*...+....1....+....2....+....3....+....
This is a file,01.12,the walrus is dead

DSPFD ROB/TESTMEZ
(keep in mind that ftp command created the file)
File Description Header
File . . . . . . . . . . . . . . . . . . . : FILE TESTMEZ
Library . . . . . . . . . . . . . . . . . . : ROB
Type of file . . . . . . . . . . . . . . . : Physical
File type . . . . . . . . . . . . . . . . . : FILETYPE *DATA
Data Base File Attributes
Externally described file . . . . . . . . . : Yes
Record Format List
Record Format Level
Format Fields Length Identifier
TESTMEZ 1 39 391E07832AC44
Text . . . . . . . . . . . . . . . . . . . :
Total number of formats . . . . . . . . . . : 1
Total number of fields . . . . . . . . . . . : 1


DSPFFD ROB/TESTMEZ
Record Format Information
Record format . . . . . . . . . . . . . . . : TESTMEZ
Format level identifier . . . . . . . . . . : 391E07832AC44
Number of fields . . . . . . . . . . . . . : 1
Record length . . . . . . . . . . . . . . . : 39
Field Level Information
Data Field Buffer Buffer Field Column
Field Type Length Length Position Usage Heading
TESTMEZ CHAR 39 39 1 Both TESTMEZ
Coded Character Set Identifier . . . . . : 500


Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.