0

Is it possible to compute a file member removal in a rpgle program from a development lpar.

   eg: RMVM FILE(LIB/FILE1) MBR(PAR1981181)

and performing updates on a different file in a different lpar altogether?

 UPDATE "SCDTA.CORP"/AR#RMTPRL9 
SET SENTFLAG = ' ', DATESENT = '0001-01-01', TIMESENT = '00:00:00', XMITT# = 0, LOCATION =   'PACI175A', ARBATCH# = ' ' 
 WHERE LOCATION = 'PACI173A' AND ARBATCH# = 'PAR1981181'    

How exactly can one perform setting of lpars in one single program?Is this possible. Please guide.

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
learning_fly
  • 382
  • 1
  • 2
  • 11

2 Answers2

2

These operations can be be done by using DDM and RUNRMTCMD to link the LPAR's as remote systems.

For more information see:

James Allman
  • 40,573
  • 11
  • 57
  • 70
  • Appreciate the help. How could I possibly incorporate this as a programming construct in a RPG or CL? – learning_fly Feb 03 '13 at 17:42
  • 1
    @learning_fly The documentation will guide you through the details but the gist of it is to create a DDM connection between the two LPAR's and then use the DDM file for SQL execution and `QCMDEXEC` for command execution of the `RMVM` command wrapped in a `RUNRMTCMD` command. – James Allman Feb 03 '13 at 17:47
1

If you are on release 7.1 and have the appropriate PTF group loaded, then you can use 3-part naming in SQL. This let's you qualify a table reference with the database (ie. RDB directory entry) and schema (ie. library).

For example:

UPDATE OTHERSYS.SCDTA_CORP.AR#RMTPRL9 
  SET SENTFLAG = ' ' 
    , DATESENT = '0001-01-01'
    , TIMESENT = '00:00:00'
    , XMITT#   = 0
    , LOCATION = 'PACI175A'
    , ARBATCH# = ' ' 
  WHERE LOCATION = 'PACI173A'
    AND ARBATCH# = 'PAR1981181'  
WarrenT
  • 4,502
  • 19
  • 27