New line in message formatting in CL program

285 pts.
Tags:
AS/400
CL Program
I want to insert a new line in message formatting in CL program. Like Name new line and details new line and rem details. How can insert a new line in message formatting?


Software/Hardware used:
as400
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 9  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • ToddN2000
    What type of message are you referring to? A DSPF error, an operator? Depending on where the message is displayed you may not have room for multiple lines. What does your code look like now?
    135,365 pointsBadges:
    report
  • sivakesava

    SNDDST TYPE(*LMSG) TOINTNET((ex)) LONGMSG(TEMPMSG)

    In the above command, i wanted to format the long message like below.

    Name : EX

    Time : 2 Hr

    System: EX

     

    285 pointsBadges:
    report
  • sivakesava
    In the above case, can i insert the new line in long message formatting
    285 pointsBadges:
    report
  • ToddN2000
    Found this example in my notes. It may help.

     ** NAMED CONSTANTS FOR CARRIAGE RETURN                           
    D CR              C                   CONST(X'0D')


    EVAL        MSG = TEXT + CR + CR + MORETEXT       
                             
    EVAL        CMD = 'SNDDST TYPE(*LMSG) TOUSRID((INTERNET GATEWAY)) -     
                    TOINTNET((''' +
                    %TRIMR(&ADDRESS) +
                    ''' *PRI)) DSTD('E-Mail') LONGMSG('''' +
                    TRIMR(&MSG) + 
                    ''') DOCFILE(*NONE) SUBJECT(''' +
                    %TRIMR(&SUBJ) +
                    ''')' 
                                                            
         CALL      'QCMDEXC'                                
         PARM                    CMD                        
         PARM      512           LEN              15 5      

    135,365 pointsBadges:
    report
  • Rahul52
    Awsome.. :)

    10 pointsBadges:
    report
  • pdraebel
    :/N will also give a new line in the message displayed.
    7,545 pointsBadges:
    report
  • ToddN2000
    Thanks for the tip Pdraebel, Always like to no another way of doing it.
    135,365 pointsBadges:
    report
  • mCribb
    @pdraebel, how would I include the :/N when I am sending an email message? Thanks!
    10 pointsBadges:
    report
  • TheRealRaven
    @mCribb : You include it by putting it with the text of the message. ":/N" will give new-line. ":/P" will give a paragraph-break.

    The 'help' text for the SNDDST command has this info in it.

    The SNDDST command doesn't send an e-mail message as most of us expect. Rather, it sends a SNA 'distribution'. There are a couple features of the system that can route distributions over to the SMTP e-mail service, but it's often far better just to use the SMTP services and forget about SNDDST. Assuming you're at a reasonably recent OS level, use SNDSMTPEMM (Send SMTP E-mail) instead.

    Lots of info is available through a Google search for 'sndsmtpemm'.
    36,370 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: