ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Carriage Return In RPG ILE

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

  • #16
    Re: Carriage Return In RPG ILE

    Thank you all especially Kpmac, it works. I added the line break to the last position in my file.

    Much appreciated.

    Devarshi.

    Comment


    • #17
      Re: Carriage Return In RPG ILE

      I am trying to pull data from one physical file in a REMARS field. I need to get the data in Carraige Return, every time it reads next record.It should be concatinate in the field in Carraige Return. As I need to download that file in Excell.
      here is my code. I sincerelly appreciate all help.
      Code:
      7200 *--------------------------------------------------------------------*
      7300 FSPCRMKAD UF E K DISK RENAME(SPCRMKAD:SCRMKNEW) 01/05/08
      7400 Fpcfile o e disk 01/04/08
      7500 Darray s 70a dim(2000) 01/04/08
      7600 Dindex s 9s 0 01/05/08
      7700 Drec ds 01/04/08
      7800 D cpart 20a 01/05/08
      7900 D cspec 20a 01/04/08
      8000 Dhold ds 01/04/08
      8100 D hcpartp 20a 01/04/08
      8200 D hcspec 20a 01/04/08
      8300 C eval hold = *all'*' 01/04/08
      8400 C read SPCRMKAD 01/05/08
      8500 C dow not %eof 01/05/08
      8600 C if rec <> hold 01/04/08
      8700 C if hold <> *all'*' 01/04/08
      8800 C exsr crtpcfld 01/04/08
      8900 C endif 01/04/08
      9000 C eval hold = rec 01/04/08
      9100 c eval index = 1 01/04/08
      9200 C CLEAR ARRAY 01/04/08
      9201 C endif 01/05/08
      10400 C eval array(index) = RMARK 01/05/08
      10500 C eval index = index + 1 01/05/08
      10600 C read SPCRMKAD 01/05/08
      10700 C enddo 01/04/08
      10701 C exsr crtpcfld 01/05/08
      10800 C eval *inlr = *on 01/04/08
      10900 C return 01/04/08
      10901 * 01/04/08
      11000 C crtpcfld begsr 01/04/08
      11001 * 01/04/08
      11100 C eval PCCPARTP = hcpartp 01/05/08
      11200 C eval PCCSPEC = hcspec 01/05/08
      11300 C eval index = 1 01/04/08
      12500 C dow index <= 2000 and array(index) <> *blanks 01/05/08
      12501 * 01/06/08
      12601 C pcbigfld cat array(index):1pcbigfld 01/05/08
      12602 * 01/06/08
      12700 C eval index = index + 1 01/05/08
      12800 C enddo 01/04/08
      12801 C write PCREC 01/05/08
      12802 C clear pcrec 01/05/08
      12803 C endsr 01/05/08
      * * * * E N D O F S O U R C E * * * *
      Thanks

      Comment


      • #18
        Re: Carriage Return In RPG ILE

        Here's a constant that has both carriage return and line feed

        D CRLF C const(x'0d25')
        All my answers were extracted from the "Big Dummy's Guide to the As400"
        and I take no responsibility for any of them.

        www.code400.com

        Comment


        • #19
          Re: Carriage Return In RPG ILE

          It my opinion, but fwiw:
          The easiest way to send an Excel file (either by email or network share) is to use CVTPFXLS. I write a work file in the format I want, then use CVTPFXLS to make it an Excel worksheet. Then just email it, or send it to a network share directly. No need to fool around with the old DOS-style QDLS file system, or CSV files.

          This is a 3rd party download available at http://www.geocities.com/siliconvall.../5581/tips.htm

          Comment

          Working...
          X