× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



What I do when I need to get the command formatted correctly is everything you
do but not press enter. If you press F14, the screen will display the command
on the screen as you have it set up and that can be copy/pasted and then
manipulated to the correct format for inclusion in the program. For instance,
this is the screen after pressing F14

+------------------------------------------------+
| Display Command String |
| SBMJOB CMD(CALL PGM(COMMAND)) |
| JOB(JOBNAME) |
| JOBD(JOBDESC) |
| JOBQ(JOBQ) |



+------------------------------------------------+
This can be copy/pasted directly into the source member and then formatted for
the C specs. For example:

/free
syscmd ='SBMJOB CMD(' + command + ') JOB(' + jobname + ') JOBD(' +
JOBDESC + ') JOBQ(' + JOBQ + ')';
call qcmd(syscmd:%size(syscmd));

/end-free

Just my way of doing it.

Marvin


------------------------------

message: 6
date: Thu, 21 Jun 2007 10:56:10 -0500
from: Booth Martin <booth@xxxxxxxxxxxx>
subject: Re: Dumb Question O-Day

What I have done is this situation is to enter SBMJOB on the command
line and F4 it.
Fill in the parms you need. Use dummy data so that the SBMJOB will
fail, if you want.
Then enter the command.
Then F9 to retrieve the command, and copy/paste it into your code,
changing the parms as needed to suit your needs.

That way you have something reliable to work with.

I am guessing that part of the issue is that PATH60 and PRINTER are
variables?

So you will end up with something like this?

c eval CmdString =
c 'SBMJOB CMD(CALL PGM(HPMODS/C0774B) PARM('
c + %trim(PATH60) + ' ' + %trim(PRINTER)
c + ')) USER(IXAADMIN)'

Your call to SystemCmd will be something like "SystemCmd(CmdString:
%len(CmdString))

I am not sure that you need the SubmitJob field that you are using?

sjones@xxxxxxxxxxxxxx wrote:
OK, today is my turn for the dumb question of the day.

I am trying to eliminate calling the CL program from my RPG program & just
call the RPG program that is ultimately called.

The CL program is very simple:

SBMJOB CMD(CALL PGM(HPMODS/C0774B) PARM(&PATH60 &PRINTER))
USER(IXAADMIN)

C0774B is also pretty simple
CALL PGM(HPMODS/R0774B) PARM(&PATH60 &PRINTER)

Currently the RPG program does a Call 'C0744' Parm Path Printer

I have the QCMDEXEC setup in the RPG program as:

D SystemCmd Pr ExtPgm('QCMDEXC')
D CmdString 3000 Options(*VarSize) Const
D CmdLength 15P 5 Const
D CmdOpt 3 Options(*NoPass) Const
D*
D SubmitJob S 500

What I am struggling with is getting the SubmitJob field setup correctly
so that it passes the values in the fields Path & Printer. Path is a
length of 60 printer is length of 10.

Why I want to do this is because it seems that I am getting the parameters
stepping on each other, as in the printer field is being appended to the
end of the path field.

I will put on the flame-suit & take my lumps today... :->

Thanks
Steve Jones
H-P Products








As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.