PDEM TITLE 'Front-end PIPEDEMO EXEC so EXECs w/ADDRESS COMMAND need*PDE00010 not "EXEC PIPEDEMO." ' PDE00020 *********************************************************************** PDE00030 * * PDE00040 * N N OOOO TTTTT EEEE This MUST be loaded with the RLDSAVE * PDE00050 * NN N O O T E option to permit it to be loaded at * PDE00060 * N NN O O T EEE any address. Whatever is being front- * PDE00070 * N NN O O T E ended may insist on running at 20000 or * PDE00080 * N N OOOO T EEEE may run in the TRANSient area. * PDE00090 * * PDE00100 *********************************************************************** PDE00110 * * PDE00120 * Input syntax: PDEM cms-pipeline-arguments * PDE00130 * Output: EXEC PIPEDEMO cms-pipeline-arguments * PDE00140 * (which is executed via CMSCALL macro) * PDE00150 * * PDE00160 * Purpose: Front-end the 'PIPEDEMO EXEC' so that an existing EXEC * PDE00170 * running the the 'COMMAND' environment (address command) * PDE00180 * and executing a PIPE need only be changed * PDE00190 * from: * PDE00200 * 'PIPE LITERAL This line just barely fits!! | CONSOLE' * PDE00210 * to: * PDE00220 * 'PDEM LITERAL This line just barely fits!! | CONSOLE' * PDE00230 * in place of shifting text around to fit in the usual: * PDE00240 * 'EXEC PIPEDEMO' , * PDE00250 * '| LITERAL This line just barely fits!! | CONSOLE' * PDE00260 * * PDE00270 * Author: Mike Walter, Hewitt Associates LLC * PDE00280 * * PDE00290 * Revision history: * PDE00300 * mm/dd/yyyy| |Comments * PDE00310 * ----------+---+----------------------------------------------------* PDE00320 * 11/07/1997 mrw Initial release * PDE00330 * 11/17/1997 mrw Support up to 2,048 command length (was 400). * PDE00340 * * PDE00350 *********************************************************************** PDE00360 SPACE , PDE00370 PDEM CSECT PDE00380 PDEM AMODE 31 PDE00390 PDEM RMODE ANY PDE00400 SAVE (14,12),,* Standard operating procedure PDE00410 LR R12,R15 Program Entry Point address as Base PDE00420 USING PDEM,R12 Establish Program Addressability PDE00430 LA R2,OURSAVE Point to our register savearea PDE00440 XC OURSAVE(4*18),OURSAVE Zero our register savearea PDE00450 ST R2,8(,R13) Forward chain, and ... PDE00460 ST R13,4(,R2) Backward chain the register savearea PDE00470 LR R13,R2 Point to the new register savearea PDE00480 B BEGIN Skip eye-catcher PDE00490 SPACE , PDE00500 DC CL8'PDEM' Eye-catcher PDE00510 DC CL8'&SYSDATE' Eye-catcher PDE00520 DC CL8'&SYSTIME' Eye-catcher PDE00530 DC C'Front-end to PIPEDEMO EXEC.' PDE00540 SPACE , PDE00550 BEGIN DS 0H PDE00560 * LR R15,R0 Save over wierd instruction PDE00570 * HER R0,R0 Weird instruction (HALVE) for use PDE00580 * when TRACEing, assembles as: 3400 PDE00590 * LR R0,R15 Restore PDE00600 SPACE , PDE00610 * Init SCANBUF area PDE00620 LA R2,SCANBUF Receiving field PDE00630 LA R3,LSCANBUF Length of receiving field PDE00640 LA R4,0 Dummy sending address PDE00650 LA R5,0 Zero length sending field (for pad) PDE00660 ICM R5,B'1000',=X'40' Blank filler character PDE00670 MVCL R2,R4 Initialize blanks for serial usage PDE00680 SPACE , PDE00690 *********************************************************************** PDE00700 * Determine the length of the passed arguments. * PDE00710 *********************************************************************** PDE00720 LR R10,R0 Pointer to input EPLIST PDE00730 USING EPLIST,R10 Let assembler use the macro PDE00740 SPACE , PDE00750 ***FYI** L R4,EPLCMD Addr of whole cmdstring entered. PDE00760 L R4,EPLARGBG Addr or cmdstring arguments. PDE00770 L R5,EPLARGND Ending address PDE00780 DROP R10 PDE00790 SR R5,R4 argend-argbegin = I/P arg len PDE00800 LR R6,R5 Save length for use in SCAN macro PDE00810 SPACE , PDE00820 *********************************************************************** PDE00830 * Move the input command arguments to the new prefixed-cmd area. * PDE00840 *********************************************************************** PDE00850 MOVEARGS DS 0H Move command args as entered. PDE00860 LA R2,PFXIPARG Point to Prefixed I/P Arg field PDE00870 LA R3,LPFXIPAR Fill length of field PDE00880 ICM R5,B'1000',=X'40' Pad char for PFXIPARG (o/p) field PDE00890 MVCL R2,R4 Move the original command text PDE00900 SPACE , PDE00910 *********************************************************************** PDE00920 * Build the new output PLIST and EPLIST. * PDE00930 *********************************************************************** PDE00940 LA R7,LPFXCMD Load length of command prefix PDE00950 AR R6,R7 Add to length of argstring PDE00960 LA R7,PFXDCMD Point to new O/P command PDE00970 SCAN TEXT=(PFXDCMD,(R6)),BUFFER=(SCANBUF,LSCANBUF), cPDE00980 ERROR=SCANERR1 PDE00990 SPACE , PDE01000 *********************************************************************** PDE01010 * Execute the new command as if 'ADDRESS COMMAND' - not taking a * PDE01020 * chance that there might be a 'some EXEC'! * PDE01030 *********************************************************************** PDE01040 CMSCALL DS 0H PDE01050 * A non-zero return code from 'whatever' is OK. PDE01060 CMSCALL PLIST=(R1),EPLIST=(R0),CALLTYP=EPLIST PDE01070 SPACE , PDE01080 RETURN DS 0H PDE01090 L R13,OURSAVE+4 Addr of calling pgm's savearea PDE01100 RETURN (14,12),,RC=(15) Restore callers regs and return PDE01110 SPACE , PDE01120 CMSCALL1 DS 0H PDE01130 ST R15,SAVERC Save return rc PDE01140 LINEDIT TEXT='CMSCALL (1) error, rc=....',SUB=(DEC,(2)) PDE01150 L R15,SAVERC Final return code PDE01160 B RETURN PDE01170 SPACE , PDE01180 SCANERR1 DS 0H PDE01190 LR R2,R15 PDE01200 ST R15,SAVERC Save the return code PDE01210 LINEDIT TEXT='PDEM: SCANERR1 SCAN macro error, rc=....', cPDE01220 SUB=(DEC,(2)) PDE01230 L R15,SAVERC PDE01240 B RETURN PDE01250 SPACE , PDE01260 *---------------------------------------------------------------------* PDE01270 * * PDE01280 * Storage Areas * PDE01290 * * PDE01300 *---------------------------------------------------------------------* PDE01310 SPACE , PDE01320 LTORG Literals PDE01330 OURSAVE DC 18F'0' Save area for this program PDE01340 SAVERC DC 1F'0' Save RETURN rc PDE01350 BLANK DC X'40' PDE01360 SPACE , PDE01370 PFXDCMD DS 0D PDE01380 PFXCMD DC CL4'EXEC' Prefix command with 'EXEC ' PDE01390 DC CL1' ' PDE01400 DC CL9'PIPEDEMO' Force to PIPEDEMO. PDE01410 DC CL1' ' PDE01420 LPFXCMD EQU *-PFXCMD Length of command prefix PDE01430 PFXIPARG DC 2048C' ' Input args as entered by user PDE01440 LPFXIPAR EQU *-PFXIPARG Length of users' input arg area. PDE01450 LPFXDCMD EQU *-PFXDCMD Complete prefixed command length. PDE01460 DS 0D PDE01470 SCANBUF DC 2048C' ' Scan macro output buffer. PDE01480 LSCANBUF EQU *-SCANBUF Scan buffer length. PDE01490 DC C'END OF PDEM.' Nice way to see the end PDE01500 SPACE , PDE01510 PRINT OFF PDE01520 REGEQU PDE01530 PRINT ON,GEN PDE01540 EPLIST Format of extended PLIST PDE01550 END PDEM PDE01560