* NAME: Z6061999 PRODUCT: BASE CATEGORY: SPEC SYSTEM: CMS * DATE: 03DEC90 STATUS: DZ+UT USAGE-ID: V6-SYS.SYS-1999 * * The EXPLINK EXEC is to be used once to expand VVVZAP CSECT * * APPLY USING THE FOLLOWING SPECIAL INSTRUCTIONS: * 1) edit this file * 2) remove all line up to and including * 'DELETE DOWN TO HERE' * 3) rename Z6061999 ZAP to EXPLINK EXEC * 4) follow the instructions in the section entitled, * 'Usage:' * DELETE DOWN TO HERE /*---------------------------------------------------------------------- Title: EXPLINK EXEC Date written: November 1, 1990 Description: This is a REXX EXEC that facilitates the expansion of SAS CSECTs. Usage: 1. Link to the CMS minidisk where the SAS executable code is stored. 2. Invoke EXPLINK without any arguments. 3. EXPLINK will create a single-member loadlib on your A disk named "member" LOADLIB. If there were no errors, replace this member in the loadlib specified by the "ldlb" variable. The syntax for this command is: LOADLIB COPY member LOADLIB A "ldlb" LOADLIB fm (REPLACE See the CMS COMMAND REFERENCE for additional information. 4. Compress the LOADLIB. The syntax for this command is: LOADLIB COMPRESS "ldlb" LOADLIB fm Notes: 1. Be sure you have a large read/write disk (referred to hereafter as your working disk). This exec defaults to use your A disk, but you can change that via the FM variable in the VARIABLE LIST section). How large? The various files created by this exec using the default values are: Name Blocks ---- ------ SASV6MN LOADLIB 86 SASV6MN LKEDIT 88 SASV6MN TEXT 1 Blocksizes given are based on 3380 device blocked at 4096. The TEXT file mentioned is erased. 2. Use EXPLINK as shipped to expand CSECT VVVZAP. If you are expanding some other CSECT, you will have to alter the variables in the section marked VARIABLE LIST as instructed by SAS Tech Support. 3. Examine the LKEDIT map created to see what warning and/or error messages may have been generated. There will always be warnings, see Usage Note 3. Usage Notes: 1. This exec is designed specifically for increasing the size of the CSECT VVVZAP. 2. Another design specification is for a CSECT to be expanded only ONCE! Code is in place in this exec to try and check for previous expansions. Please keep track of what you have expanded. Don't run this exec EVERY time you apply a zap that has a Usage Note telling you to expand a particular CSECT. Just run it the FIRST time you have to zap that CSECT. 3. When EXPLINK is run with default values to expand CSECT VVVZAP, EXPLINK will terminate with an RC=4. When you are expanding other CSECTs EXPLINK may terminate with an RC=8 due to the following: CSECTs generated by C code have certain characters appended to their names and this exec attempts to order all CSECTs related to the one being expanded. For example, if you are expanding expanding CSECT "AAA@", EXPLINK will expand it, then attempt to order AAA:, AAA$, and AAA= right after AAA@. The linkage editor may not find all four of these and terminate with an RC=8. This is okay - just make sure it finds AAA@. 4. Here are three warning messages from the linkage editor that you may see that are expected and OK: IEW0670 THE SPECIFIED IDENTIFY DATA HAS BEEN ADDED TO THE IDR FOR THE CONTROL SECTION NAME PRINTED. IEW0740 THE INDICATED ACTION WAS TAKEN FOR AN EXPAND REQUEST. IEW0461 WARNING - SYMBOL PRINTED IS AN UNRESOLVED EXTERNAL REFERENCE; NCAL WAS SPECIFIED, OR THE REFERENCE WAS MARKED FOR RESTRICTED NO-CALL OR NEVERCALL. 5. This exec will erase certain files that may exist on the working disk. These are: "member" LOADLIB "member" TEXT 6. We recommend that this EXEC *** NOT *** be executed in an environment consisting of a VM/XA CP with a VM/SP CMS. Otherwise, results may be unpredictable if this EXEC is executed. ----------------------------------------------------------------------*/ address COMMAND save = queued() /* Save the stack */ /* VARIABLE LIST */ ldlb = 'SASBASE' /* Loadlib to be modified */ member = 'SASV6MN' /* Member where desired CSECT resides */ module = 'VVVZAP' /* Name of CSECT to expand */ bytes = 7168 /* Size of expansion (decimal) */ asm = 1 /* Assembly language-generated CSECT? */ fm = 'A' /* Filemode of working disk */ /* END OF VARIABLE LIST */ ldlb = strip(ldlb) /* Ensure blanks are stripped */ member = strip(member) module = strip(module) modlen = length(module) upper ldlb /* Ensure upper case */ upper member upper module /* Try and make sure that the correct suffix is appended to the CSECT name in case it was left out */ if ^asm & (substr(module,modlen,1) <> '@' & modlen < 8) then module = module || '@' /* If expanding VVVZAP on a one-time-only basis, set total number of bytes expanded to 7168 (7K) */ if module = 'VVVZAP' then bytes = 7168 /* We need to try and determine if someone has already expanded the CSECT specified by "module". We don't want to expand anything twice, we just want to expand a given CSECT ONCE and increase it to the maximum size. We'll rig this exec to write a message to the IDR of the CSECT when it does the expansion. If we find this message upon later invocations, we'll know not to do the expansion. */ expstr = module || ' EXPANDED' found = 0 say 'Searching' ldlb 'for previous expansions' 'EXECIO * DISKR' ldlb 'LOADLIB * ( LOCATE /' || expstr || '/ FIFO FINIS' if rc = 0 then do /* We found the string */ do while queued() > save /* Trash whatever EXECIO stacks */ pull line end found = 1 end if found then do /* Don't expand this */ say "EXPLINK: CSECT" module "has been previously expanded" say "EXPLINK terminating" exit 1 end else say "EXPLINK: CSECT" module "has not been previously expanded" /* Since we have gotten this far, we will expand the CSECT. We will create a file of linkage editor control statements and invoke the linkage editor. */ 'SET CMSTYPE HT' 'STATE' ldlb 'LOADLIB *' if rc ^= 0 then do say 'EXPLINK: unable to find' ldlb 'LOADLIB' exit rc end 'ERASE' member 'TEXT' fm /* Neither of these should exist */ 'ERASE' member 'LOADLIB' fm /* on the read/write disk now. */ 'FILEDEF SASLIB CLEAR' 'FILEDEF SYSLMOD CLEAR' 'SET CMSTYPE RT' 'MAKEBUF'; bno = rc queue 'TOP' queue 'DEL *' queue 'INPUT' queue ' INCLUDE SASLIB('member')' queue " IDENTIFY" module || "('" || module "EXPANDED" bytes "BYTES')" if module = 'VVVZAP' then do queue ' EXPAND' module'(4095)' queue ' EXPAND' module'(3073)' end else queue ' EXPAND' module'('bytes')' if member <> 'SASV6MN' then queue ' ORDER PGMCNSTS' queue ' ORDER' module /* Executable code CSECT */ if asm = 0 then do queue ' ORDER' module':' /* Constants CSECT */ queue ' ORDER' module'$' /* String literals, static data CSECT */ queue ' ORDER' module'=' /* Initialization data CSECT */ end queue ' ENTRY #DYNAMN' queue ' NAME' member'(R)' queue '' queue 'COMMAND FILE' 'SET CMSTYPE HT' 'XEDIT' member 'TEXT' fm '(NOPROFILE' 'SET CMSTYPE RT' /* Set up the needed FILEDEFs */ 'FILEDEF SASLIB DISK' ldlb 'LOADLIB * ( RECFM U BLKSIZE 32760' 'FILEDEF SYSLMOD DISK' member 'LOADLIB' fm '( RECFM U BLKSIZE 32760' /* Relink this thing */ 'LKED' member '( LET NCAL XFER MAP SIZE 320K AMODE 31 RMODE ANY XREF' rcsave = rc 'STATE' member 'LOADLIB' fm if rc ^= 0 then say 'EXPLINK: ' || member 'LOADLIB was not created' 'FILEDEF SASLIB CLEAR' 'FILEDEF SYSLMOD CLEAR' 'ERASE' member 'TEXT' fm exit rcsave