Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1512
  • Last Modified:

Merging AFPDS spool files

Hi all,

I am taking my first steps in programatically manipulating AFPDS spool files.
The files are there, I have to merge them, just joining...
2 files of 2 pages should become 1 file of 4 pages.
Is that as straightforward as I think it is?
Can I get some hints on how to do it?
Can someone point me to a good resource to understand the AFPDS format?
thanks

Gertone
0
Geert Bormans
Asked:
Geert Bormans
  • 5
  • 3
  • 2
3 Solutions
 
daveslaterCommented:
Hi
this is not as easy as you may first think.

You will need to delv into user space and API programming in order to get the spool file data - even then it may not work.

Dave
0
 
tliottaCommented:
Agreed. It's hard enough getting this kind of thing done for SCS spooled files much less AFPDS. This is _not_ for the faint of heart.

Tom
0
 
Geert BormansAuthor Commented:
OK, I understand it is though,
still I have to do it.
Any usefull hints?
Tools out there I can use?
Thanks

Geert
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
daveslaterCommented:
Hi
Ok we shall begin - download the User space tools from:

http://www.netshare400.com/cgi-bin/DSPSAMP?file=QRPGLESRC&mbr=FUSP

Get them compiled - I will look into the API side to things.

Dave
0
 
daveslaterCommented:
Ps
this may take some time - If it is urgent then best get expectations set.

It will be trial and error for us all :-)

Dave
0
 
tliottaCommented:
Questions:

Is this a project that should handle _any_ two (or more) AFPDS spooled files? Or is it for two specific AFPDS spooled files? Are these spooled files simply described as AFPDS or do they make significant use of AFPDS facilities? (I.e., are there various external AFPDS resources used? Are images included? fancy print options? Other? Or are these just regular lines of print that just happen to be sent as AFPDS files?)

If we're talking simple line printer output as AFPDS, this is probably reasonably doable. OTOH, if this must account for multiple external and unpredictable AFPDS resources, might as well plan for it taking a few months.

Tom
0
 
daveslaterCommented:
Hi
you will need to use the following API's to get the information
The Open Spooled File (QSPOPNSP) API opens an existing spooled file.

the Get Spooled File Data (QSPGETSP) API can then get the data from the file opened by the API above.

The Close Spooled File (QSPCLOSP) API closes a spooled file opened by the Open Spooled File (QSPOPNSP).

The Retrieve Spooled File Attributes (QUSRSPLA) API returns specific information about a spooled file. This may be need to to check page size etc...

you can then use
The Create Spooled File (QSPCRTSP) API is used to create a new spooled file and put the information from the user space into the user space used by this API.

Dave



0
 
tliottaCommented:
Note... once the QSPGETSP API retrieves data into a user space, you will probably want to look the space over to get mental pictures of what you're dealing with. One command can be useful:

 ==>  dmpobj  obj( mylib/myspc ) objtype( *usrspc )

That will print an object dump so you can compare it against documentation of what should be in the space. As an alternative:

 ==>  dmp  obj( '/qsys.lib/mylib.lib/myspc.usrspc' )

...does the same, but it works in the IFS naming format. It also helps get the idea that a *USRSPC object is essentially the same underlying object type as an IFS streamfile.

Tom
0
 
daveslaterCommented:
Hi
just looking at the site thre is all the code to get and put the spool file here

http://www.netshare400.com/cgi-bin/DSPSAMP?file=QRPGLESRC&mbr=SPLFAPI

Dave
0
 
Geert BormansAuthor Commented:
Hi all,

can not say my problem is completely solved, but...
I learned how to get started, will do some research now based on the answers received.
And will definitely reopen this tread as soon as I feel ready to get started.
Thanks for all the help sofar.
I will split the points in what I think being a fair split.
I hope I don't hurt anyone's feelings... I will need your help later I guess :-)

Gertone
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 5
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now