Qcmd = 'ENDJOB Job(' + %trim(&Jobname2) + '/' + %trim(&Jobuser2) + '/' + %trim(&Jobnum2) + ')'; Callp(e) RunQcmd(Qcmd:%Len(Qcmd));
Qcmd = 'ENDJOB Job(' + %trim(&Jobname2) + '/' + %trim(&Jobuser2) + '/' + %trim(&Jobnum2) + ')'; Callp(e) RunQcmd(Qcmd:%Len(Qcmd));
Probably. Thanks.
I just ran across something interesting--after it drove me nuts for a bit.....when you send parameters to the ENDJOB cmd in the order JOB(JOBNAME/USER/JOBNUMBER), the command transposes the position of the jobname and jobuser. I had to send them in the order JOB(JOBNUMBER/USER/JOBNAME).
NUMBER/USER/JOBNAME is the correct format. Chris
EDIguru wrote: > > I just ran across something interesting--after it drove me nuts for a bit.....when you send parameters to the ENDJOB cmd in the order JOB(JOBNAME/USER/JOBNUMBER), the command transposes the position of the jobname and jobuser. I had to send them in the order JOB(JOBNUMBER/USER/JOBNAME). It's works the same for any command that uses a slash to separate the parts of the parameter. For example, if you prompt on the CALL command, you put the program first and then the library below. Program . . . . . . . . . . . . mypgm Library . . . . . . . . . . . mylib But when you use it on the command line, you put them in reverse order, library first: ===> call mylib/mypgm If you're not sure how to code a command as a string, prompt it and fill in some values, then hit F14. It will show you what the command string looks like. Job name . . . . . . . . . . . . > JOBNAME User . . . . . . . . . . . . . > USER Number . . . . . . . . . . . . > 123456 F14 shows: ENDJOB JOB(123456/JOB/JOBNAME)
I am trying to execute an end job command from RPG with QCMDEXC. The command is erring out and I'm getting a message that the variable names are not allowed. In debug mode the job name, user, and number all have values. Does anyone know how I can do this?
Code
I never really noticed that before.