I've found the files I need, and I am looking through them on a
green-screen console. What is interesting is that some of the data is
visually readable, and some not. Some of the display looks like a
binary file in windows - ampersands, umlats, accented characters, and
blank spots. I believe this is packed data, not sure - I don't have a
lot of experience with EBCDIC environements...
On looking at the file read statements in the RPG source code, the
input file structure is as follows - this is from column 56 to 75 in
the RPG (This may be off in formatting, sorry)
1 6 ACTNO L1M1
P 7 100DATE
P 14 160CHKNO
P 17 222DEBIT
P 23 282CREDIT
29 63 TDESC
On a green-screen, the only readable fields on the file itself are
"ACTNO" and "TDESC", which do not have the "P", or the number after the
column position. Ultimately, I'd like to transfer this to a PC or Unix
workstation for analysis and reporting - what's the best way to make
this readable in that environment? I currently have a BosaNova card
that I am trying to make work - it will yield eventually!!!
It would also be really useful to be able to read the data in a green
screen/terminl emulator environement, to be able to do sanity checks
without trannsfering the data.
Thanks in advance
This is not an externally described file, it's in an system/36 env on
OS/400, stored in QS36F.
1. Create a source member in a source physical file.
2. Edit the source member and create the DDS to externally describe the
file (I would suggest NOT naming the file the same as the file in
QS36F).
3. Create the physical file with the CRTPF command.
4. Copy the file using the CPYF command. Be sure to specify
FMTOPT(*NOCHK) on the command.
You then should have an externally described version of the file. Then
you can use whatever you like to query/extract the file (Access, Excel,
etc.).
HTH,
Jonas
for instance it will look something like this in positions 17-22
002468
01357F
This would be 123,456.78 Positive ("F" means positive in a packed)
If it were the same with a "D" in place of the "F", it would be
123,456.78 negative.
You have to read packed data up and down, if that sort of makes sense.
Packed data allows the system to store two numeric characters in the
space normally it takes to occupy a single alphameric character.
There are other ways you might be able to view the data, i.e. DFU or
something like that, but if you just want to look at raw data, that's
a starting point.
If these files are in S/36E and you want to transfer them, you may
have to write programs to unpack the data and transfer them as flat
files to the PC and then go from there, or write programs to unpack
the data and create comma separated variable files:
For instance you could write a program that put out a new data file
like:
123456,00011306,12345,12345678901,12345678901,DESCRIPTION
You could then transfer that file to a PC and pull it into a
spreadsheet or something like that, or once in a flat file unpacked,
maybe ftp the file.
ga
jcne...@prodigy.net wrote:
George Applegate
gapp...@fscoop.com
I'll be working with the box on Tuesday, so this be -enormously-
helpful. This is great stuff - I was having a very hard time finding
documentation on how packing worked.
And writing an external description sounds like a good idea. This
project is a bi of a one-off, but I suspect it will need to be done
again several times. Might as well make it easy for the next person!
It is the interactive data definition utility or IDDU. You start it with
the STRIDD command or from the menu GO IDDU.
Goggle IDDU and you should find a beginner level PDF.
Sam
"Jonas Temple" <jte...@yhti.net> wrote in message
news:1137186484.1...@g44g2000cwa.googlegroups.com...
What's the best way to do this? I've had a couple of good suggestions
here, and I've found that using IDDU is a bit painful. Can I create a
DDS source directly to do this?
Sorry for the noobishness of teh question - I'm sort of in a place
where I don't know the questions to ask.