Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AS/400 Navigation Manager 1

Status
Not open for further replies.

thegirlofsteel

IS-IT--Management
Mar 3, 2004
110
US
Hi,

I'm in the process of creating a program that grabs a spooled file from the AS/400 print spool into an MS Office Access file. What I'm doing right now is using the AS/400's operation manager to copy the file to a text file on my computer, then loading it into my program.

Is there a way to copy the file with some sort of command to copy from the operations manager to the PC??

I hope I'm explaining myself well enough!
 
I would do this.

1. create a pf with a reclen of 133 (1 col for FCFC 132 for data) or 1 + 198 if that's what you need.

2. copy the splf to your pf with cpysplf

3. copy the pf/member to a pc doc in QDLS with cpytopcd

4. map a drive to the 400 using qdls\yourfolder as the share

5. access and enjoy

use a cl pgm to run the whole thing

Mike Butler
Iseries + Sun + PC = Tired Guy
"Never put off 'til tomorrow what you should have done yesterday
 
This is a check writing program. One of our processes starts on the AS/400 to generate the checks. Once the checks are in the spool file, we then use operations manager to drag that file to a folder on our server, then that person loads it to the check writing software programmed in access.

Right now, we are afraid that the person (accounting person) might accidently delete that spool file and the process cannot be run again to generate those batch of checks. Unfortunately, the program on the AS/400 doesn't allow us to move that check file directly to another writer.

Any suggestions. Also, I'm new to the AS/400....what is PF and the QDLS directory?

 
Where to start???

PF is a Physical File = Access Table = Flat File
QDLS is Document Library System - a library on the AS/400-iSeries-i5 or whatever it's being called these days where PC type files can be stored.

I'm assuming the Outq does NOT have printer attached.....
I"m assuming multiple spool files in the Outq.....

BTW, copying the spool file to a PF is a good way to save the contents for future use/reference. The program may NOT allow the spool file to be moved, but QSYSOPR or QSECOFR profiles can move it.

Anyone on your staff have AS/400 experience?? Here's an outline of steps you'll need to take to automate the process.
*****

Setup:
Create PF with record length of 81, 133 or 199 depending on your needs.
CRTPF FILE(MYSPLDATA) RCDLEN(81)
Create a folder in QDLS for your PC file
CRTFLR FLR(MYFOLDER) TEXT(MYFOLDER)
Using Navigator, define a share to a folder in which the PC file will be placed.
Map the drive from your PC

*****
Pseudo code
find out contents of outq with checks
loop thru list until you find the checks spool file
exit
copy checks spool file to PF
copy PF to QDLS-folder

place the program on the job scheduler
add PF to files being backed up nightly

HTH

Mike Butler
Iseries + Sun + PC = Tired Guy
"Never put off 'til tomorrow what you should have done yesterday
 
Oh yeah!!! It works!!! Thanks so much!!! You were a great help!!! xoxoxoxo from the girl of steel!
 
One more suggestion, since this is a check file, you could always modify the cl to have the print file saved,,, that way even if someone does something really stupid, the file would always be saved on the outq of the AS400. That would of course mean,, someone has to manually go in and delete those spoolfiles at a later date.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top