|
On Oct 10, 2017, at 7:48 PM, Brian Johnson <brian.johnson.mn@xxxxxxxxx> wrote:
I had my doubts so I tried it:
**free
ctl-opt main( test ) actgrp( *new ) ;
dcl-proc test ;
dcl-ds parm qualified ;
*n packed( 11:5 ) inz( 123456.54321 ) ;
end-ds ;
dcl-s cmd varchar( 150 ) ;
dcl-pr qcmdexc extpgm( 'QCMDEXC' ) ;
cmd char( 150 ) const ;
len packed( 15:5 ) const ;
end-pr ;
cmd = 'sbmjob cmd(call nobodyhome parm(''' + parm + ''')) job(lonely)' ;
qcmdexc ( cmd : %len( cmd ) ) ;
end-proc ;
The submitted job log has this for the request message, with the
packed value nicely converted to a hexadecimal literal:
CALL PGM(NOBODYHOME) PARM(X'12345654321F')
I've taken advantage of this behavior, the automatic conversion of
non-character data to hex-literal notation, but in the context of a CL
program specifying a packed CL variable:
sbmjob cmd(call xyz parm(&packed))
In another case with an integer variable, this went awry in a DBCS
environment. For a rather large range of values, the first byte of the
integer was the SI or SO control character that signals DBCS caracters
follow. The submitted job crashed on some sort of character conversion
exception, if I recall correctly.
On Tue, Oct 10, 2017 at 5:02 PM, Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:
But it could also just be the correct packed field definition. No DS needed in the called program. Remember all that is being passed is a pointer. Interpretation of the data it points to is a function of the called program.
Jon Paris
www.partner400.com
www.SystemiDeveloper.com
On Oct 10, 2017, at 5:57 PM, Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx> wrote:
Just a thought - the parameter you pass has to match the incoming parameter - both need to be the same data-structure layout. You can't have the parameter in the called program or procedure be just a character field.
HTH
Vern
On 10/10/2017 3:40 PM, a4g atl wrote:
I know the garbage is all I can see, but when it submitted, it bombed out.
The values are totally strange.
On Tue, Oct 10, 2017 at 3:58 PM, Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:
They only appear garbage to you Darryl - to the system they should be just
fine.
Jon Paris
www.partner400.com
www.SystemiDeveloper.com
On Oct 10, 2017, at 3:09 PM, a4g atl <a4ginatl2@xxxxxxxxx> wrote:convert
Unfortunately the data structure method would not work. It seems to
the values into "garbage". I do not know why.list
However, experimentation provided me with another solution based on
comments here. This worked for my test program. It has also worked in the
program I needed it to work in.
zCommand = 'SBMJOB CMD(CALL D1C716 PARM('
+ Q + %trim(emotid) + Q + ' '
+ Q + %trim(wForProcess) + Q + ' '
+ 'X' + Q + %editc(mhseq:'X') + 'F' + Q + ' '
+ Q + %trim(mhtral) + Q + ' '
+ 'X' + Q + %editc(wManifest2:'X') + 'F' + Q + ' '
+ 'X' + Q + %editc(wManifest3:'X') + 'F' + Q + ' '
+ Q + %trim(wUseScreen) + Q + ' '
+ Q + %trim(wPrtManifest) + Q + ' '
+ Q + %trim(wStripPrintWap) + Q + ' '
+ Q + %trim(wErrmsg1) + Q + ' '
+ Q + %trim(wErrmsg2) + Q + ' '
+ Q + %trim(wErrmsg3) + Q + ' '
+ Q + %trim(wOutManifest1) + Q + ' '
+ Q + %trim(wOutManifest2) + Q + ' '
+ Q + %trim(wOutManifest3) + Q + ' '
+ ')) JOB(N' + %char(mhseq) + ') '
+ ' JOBQ(INR500)' ;
// submit the command
CALLP SBMCMD (zCommand : %Len(zCommand) );
Darryl
On Tue, Oct 10, 2017 at 12:59 PM, Buck Calabro <kc2hiz@xxxxxxxxx> wrote:
On 10/10/2017 12:11 PM, Peter Dow wrote:
The thing to remember is that when you call a program from the commandYes! They are parameters from the caller to the SBMJOB, and they are
line, or in a SBMJOB command, numeric parameters are passed as packed
decimal 15.5.
literals from the SBMJOB command line to D1C716.
In your situation, program D1C716 could define the numeric *ENTRYThe time tested alternative is to create a very simple *CMD, and set the
parameters as packed decimal 15.5, then eval/z-add those to mhseq,
wManifest2 and wManifest3.
command processing program to be D1C716. Invoking the program from the
command line would be dead simple, the job log would have sane looking
entries, and programs that already call D1C716 with packed(7: 2)
variables would continue to work as-is.
--buck
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
listTo post a message email: MIDRANGE-L@xxxxxxxxxxxx--
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxxquestions.
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
Help support midrange.com by shopping at amazon.com with our affiliatelink: http://amzn.to/2dEadiD
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD
--
Brian Johnson
brian.johnson.mn@xxxxxxxxx
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD
As an Amazon Associate we earn from qualifying purchases.
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.