×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




If you're already going to fix the copied spoolfile with RPG then it won't
be hard at all to create a new spoolfile.  I have had to do this in the
past.  Below is a one-timer pgm I wrote to do it.

You most likely will have to make changes for line skips, etc.  In the CL
manual where CPYSPLF is documented I believe are all the possible values
that *FCFC can return.

Phil

Fspoolwrk  if   e             disk    rename(spoolwrk:spoolr)
Fqsysprt   o    f  132        printer
D PrtDs           ds
D  PrtCtl                        1
D  PrtDtl                      132
Ispoolr
I              spoolwrk                    prtdta
C     *start        setll     spoolwrk
C                   read      spoolwrk
C                   dou       %eof
C                   move      prtdta        prtds
C                   if        not %eof
C                   select
C                   when      PrtCtl = '1'
C                   except    header
C                   when      PrtCtl = ' '
C                   except    detail
C                   when      PrtCtl = '0'
C                   except    blank
C                   except    blank
C                   except    detail
C                   when      PrtCtl = '-'
C                   except    blank
C                   except    blank
C                   except    blank
C                   except    detail
C                   when      PrtCtl = '+'
C                   except    detail2
C                   endsl
C                   read      spoolwrk
C                   endif
C                   enddo
C                   eval      *inlr = *on
Oqsysprt   e
O          e            header            1
O                       prtdtl         b   132
O          e            detail      1
O                       prtdtl         b   132
O          e            detail2
O                       prtdtl         b   132
O          e            blank       1
O                                          132 ' '
> -----Original Message-----
> From: midrange-l-admin@midrange.com
> [mailto:midrange-l-admin@midrange.com]On Behalf Of Valerio Vincenti
> Sent: Wednesday, September 19, 2001 2:51 PM
> To: midrange-l@midrange.com
> Subject: Fix a spool file
>
>
> Hi group,
>
> I need to fix a spool file that can not be recreated again. I'm
> planning to copy the spool file to a data base file (with *FCFC
> parm), then fix the wrong data with a rpg program. The problem
> is: how can I convert back the data file into a spool file? Is
> there a better (and faster) method than reading the data file
> with a rpg, interpreting the space / skip control character and
> writing out each record to a printer file? Even better, is there
> a command opposite to CPYSPLF?
>
> Thanks!
>
> Valerio Vincenti
> Systems Analyst
> County of Spotsylvania, I.S. Department
> Spotsylvania, VA 22553
> Phone (540) 582-7055 Ext. 233
> Fax (540) 582-6304
> e-mail: vvincenti@spotsylvania.va.us
>
>
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L)
> mailing list
> To post a message email: MIDRANGE-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
> or email: MIDRANGE-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2026 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.