Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Retrieving SERIAL NUMBER in a RPG III program

389 views
Skip to first unread message

Claude GUILLIOU

unread,
Nov 26, 1997, 3:00:00 AM11/26/97
to

I would like to retrieve the serial number in a RPG III program without
CALL by a CL program.
Does anyone have any ideas? Thanks.

Francis Lapeyre

unread,
Nov 26, 1997, 3:00:00 AM11/26/97
to Claude GUILLIOU

You can use the QWCRSVAL API to do this - I use it to get the system's
date format (because we have multiple machines in multiple countries).
The code I have is in RPG 4, though, but if you are interested, e-mail
me and I will send you an example.

--

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.

OSITim

unread,
Nov 27, 1997, 3:00:00 AM11/27/97
to

There is an API to retrieve system values. Look in the Work Management API
manual

djer...@earthlink.net

unread,
Nov 27, 1997, 3:00:00 AM11/27/97
to

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.....

Njal Fisketjon (Njål Fisketjøn)

unread,
Nov 28, 1997, 3:00:00 AM11/28/97
to

On Thu, 27 Nov 1997 16:59:36 GMT, djer...@earthlink.net wrote:

>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.

Helmut Salzer

unread,
Nov 28, 1997, 3:00:00 AM11/28/97
to

api QWCRSVAL is for retrieving system values.

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>...

Stephen Hunt

unread,
Nov 29, 1997, 3:00:00 AM11/29/97
to

I'm new to using API's. Any example code would be great (I've been told we
don't have and books on-site that cover such things <sigh>).

Helmut Salzer <salz...@eunet.at> wrote in article
<65m1l2$8qa$1...@news.Austria.EU.net>...

Gernot B Längle

unread,
Nov 29, 1997, 3:00:00 AM11/29/97
to

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

Beatrice Smith

unread,
Dec 5, 1997, 3:00:00 AM12/5/97
to

How would a school use a program called as400 as a kinda private county
school intranet system?????????

Michael Ryan

unread,
Dec 6, 1997, 3:00:00 AM12/6/97
to

Hmm....not quite sure of your question. Do you mean a program as in
curriculum? I developed the AS/400 curriculum for a community college and
we are now putting it on the Internet. It would just as easily be done
across a private intranet. Drop me a line if you would like to discuss this
further.

- Michael

0 new messages