Showing posts with label remote system. Show all posts
Showing posts with label remote system. Show all posts

11/20/09 Simplify replication of devices between two systems by matching hardware resource names

Is CMN01 a V.32 interface on your source and an ethernet port on your target? That can prevent device descriptions from replicating properly.

You can change the resource names so that they match, by using system service tools (SST). You may have to juggle a bit and create temporary resource names in order to move things around (because you can’t have duplicates), but with a little work, you can match up the important ones.

Enter system service tools with the STRSST command (you must have *SERVICE special authority, and you’ll need a user name and password for SST (it’s different from your regular login).

  • From the SYSTEM SERVICE TOOLS (SST) menu, select option 1 (START A SERVICE TOOL)
  • From the START A SERVICE TOOL menu, select option 7 (HARDWARE SERVICE MANAGER)
  • Use option 1 (PACKAGING HARDWARE RESOURCES) and drill down to help you find resource names attached to your hardware
  • To rename a resource:
    1. Use option 3 (LOCATE RESOURCE BY RESOURCE NAME)
    2. Enter the existing name for the resource on the prompt
    3. Use option 2 (CHANGE DETAIL) to give the resource a new name

This way, you can make CMN01 match on both source and target, and easily replicate the configuration of the v.32 line, and all the associated controllers and devices. Make sure you’re not using any of the resources you’re changing, and when you do change them, make certain your existing devices and controllers are updated with the right resource names.

Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2009, Vision Solutions, Inc. All rights reserved. Vision Solutions develops and sells iSeries high availability and AIX replication and clustering solutions. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.

8/09/09 Using RUNRMTCMD to tell other systems to perform tasks and run scripts

You can have Linux, UNIX and Windows servers do tasks and runs scripts right from an i5/OS command line or a CL program. If you use CL, your program will even wait until the other sever completes its task before moving to the next instruction.

Use the RUNRMTCMD command and enter the foreign system command in the COMMAND parameter, the IP address or host name in the REMOTE LOCATION parameter, and indicate *IP for Type. Of course, you’ll also need a user name and password for the remote server.

The RUNRMTCMD will end and the next CL statement will execute when the command completes on the target system. If you want things to happen "asynchronously," use the COMMAND parameter to run a script on the foreign system that submits another job or spawns off another process. Just remember, whatever process you invoke on the target system has to finish before control returns to your CL. If the target system gets stuck, so does your program.

Using this command can also be a handy way to automatically perform functions when switching servers using the your high availability automation; you can trigger scripts that automatically change DNS, clear DNS cache, alter software configurations, and more.


Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2009, Vision Solutions, Inc. All rights reserved. Vision Solutions develops and sells iSeries high availability and AIX replication and clustering solutions. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.

5/8/09 How to execute a command on a remote system using FTP

Simply type the command as you normally would, but have it preceded by "QUOTE RCMD"

For example:

QUOTE RCMD CHKOBJ OBJ(QGPL) OBJTYPE(*LIB)

QUOTE RCMD CALL PGM(Yourpgm/Yourlib) PARM(Parms)


Disclaimer:Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2009, Vision Solutions, Inc. All rights reserved. Vision Solutions develops and sells iSeries high availability and AIX replication and clustering solutions. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.

10/22/08 How to view remote systems that can be accessed from a local system.

To show what remote systems you can access from a local system, simply use the WRKLNK/QFileSvr.400/* command. This will show you the remote system names that are accessible as they will appear as directories.

What if the remote system you wish to access does not appear in the list of directories? Simply create a directory of the same name as the system you wish to access. The name of the system is the TCP/IP host name or the SNA name of the remote system. Note: The QSERVER subsystem must be active on the remote system that you wish to connect to in this way.




Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2008, Vision Solutions, Inc. All rights reserved. IBM, System i, iSeries, i5/OS and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.

10/15/08 How to access IFS objects on a remote system.

To access the IFS on a remote system, type the following on a command line: WRKLNK/qfilesvr.400/(system name). For instance, if you are on system "ABC02" and want to access the IFS on system "ABC01", the command would be: WRKLNK/qfilesvr.400/ABC01.
The resulting screen shows the entire IFS file system on system ABC01. From here, you can do anything in the IFS that you can do if you were locally connected to ABC01 (including creating IFS objects, removing IFS objects, etc.).

Next week’s tip will show you how to quickly see what remote systems you can access from a local system, and even how to access a system that you can’t see.



Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2008, Vision Solutions, Inc. All rights reserved. IBM, System i, iSeries, i5/OS and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.

08/12/08 Creating a single startup program for multiple systems

This tip is particularly useful if you are using an iSeries high availability product for disaster recovery purposes. The idea is to create one startup program that will work on two or more systems -- one source code for multiple systems.

Use a data area to define the system's role in the iSeries replication environment. For example, the production system data area would have a setting of SRC and the backup system the setting of TGT. You may also want to define a value of SWT when the system is in the process of switching.

When a system is the production system, you want production subsystems/processes to start when the system is IPL'd. When a system is the backup system, you likely do not want these subsystems/processes to be started when the backup system is IPL'd. Of course, there will be some things you will want to start on all systems regardless of its role.

In the startup program, retrieve the pre-defined data area and then process accordingly.

Example source code for the startup program:


PGM

DCL VAR(&SYSROLE) TYPE(*CHAR) LEN(3)
RTVDTAARA DTAARA(YOURLIB/SYSROLE (1 3)) RTNVAR(&RTNVAL)
MONMSG MSGID(CPF1015) EXEC(CHGVAR VAR(&RTNVAL) +
VALUE('UNK'))

SELECT
WHEN COND(&SYSROLE = 'SRC') THEN(DO)

/* INSERT COMMANDS TO RUN WHEN SYSTEM IS THE SOURCE */

ENDDO

WHEN COND(&SYSROLE = 'TGT') THEN(DO)

/* INSERT COMMANDS TO RUN WHEN SYSTEM IS THE TARGET */

ENDDO

WHEN COND(&SYSROLE = 'SWT') THEN(DO)

/* INSERT COMMANDS TO RUN WHEN SYSTEM IS MID SWITCH */

ENDDO
ENDSELECT

/* INSERT COMMANDS TO RUN REGARDLESS OF SYSTEM ROLE */

ENDPGM



Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2008, Vision Solutions, Inc. All rights reserved. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.

2/27/08 How to call batch program on remote system.

Generic evoke request (ability to call batch program on remote system) via SNA

CLP Source

$$EVOKETCL: PGM
OVRICFF FILE(QICDMF) ACQPGMDEV(QSNADS)
OVRICFDEVE PGMDEV(QSNADS) RMTLOCNAME(SNIC03ND)
CALL PGM($$EVOKET) PARM('PROGRAM' 'PSWD' +
'USER' 'LIBRARY')
ENDPGM


RPG Source

FQICDMF O F 80 WORKSTN
C *ENTRY PLIST
C PARM $PGM 8
C PARM $PSWD 8
C PARM $USER 8
C PARM $LIB 8
C EXCPTEVOKE
C MOVE '1' *INLR
OQICDMF E EVOKE
O K8 '$$EVOKET'
O $PGM 8
O $PSWD 16
O $USER 24
O $LIB 32


Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2008, Vision Solutions, Inc. All rights reserved. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation.