Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Command Prompting 101

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

  • Command Prompting 101

    ** This thread discusses the article: Command Prompting 101 **
    ** This thread discusses the Content article: Command Prompting 101 **
    0

  • #2
    Command Prompting 101

    ** This thread discusses the article: Command Prompting 101 **
    I am submitting a job to execute a program and passing 2 variables of length 50 each. These Parms are actually for E-Mail & CC IDs. So if user enters an E-Mail id which is lesser than 30 digits length then system is keeping an extra '0' in 31st position and the total value is changing. Suppose if user enters 'Name@MailServer.com' then the SBMJOB is sending the value to the called program as 'Name@MailServer.com 0 '. How can I use Bob's solution to avoid this problem?

    Comment


    • #3
      Command Prompting 101

      ** This thread discusses the article: Command Prompting 101 **
      Simple, just use a command definition and define the email address parameters (as well as any other parameters) at the appropriate lengths (50 in your case) and it'll work.

      Comment


      • #4
        Command Prompting 101

        ** This thread discusses the article: Command Prompting 101 **
        Sorry Mr. Bob, I haven't mentioned that the job is submitted from CL program but not from command line. So I cannot create a command to prompt for E-Mail addresses because these parameters are received from some other before submitting this job.

        Comment


        • #5
          Command Prompting 101

          ** This thread discusses the article: Command Prompting 101 **
          Instead of: PARM KWD(DTAQ) TYPE(*NAME) LEN(10) PROMPT('Data queue name') PARM KWD(DTAQLIB) TYPE(*NAME) LEN(10) PROMPT(' Library') try code below and it will indend Library exactly like system commands. HTH
          Code

          Comment


          • #6
            Command Prompting 101

            ** This thread discusses the article: Command Prompting 101 **
            Yes it will Francois, but it will not work with the API example I published. I know it is unusual for an API to have such goofy parameters, but it does.

            Comment


            • #7
              Command Prompting 101

              ** This thread discusses the article: Command Prompting 101 **
              No, you don't need to prompt to use a user-written command. You can use it as a "call level" like interaface and pass it on the CMD parameter of SBMJOB. It will work for you if you just give it a chance.

              Comment


              • #8
                Command Prompting 101

                ** This thread discusses the article: Command Prompting 101 **
                Indeed, API QSNDDTAQ requires 2 pointers for name & lib, unlike QMHQCRTQ which requires 1.

                Comment


                • #9
                  Command Prompting 101

                  ** This thread discusses the article: Command Prompting 101 **
                  Bob, if you code the SPCVAL for *CURLIB as (*CURLIB *CURLIB) instead of just (*CURLIB), the system will replace '*CURLIB' with the actual current library when it calls the CPP. Most commands that support *CURLIB don't actually handle the string '*CURLIB', they get the command to do the conversion for them. (But since that particular API supports a special value of '*CURLIB', it doesn't matter in your case.)

                  Comment


                  • #10
                    Command Prompting 101

                    ** This thread discusses the article: Command Prompting 101 **
                    Wow, I didn't know that. I thought I knew everything about that dead language. Thanks!

                    Comment

                    Working...
                    X