Funny, I was just working on that this week. I am still in the process of
converting some old code I found on the net (still using B data type and
need to convert it to I). See my code below:
h dftactgrp(*no) actgrp(*caller)
d returndata s 2560
d datalength s 4b 0 inz(2560)
d ssts0200 s 8 inz('SSTS0200')
d rcdfmt s 8
d resetstatus s 10 inz('*NO')
d errorcode s 10
d s0200 ds inz
d status0200 1 256
d elapsedtim 25 30
d cpuusageb 33 36b 0
d jobsinsysb 37 40b 0
d prmadrusdb 41 44b 0
d tmpadrusdb 45 48b 0
d dasdingigb 49 52b 0
d dasdusdb 53 56b 0
d curunpusdb 61 64b 0
d maxunpusdb 65 68b 0
d dtabasusdb 69 72b 0
d mainstoragb 73 76b 0
d lparnbrb 81 84b 0
d curprocapb 89 92b 0
d processorb 97 100b 0
d jobsinsysab 101 104b 0
d curintperb 128 131b 0
/FREE
rcdfmt = ssts0200;
/END-FREE
c call 'QWCRSSTS'
c parm returndata
c parm datalength
c parm rcdfmt
c parm resetstatus
c parm errorcode
/FREE
s0200 = %subst(returndata:1:131);
*inlr = *on;
/END-FREE
HTH,
Aaron Bartell
http://mowyourlawn.com
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of James Lampert
Sent: Wednesday, February 13, 2008 7:16 PM
To: RPG programming on the AS400 / iSeries
Subject: Easy way to get LPAR from RPG?
Is there an easy way to get the LPAR number from RPG? One that works
under all OS releases that support LPARs?