--
Francis Lapeyre flap...@communique.net
____________________________________________________________
| |
| "The probability of life originating from accident is |
| comparable to the probability of the Unabridged Dictionary |
| resulting from an explosion in a printing factory." |
| |
| --Prof. Edwin Conklin |
|____________________________________________________________|
****** Unsolicited commercial e-mail is not tolerated here. *******
****** Senders of such mail do so at their own peril. *******
****** A copy, complete with header, is forwarded to the *******
****** originating ISP for action. *******
Opinions are my own. Otherwise, they are someone else's.
i used to do this same thing to CAT fields BEFORE we got cat.....
>why not just take the easy way out and write a small, simple CLP
>program to RTVSYSVAL QSRLNBR and call it from an rpg, then pass it
>BACK to the RPG programm ?????
>
>i used to do this same thing to CAT fields BEFORE we got cat.....
Because it would then be far too easy to replace that CL program by
your own program, and thus bypass the (assumed) security check.
Greetings
Helmut Salzer
Webmaster
Lauda's CARFOX
webm...@laudas-carfox.co.at
http://www.laudas-carfox.co.at/carfox/
Privat: http://members.eunet.at/salzer.h/as400.htm
Njal Fisketjon (Njål Fisketjøn) schrieb in Nachricht
<347f024b...@news.allianse.no>...
Helmut Salzer <salz...@eunet.at> wrote in article
<65m1l2$8qa$1...@news.Austria.EU.net>...
Here's an example RPG program that uses the QWCRSVAL API to retrieve
Serial and Model number:
0027.00 IERRBLK DS
0028.00 I B 1 40BYTEPR
0029.00 I B 5 80BYTEAV
0030.00 I 9 15 EXPID
0031.00 I 16 16 RSVRD
0032.00 I 17 66 EXPDTA
0033.00 IRCVVAR DS 64
0034.00 I B 1 40BR
0035.00 I B 5 80B1
0036.00 I B 9 120B2
0037.00 ISNDPRM DS
0038.00 I B 1 40VARNO
0039.00 I B 5 80RCVLNG
0040.00 * SYSTEM VALUE INFORMATION TABLE
0041.00 ISVIT DS 64
0042.00 I 1 10 SVL
0043.00 I 11 11 TP
0044.00 I 12 12 STS
0045.00 I B 13 160VLEN
0046.00 I 17 64 SVALU
0066.00 *
0067.00 I 'QMODEL QSRLNBR 'C SYSVS
0068.00 *
0082.00 * GET SERIAL NUMBER/MODEL
0083.00 * Returns SYSSER and SYSMOD
0084.00 *
0085.00 C EXSR GTSER
0308.00
*****************************************************************
0309.00 * GTSER - RETRIEVE SERIAL AND MODEL NUMBER
0310.00
*****************************************************************
0311.00 C GTSER BEGSR
0312.00 *
0313.00 C Z-ADD50 BYTEPR
0314.00 C MOVE *BLANKS EXPID
0315.00 C MOVE *BLANKS EXPDTA
0316.00 C CALL 'QWCRSVAL'
0317.00 C PARM RCVVAR
0318.00 C PARM 64 RCVLNG
0319.00 C PARM 2 VARNO
0320.00 C PARM SYSVS VALUES 20
0321.00 C PARM ERRBLK
0322.00 * GET FIRST TABLE
0323.00 C RCVLNG SUB B1 LENGTH 30
0324.00 C B1 ADD 1 ST 30
0325.00 C EXSR GTSVAL
0326.00 * GET SECOND TABLE
0327.00 C RCVLNG SUB B2 LENGTH 30
0328.00 C B2 ADD 1 ST 30
0329.00 C EXSR GTSVAL
0330.00 C ENDSR
0335.00
*****************************************************************
0336.00 * GTSVAL - EXTRACT SYSTEM VALUE FROM VALUE TABLE
0337.00
*****************************************************************
0338.00 C GTSVAL BEGSR
0339.00 C LENGTH SUBSTRCVVAR:ST SVIT
0340.00 1B C SELEC
0341.00 1X C SVL WHEQ 'QSRLNBR'
0342.00 * EXTRACT SERIAL NUMBER
0343.00 C VLEN SUBSTSVALU:1 SYSSER 8
0344.00 1X C SVL WHEQ 'QMODEL'
0345.00 * EXTRACT MODEL
0346.00 C VLEN SUBSTSVALU:1 SYSMOD 4
0347.00 1E C ENDSL
0348.00 C ENDSR
- Michael