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



Mike,

Just saw Pete Hall's post.  This suggestion is one of many possible
solutions:


CRTPF qtemp/splf_wrk rcdlen(133)
CRTPF qtemp/splf_fmt rcdlen(132)

CPYSPLF xxx qtemp/splf_wrk * ctlchar(*FCFC)

OVRDBF ...
CALL RPGPGM
DLTOVR ...

DSPPFM qtemp/splf_fmt




F SPLF_WRK   IP ...
F SPLF_FMT   O  ...

I SPLF_WRK   NS
I                 1    1  CtlChar
I                 2  133  PrtDta

C* verify control codes (may be reversed)
C*    " " = space 1, IIRC
C*    "+"   may be one too

C            SELECT
C*
C            WHEN     CtlChar = '-'
C            EXCEPT   BlankLine
C            EXCEPT   BlankLine
C            EXCEPT   BlankLine
C*
C            WHEN     CtlChar = '0'
C            EXCEPT   BlankLine
C            EXCEPT   BlankLine
C*
C            WHEN     CtlChar = '1'
C            EXSR     NewPage
C*
C            ENDSL
C*
C            EXCEPT   PrtLine

C***
C  NewPage   BEGSR
C***
C*
C* Depends how sophisticated you wanna get
C*
C* (I'd try to start with an assumed page length, and
C*  keep a line counter, above, and code a simple DO loop)
C*
C            ENDSR

O SPLF_FMT E    01      BlankLine

O SPLF_FMT E    01      PrtLine
O PrtDta                             132


I don't intend the above for as any fancy style guide.  Just wanted to get
my head back in some code, for a change.

I will say it somewhat vexes me, when I see authors post CL that is all
exquisitely lined up in columns, and then the berate RPG for being so
columnar.  My preference is to be pragmatic...  Use F4 to prompt /every/
line of CL, and line up RPG (both C and CX-specs) as well.

HTH.

jt

> -----Original Message-----
> From: midrange-l-admin@midrange.com
> [mailto:midrange-l-admin@midrange.com]On Behalf Of Condon, Mike
> Sent: Saturday, November 17, 2001 2:52 PM
> To: 'midrange-l@midrange.com'
> Subject: CPYSPLF and retain format
>
>
> I want to copy a spool file to a physical file, but have it end up in the
> physical file
> in the format it would appear as if it were printed. Is there a (hopefully
> easy) way to do this?
> _______________________________________________
> 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.
>



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.