The CPSYNTAX command has been around in VM for as long as we've had the SYSTEM CONFIG file. It is used to check the syntax of that file. The SYSTEM CONFIG file is only read by CP during IPL, and that is not a good time to discover that you have syntax errors in the file! Of course, the syntax checker can only check syntax, it can't tell you that you mistyped a device address or volume label. That is why you should keep backup copies of working config files or make sure you have recovery procedures if the system won't IPL correctly.
The SYSTEM CONFIG file has had the capability to define multiple systems in 1 file for a long time, but this capability was enhanced for SSI clusters. The System_Identifier and System_Identifier_Default statements (usually found at the top of the file) define a name for the system that can be referenced in the rest of the configuration file. (The "system identifier" may be called a system id, node id, or a member name.) This statement uses the model and CPU id or the LPAR name to associate a machine or LPAR to a system identifier. Then that name can be used to qualify statements in the SYSTEM CONFIG file that only apply to one system.
Anyway, this is all well and good, but when you run CPSYNTAX against a SYSTEM CONFIG file that defines multiple SSI members, the CPSYNTAX command requires you to specify the LPAR name or CPU id that will match one of the System_Identifier lines in the file. And, you will want to run CPSYNTAX against all of the SSI members that you have. I got tired of running CPSYNTAX multiple times to specify the LPAR name of each member, so I wrote the exec below and named it CPSYN EXEC. It reads all of the System_Identifier lines first and invokes CPSYNTAX for each member. Now, when I change SYSTEM CONFIG, I only need to enter CPSYN to do all of the syntax checks!
/* Run CPSYNTAX for all members of a SYSTEM CONFIG file */ /* Author: Bruce Hayden, IBM Advanced Technical Skills */ Address Command arg fn ft fm . If fn='' then fn='SYSTEM' If ft='' then ft='CONFIG' If fm='' then fm='*' 'PIPE <' fn ft fm, '| pick anycase w1 == "System_Identifier"', '| stem sysids.' If RC<>0 then Exit RC If sysids.0=0 then do say 'No System Identifiers found.' Exit 1 end 'EXEC VMLINK MAINT 193 (NONAMES NOTYPE PUSH' maxrc=0 Do i=1 to sysids.0 Parse upper var sysids.i . lpar lparname . If lpar<>'LPAR' then do /* CPUID specified */ lpar='CPUID' lpar lparname = translate(lparname,'0','%') /* CPUID wildcard is % */ end say 'Running CPSYNTAX for' lpar lparname 'EXEC CPSYNTAX' fn ft fm '('lpar lparname maxrc=max(RC,maxrc) If RC<>0 then say 'Return code' RC 'for' lpar lparname end 'EXEC VMLINK MAINT 193 (NONAMES NOTYPE POP' Exit maxrc