× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 22-Jun-2017 15:01 -0600, Roger Harman wrote:
I've always used *FCFC when converting spool to text and back again.

But, I now have to work with an existing process where I may need
to respool a provided text file that was created with *PRTCTL.

I don't see a way to do this. CRTPRTF and OVRPRTF don't support
*PRTCTL.

Any thoughts?


Despite being somewhat inflexible for the [file name and] record length, plus an assumption of matching both of the Overflow Line Number (OVRFLW) and the Page Size (PAGESIZE) between the originally spooled data and the Printer File (PRTF) being opened/used [e.g. QSYSPRT as in this program], the following program that I have used a couple times in the past [for QPQUPRFIL spooled files using PAGESIZE(66 132) and OVRFLW(60)], with success, might suffice for the alluded requirements.

Use the following OVRDBF request to enable both the compile and the run-time, to access the desired file and data:

OVRDBF FILE( SPLFDTA )
TOFILE( the_file_with_CPYSPLF_data )
MBR( the_member_of_that_file )
OVRSCOPE( as_required )

Use a variation of the following OVRPRTF request to ensure what is probably the most desired effect at run-time:

OVRPRTF FILE( QSYSPRT )
TOFILE( *FILE )
CTLCHAR( *NONE )
PRTTXT( *BLANK )
OVRSCOPE( as_required )
PAGESIZE( as_used_in_copied_splf_dta )
OVERFLOW( as_used_in_copied_splf_dta )

* Below RPG program source derived from:
*
* Subject: Re: Restore spool da un CPYSPLF con CTLCHAT(*PRTCTL)
* From: "neroni.it"
* Date: Wed, 16 Jul 2008 09:30:58 -0700 PDT
* Newsgroups: it.comp.as400
*
* Note: Above Subject should refer to CPYSPLF CTLCHAR(*PRTCTL)
*
FSPLFDTA IP F 202 DISK
F*SPOOL IP F 202 DISK
FQSYSPRT O F 132 PRINTER KPRTCTLLINE
.*..1....+....2....+....3....+....4....+....5....+....6....+....7.
ISPLFDTA AA 01
I*SPOOL AA 01
I 1 3 SK
I 4 4 SP
I 5 136 TXTLIN
I* 5 136 RIGA
ILINE DS
I 1 1 SPBEFR
I 3 4 SKBEFR
I 5 136 PRTLIN
I* 5 136 BUFF
* RISTAMPA RIGA
* REPRINT LINE /* translation of above comment */
C 01 MOVE SK SKBEFR
C 01 MOVE SP SPBEFR
OQSYSPRT D 01
O TXTLIN 132
O* RIGA 132


For reference, as probable ability to search for a copy of the message giving the original [though I am unsure if any are "readable" copies of the] RPG source; note the misspelled keyword is purposeful:
(https://www.google.com/search?q=%22cpysplf%22+%22prtctl%22+%22ctlchat%22)


4myRef: CPYFPRTCTL CPYF CPYPRTCTL


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-2024 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.