|
Narayanan: On Tue, 19 February 2002, Narayanan Pillai wrote: > --- Leif Svalgaard <leif@leif.org> wrote: > > there will be a million answers to this one. > > Numeric is packed 15 digits with 10 before the > > decimal point and 5 after the point. > > I learned this when I started out, but I haven't got a > satisfactory answer to why this happens. I guess I am > asking whether this is by design or whether this is a > by-product of some other part of the design? It's both somewhat by design and a byproduct. Originally, there was no SBMJOB CMD() parameter. Somewhere back around V1R3 or so, IBM enhanced SBMJOB to add the parameter and make the command 'easier' to use. Before then, the RQSDTA() parameter was the only way to specify the command to execute. In order to make CMD() work reasonably well, IBM used existing support for command prompting, i.e., the command prompter that supports <F4> for commands. For most commands, this works very well because almost every command parameter has a clear definition; but the PARM() parameter of the CALL command must accept just abbout anything. No strong typing, no fixed lengths, etc. Without a definition of each PARM() value, the CALL command must rely on some defaults; hence, char(32) and dec(15 5). Further, once the CMD() value is accepted by the SBMJOB command processing program, it gets converted into an RQSDTA() value. This eventually becomes the actual request message that gets submitted. This all must work whether SBMJOB is compiled into a program or entered at a command-line. Technically, I suppose, the correct way to build a SBMJOB command that submits a CALL would still be to construct the RQSDTA() value rather than use CMD(). Here's a simple CLP to experiment with: pgm ( + &p1 + &p2 + &p3 + ) dcl &p1 *char 50 dcl &p2 *char 50 dcl &p3 *char 40 dmpclpgm return endpgm ...and here's a sample command-line CALL that is the first example: ===> call tstcmdparm + ('12345678901234567890123456789012abcdefgh ' + 'IJKLMNOPQR1234567890123456789012abcdefgh ' + '12345678901234567890123456789012abcdefgh') Note that declared lengths are all >32 and that the lengths of the parm values don't necessarily match. Changing the PARM() values results in oddities in the values shown by DMPCLPGM. Sending it through SBMJOB can show more details. Tom Liotta -- Tom Liotta The PowerTech Group, Inc. 19426 68th Avenue South Kent, WA 98032 Phone 253-872-7788 Fax 253-872-7904 http://www.400Security.com ___________________________________________________ The ALL NEW CS2000 from CompuServe Better! Faster! More Powerful! 250 FREE hours! Sign-on Now! http://www.compuserve.com/trycsrv/cs2000/webmail/
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.