Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Downloading spool files as text.

0 views
Skip to first unread message

Matthew Murray

unread,
Jun 6, 2002, 1:38:26 PM6/6/02
to
There is a spool file on the AS/400 that I want to download as
text, for additional manipulation, printing out, importing into another
program, etc. I begin by creating a physical file (CRTPF), into which I
copy the spool file's contents (CPYSPLF). Then, I initiate a transfer to
get that physical file on my computer. I'm able to open the file on my
computer, but it's utter gibberish, just lots of nonsense characters, and
certainly nothing that looks like columns or the data I can see when I
display the spool file on the AS/400. I discovered a work around (to use
the Operations Navigator to find the file, and then basically copy and
paste the contents), but that doesn't get any of the overprinting, which
includes column headings that I need.
I'm sure this is something very, very simple, but if someone could
point me in the right direction for getting this information into a
usable form on my local computer (in text, Excel, or whatever else
format), I would appreciate it. Thanks!

----------------------------
Matthew A. Murray
matthe...@mindspring.com
http://www.matthewmurray.net
----------------------------

Daniel Gross

unread,
Jun 6, 2002, 4:36:23 PM6/6/02
to
Hi Matthew,

Matthew Murray <hl...@plover.net> wrote in
news:Pine.LNX.4.44.02060...@zork.plover.net:

> There is a spool file on the AS/400 that I want to download as
> text, for additional manipulation, printing out, importing into another
> program, etc. I begin by creating a physical file (CRTPF), into which I
> copy the spool file's contents (CPYSPLF). Then, I initiate a transfer to
> get that physical file on my computer. I'm able to open the file on my
> computer, but it's utter gibberish, just lots of nonsense characters, and
> certainly nothing that looks like columns or the data I can see when I
> display the spool file on the AS/400.

First, you should use "*FCFC" or "*PRTCTL" (don't remember the parameter
name - these are just the values) - which will give you readable output.

*FCFC will result in a single line prefix byte which controls the line/form
feeding (channel control code). In one of the manuals, you could read the
complete definition, but you can test it yourself - try to feed 1 line, 2
lines, 3 lines, ... and so on - and just a form feed to - and you will have
all controll code very fast.

*PRTCTL will result in 4 bytes line prefix - 1 to control the "feed to line
x" and 3 bytes to control "feed xxx lines" - also simple.

In both cases, your PF records have to be 1 (*FCFC) or 4 (*PRTCTL) bytes
longer that the printer file lines.

If you don't use *FCFC or *PRTCTL, you will not have any line/form feed
control in you PF - may be nice in some very special cases, but ...

After that, make sure, that you download the file _with_ (!!!) EBCDIC/ASCII
translation and not in binray form (which will result in unreadable chars on
the PC).

I have written some sort of simple "DMS" this way, and it works just good.

HTH and bye
Daniel

René H. Hartman

unread,
Jun 6, 2002, 5:34:28 PM6/6/02
to
*** post for FREE via your newsreader at post.newsfeed.com ***

There may be two reasons for you getting 'rubbish', which is most likely
non-translated EBCDIC.
If you use FTP for downloading, make sure you do an ASCII type download,
not BINARY.
If you still get rubbish, your PF probably has CCSID 65565 (I _think_
that's what the default is) and that may cause you problems. Make sure
your PF has CCSID 37 and you'll be OK.

If you just want the spoolfiles text, you don't need any formatting on
the CPYSPLF, but you may have a lousy PC-doc, since pageheadings will
appear immediately below the last line of text of the previous page,
which can kill report-readability. If you make your PF 4 chars wider
than your spoolfile print-length, you can use CTLCHAR(*PRTCTL ) to keep
the formatting info. On my website you'll find a macro for Word97 that
uses this info to reformat the doc once imported in Word. If you're
interested, you'll find it in the Downloads section.

--
Vriendelijke groeten / Kind regards
René H. Hartman
R.H. Hartman Automatiserings Consultancy
www.hac-maarssen.nl


-----= Posted via Newsfeed.Com, Uncensored Usenet News =-----
http://www.newsfeed.com - The #1 Newsgroup Service in the World!
-----== 100,000 Groups! - 19 Servers! - Unlimited Download! =-----

David Russell

unread,
Jun 6, 2002, 7:54:42 PM6/6/02
to
Hey, If you are using ca data transfer be sure to check convert ccsid 65535
box on the properties dialog box. This will solve your problem

"Matthew Murray" <hl...@plover.net> wrote in message
news:Pine.LNX.4.44.02060...@zork.plover.net...

Ugo Gagliardelli

unread,
Jun 6, 2002, 8:01:17 PM6/6/02
to
Matthew Murray wrote:
>
> There is a spool file on the AS/400 that I want to download as
> text, for additional manipulation, printing out, importing into another
> program, etc. I begin by creating a physical file (CRTPF), into which I
[]
Have you ever tried the drag-and-drop from operations-navigator spoled
files view?
--
Dr.Ugo Gagliardelli,Modena,Italy-Certified uindoscrasher-AlcoolInside
Spaccamaroni andate a cagare/Spammers not welcome
Spamers iros a la mierda/Spamers allez vous faire foutre
Spammers loop schijten/Spammers macht Euch vom Acker

Quigon

unread,
Jun 6, 2002, 8:59:31 PM6/6/02
to
Matthew Murray <hl...@plover.net> wrote in message news:<Pine.LNX.4.44.02060...@zork.plover.net>...

There's a program that can be used to convert a spooled file to an
RTF, TXT or HTML file and e-mail it included with the book "The
iSeries & AS400 Programmer's Guide to Cool Things" from MC Press
(http://www.mc-store.com/isasprogguid.html)

Quigon

0 new messages