ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Line Break

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

  • Line Break

    Hi,



    CHGVAR VAR(&EMAILMSG) VALUE('Successful transmission of

    &FILE_NAME and file name is' *CAT &FILE_NAME +

    *TCAT 'and recordcount is ' *CAT &RCDCNT +

    'and transmission date is '*CAT &DATE')



    Can I get line break rather than all three variables in one single statement something like below



    'Successful transmission of &FILE_NAME and



    FileName:

    RecordCount:

    Transmissiondate:



    what should I do to get the line break in my &EMAILMSG?





    Thanks for all help

    Donna.

  • #2
    Re: Line Break

    Create this to a spool file with the breaks you want, then attach the file to the email.
    Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

    Comment


    • #3
      Re: Line Break

      this seems to work.....

      PHP Code:
                PGM                                                                     
                                                                                        
                DCL        
      VAR(&CRLFTYPE(*CHARLEN(2VALUE(X'0D25')                 
                
      DCL        VAR(&LFTYPE(*CHARLEN(1VALUE(X'25')                     
                
      DCL        VAR(&LMESSAGETYPE(*CHARLEN(256)                          
                                                                                        
                
      CHGVAR     VAR(&LMESSAGEVALUE('this is a long +                       
                             message ' 
      || &CRLF || ' The tree is in +                   
                             the woods.' 
      || &LF || ' Yikes line 3')                     
                                                                                        
                
      SNDDST     TYPE(*LMSG) +                                                
                             
      TOINTNET((jflanaryXXX@code400.com)) +                       
                             
      DSTD(TESTLONGMSG(&LMESSAGE) +                            
                             
      SUBJECT('Jamie was here'
      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


      • #4
        Re: Line Break

        Hi Jamie:

        I was looking for something like this a while back.

        Thank You!


        Is there a reason for &crlf and &lf or was that to demonstrate both are available?

        Thanks
        GLS
        The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

        Comment


        • #5
          Re: Line Break

          Both are available but it seems you get extra space when using CRLF on the second line...I was just playing...youll have to experiment on your own and let us know

          jamie
          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


          • #6
            Re: Line Break

            For anyone interested here is the modified code:

            DCL VAR(&CRLF) TYPE(*CHAR) LEN(2) VALUE(X'0D25')
            DCL VAR(&LF) TYPE(*CHAR) LEN(1) VALUE(X'25')
            DCL VAR(&CR) TYPE(*CHAR) LEN(1) VALUE(X'0D')
            DCL VAR(&null) TYPE(*CHAR) LEN(1) VALUE(X'00')
            DCL VAR(&LMESSAGE) TYPE(*CHAR) LEN(256)

            Code:
            CHGVAR     VAR(&LMESSAGE) VALUE('line1 crlf' *cat &crlf +  
                         *cat 'line2 lf' *cat &lf *cat 'line3 cr' +    
                         *cat &cr *cat 'line4 null' *cat &null +       
                         *cat 'line 5 nothing')   
            
            snddst blah blah
            and here is the result:


            line1 crlf
            line2 lf
            line3 cr
            line4 null line 5 nothing
            as far as I can tell cr/lf/crlf all do the same thing. Only null failed.
            The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

            Comment


            • #7
              Re: Line Break

              CHGVAR VAR(&EMAILMSG) VALUE('Successful transmission of *CAT

              &FILE_NAME *CAT ':/N' *CAT

              'File name: ' *CAT &FILE_NAME *CAT ':/N' *CAT +

              'Recordcount : ' *CAT &RCDCNT *CAT ':/N' *CAT +

              'Transmission date: ' *CAT &DATE)

              You can send new line in snddst by adding the /N and by using /P is a new paragraph.


              Bill
              Last edited by Billw; October 31, 2006, 09:42 AM.
              Bill
              "A good friend will bail you out of jail,
              A true friend would be sitting beside you saying,
              'Wow, that was fun.'"

              Comment


              • #8
                Re: Line Break

                controls within the text.

                o :/N - Will cause a new line (Carrier return).

                o :/P - Will cause a new paragraph. New line plus a
                blank line. (Carrier return and
                Required carrier return)

                From the F1 help of the snddst command
                Bill
                "A good friend will bail you out of jail,
                A true friend would be sitting beside you saying,
                'Wow, that was fun.'"

                Comment

                Working...
                X