Dhavala
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?
R.Cozzi
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.
Dhavala
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.
Guest.Visitor
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
[size="1">Code[/size>
R.Cozzi
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.
R.Cozzi
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.
Guest.Visitor
Indeed, API QSNDDTAQ requires 2 pointers for name & lib, unlike QMHQCRTQ which requires 1.
Barbara Morris
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.)
R.Cozzi
Wow, I didn\'t know that. I thought I knew everything about that dead language. Thanks!
Please login to make comments.
User Rating: / 0
PoorBest 

   MC-STORE.COM