Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Looking for the CVTRPTRTF command.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Looking for the CVTRPTRTF command.

    I was reading an article entitled "Easily Distribute AS/400 Reports with Microsoft Exchange" at this URL:



    I was really interested in downloading the code linked in the article, which is identified to be at this URL:



    But when I clicked on it I get an error that said the file wasn't found.

    Neither the author nor MC Press can find the original files. I realize that the article is 12 years old, but I was hoping that someone out there might have downloaded the code and is still using it. If so, could you please post the source to this forum thread or contact me via my profile?

    Thanks, Pete

  • #2
    Hi Peter,

    I don't have this specific utility but i have CVTSPLSTMF that makes TXT, HTML and PDF files from spool files. If it can work for you, let me know to post the sources.

    Regards,

    Wilson

    Comment


    • #3
      Here's the code

      ************************************************** ************
      * To Compile:
      * CRTBNDRPG(xxx/CVTRPTRTF) SRCFILE(xxx/QRPGLESRC) +
      * SRCMBR(xxx/QRPGLESRC)
      ************************************************** *************
      FSPLFIN IF F 202 DISK
      FRTFOUT O F 198 DISK
      *
      D RtfLine S 198 RTF Header Info
      D RTFHdrLn S 1 DIM(100) RTF Header Line
      D RTFHdr S 100 DIM(30) CTDATA PERRCD(1) RTF Header Info
      D CurLine S 5 0 Current Line
      D NotFirst S LIKE(*IN01) First Time Through
      D CYr S 4 Current Year
      D CMt S 2 Current Month
      D CDy S 2 Current Day
      *
      DCTime DS 6
      D CHr 1 2 Current Hour
      D CMn 3 4 Current Minute
      *
      DRecd DS
      DSpaceB 1 3 Space Before Lines
      DSkipB 4 4 Skip Before Lines
      DRptLine 5 202 Report Text
      *
      DNewLine C CONST('\line') New Line Cmd
      DNewPage C CONST('\page') New Page Cmd
      DRptEnd C CONST('\par}}') Emd Report Cmd
      *
      ISPLFIN NS
      I 1 202 Recd
      *
      C *Entry Plist
      C Parm LineLen 15 5 (80, 132, 198)
      *
      C Movel *Year CYr
      C Movel *Month CMt
      C Movel *Day CDy
      C Time TTime 6 0
      C Move TTime CTime
      *
      * First Output the Header Section
      *
      C Do 30 X 3 0
      *
      * Only Use Landscape if 132 or 198
      C If LineLen=80 And X=21
      C Eval RTFHdr(X)='\pszl '
      C EndIf
      *
      * Update Date Information For Report
      C If X=17
      C MoveA RTFHdr(X) RTFHdrLn
      C MoveA CYr RTFHdrLn(13)
      C MoveA CMt RTFHdrLn(20)
      C MoveA CDy RTFHdrLn(25)
      C MoveA CHr RTFHdrLn(30)
      C MoveA CMn RTFHdrLn(36)
      C MoveA RTFHdrLn RTFHdr(X)
      C EndIf
      *
      * Change Horiz Font Scaling based on Page Size
      C If X=30
      C MoveA RTFHdr(X) RTFHdrLn
      * 80
      C If LineLen=80
      C MoveA '150' RTFHdrLn(21)
      C EndIf
      * 132
      C If LineLen=132
      C MoveA '118' RTFHdrLn(21)
      C EndIf
      * 198
      C If LineLen=198
      C MoveA '79 ' RTFHdrLn(21)
      C EndIf
      *
      C MoveA RTFHdrLn RTFHdr(X)
      C EndIf
      *
      C Eval RtfLine=RTFHdr(X)
      C Except Rout
      C EndDo
      C Eval CurLine=1
      *
      * Now Read through the Report File and create line output
      *
      C DoW %EOF(SPLFIN)<>*ON
      C Read SPLFIN LR
      C If %EOF(SPLFIN)<>*ON
      *
      * Space Before Value--New Page
      *
      C If SpaceB<>*BLANKS
      C Move SpaceB Spc 3 0
      C If NotFirst=*On
      C If Spc C Eval RtfLine=NewPage
      C Eval CurLine=1
      C Except Rout
      C EndIf
      C Else
      C Eval NotFirst=*On
      C EndIf
      C For X=CurLine to Spc
      C Eval RtfLine=NewLine
      C Except Rout
      C EndFor
      C Else
      C Eval NotFirst=*On
      *
      * Skip Before Value--Skip Lines
      *
      C If SkipB<>*BLANKS
      C Move SkipB Skp 1 0
      C For X=1 to Skp
      C Eval RtfLine=NewLine
      C Eval CurLine=CurLine+1
      C Except Rout
      C EndFor
      C EndIf
      C EndIf
      C Eval RtfLine=RptLine
      C Except Rout
      C EndIf
      C EndDo
      *
      C Eval RtfLine=RptEnd
      C Except Rout
      C Movel *On *INLR
      C Return
      *
      */\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
      ORTFOUT E Rout
      O RtfLine 198
      ** RTF Header Data (Inserted into the top of each Report
      {\rtf1\ansi\ansicpg1252\uc1 \deff1\deflang1033\deflangfe1033{\fonttbl{\f0\from an
      \fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss
      \fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}{\f6\fmodern\fcharset0
      \fprq1{\*\panose 00000000000000000000}Courier;}{\f83\froman\fcharse t238\fprq2
      Times New Roman CE;}{\f84\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f86
      \froman\fcharset161\fprq2 Times New Roman Greek;}{\f87\froman\fcharset162\fprq2
      Times New Roman Tur;}{\f88\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f89
      \fswiss\fcharset238\fprq2 Arial CE;}{\f90\fswiss\fcharset204\fprq2 Arial Cyr;}{\f92
      \fswiss\fcharset161\fprq2 Arial Greek;}{\f93\fswiss\fcharset162\fprq2 Arial Tur;}
      {\f94\fswiss\fcharset186\fprq2 Arial Baltic;}}{\colortbl;\red0\green0\blue0;\red0
      \green0\blue255;\red0\green255\blue255;\red0\green 255\blue0;\red255\green0\blue255;
      \red255\green0\blue0;\red255\green255\blue0;\red25 5\green255\blue255;\red0\green0
      \blue128;\red0\green128\blue128;\red0\green128\blu e0;\red128\green0\blue128;\red128
      \green0\blue0;\red128\green128\blue0;\red128\green 128\blue128;\red192\green192
      \blue192;}{\stylesheet{\widctlpar\adjustright \f1\cgrid \snext0 Normal;}{\*\cs10
      \additive Default Paragraph Font;}}{\info{\author CVTRPTRTF}{\operator CVTRPTRTF}
      {\creatim\yr2000\mo01\dy27\hr09\min27}{\revtim\yr2 000\mo01\dy27\hr09\min36}{\version1}
      {\edmins1}{\nofpages1}{\nofwords0}{\nofchars0}{\*\ company Midrange Computing}
      {\nofcharsws0}{\vern113}}\margl259\margr245\margt2 45\margb230
      \widowctrl\ftnbj\aenddoc\hyphcaps0\formshade\viewk ind1\viewscale135\pgbrdrhead\pgbrdrfoot\fet0\sectd
      \lndscpsxn\paperw15840\paperh12240
      \psz1\linex0\endnhere\sectdefaultcl {\*\pnseclvl1\pnucrm\pnstart1
      \pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnha ng{\pntxta .}
      }{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\ pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1
      \pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}
      {\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnha ng{\pntxtb (}{\pntxta )}}
      {\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\ pntxtb (}{\pntxta )}}{\*\pnseclvl8
      \pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1
      \pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \widctlpar\adjustright \f1\cgrid
      {\f6\fs16\charscalex79
      

      Comment

      Working...
      X