26.0 DTASSM Command The DTASSM command calls some useful B34S UTILITY routines to build control decks, merge data files or prune the output file. Form of DTASSM COMMAND. B34SEXEC DTASSM$ BUILDDECK options parameters $ STRIP options parameters $ B34SEEND$ The DTASSM must contain either the BUILDDECK, or the STRIP sentence. The BUILDDECK sentence is used to put together control decks. The STRIP sentence allows the output file to be pruned. BUILDDECK sentence. The BUILDDECK sentence assumes the user has a number of decks and desires to put them together in a structured manner. BUILDDECK sentence options. NPRINT - Program will not list data being built. BUILDDECK sentence parameters. IOBS = n1 Sets final number of observations. Default = 10000. If end of file found, program terminates normally. INUMUN = n2 Final number of logical records in new file on unit INEWUN. Must be LE 99. INEWUN = n3 Sets logical unit for new file. Default = 30. At end of job, new unit is closed automatically. IOLDU=(n4,n5,n6) Sets logical unit of first record, second record, etc. The number of elements in IOLDU must be INUMUN. Sample job. User has three files each containing 100 observations and wants to to merge these units. One unit numbers are 31, 32, 33 and the new file is built on unit 40. b34sexec dtassm$ builddeck iobs=300 inewun=40 inumun=3 ioldu=(31,32,33)$ b34seend$ User has a file on unit 41 containing 6 logical records per observation for 2000 observations. User wants to place a new card from file on unit 42 in between old card 4 and 5. User does not want to print and wants to place new data on unit 50. JCL is shown. /*JOBPARM R=2048 // EXEC B34S //GO.FT41F001 DD DSN=U0007.MY.ORIG.DATA,DISP=SHR,LABEL=(,,,IN) //GO.FT42F001 DD DSN=U0007.MY.ADD.DATA,DISP=SHR,LABEL=(,,,IN) //GO.FT50F001 DD DSN=U0007.MY.NEW.DATA,DISP=(NEW,CATLG), // UNIT=TPUSER,SPACE=(TRK,(10,10),RLSE), // DCB=(LRECL=80,RECFM=FB,BLKSIZE=3200) //GO.SYSIN DD * B34SEXEC DTASSM$ BUILDDECK NPRINT IOBS=2000 INEWUN=50 INUMUN=7 IOLDU=(41,41,41,41,42,41,41)$ B34SEEND$ /* On the PC or unix the same problem would be: b34sexec options open('orig.dat') disp=old unit=41$ b34srun$ b34sexec options open('add.dat') disp=old unit=42$ b34srun$ b34sexec options open('new.dat') disp=unknown unit=50$ b34srun$ b34sexec options clean(50$ b34srun$ b34sexec dtassm$ builddeck nprint iobs=2000 inewun=50 inumun=7 ioldu=(41,41,41,41,42,41,41)$ b34srun$ Simple job where we put a card in an existing deck. /$ Illustrates DTASSM Building up a deck b34sexec options open('jj') unit(60) disp=unknown$ b34srun$ b34sexec options open('kk') unit(61) disp=unknown$ b34srun$ b34sexec options open('nn') unit(62) disp=unknown$ b34srun$ b34sexec options clean(60)$ b34srun$ b34sexec options clean(61)$ b34srun$ b34sexec options clean(62)$ b34srun$ b34sexec options copyf(4,60)$ datacards$ j1 j2 j3 b34sreturn$ b34srun$ b34sexec options copyf(4,61)$ datacards$ k1-1 k1-2 k2-1 k2-2 k3-1 k3-2 b34sreturn$ b34srun$ b34sexec dtassm $ builddeck inewun=62 inumun=3 ioldu=(60,61,61)$ b34srun$ b34sexec options copyfout('nn')$ b34srun$ b34sexec options close(60)$ b34srun$ b34sexec options close(61)$ b34srun$ /; Note Unit 62 closed at end of command!! b34sexec options dodos('erase jj','erase kk','erase nn') unix('rm jj','rm kk','rm nn')$ b34srun$ STRIP sentence. The strip sentence is designed to allow the outfile to be pruned so that what is produced is taylored for the user. There can be up to 200 STRIP sentences. The STRIP sentence MUST have a key word passed. STRIP sentence options BLANKOFF Does not blank the line found. This is the default. BLANKON Blanks the line found. LEADBLANK Looks for string when there are leading blanks. The default is only to look in Column 1. STRIP sentence parameters STRIP(' ') Sets string to look for. Search is from col 1. ADDTEXT(' ') Adds up to 10 lines of up to 72 characters after strip text found. JUMP(n1) Sets jump. n defaults to 1. If n > 1 then n-1 additional lines will be removed. COL(n2) Sets column to look if LEADBLANK has not been set. Default = 1. Example 1. Lines starting with 'Chow test' plus 2 more will be removed and replaced by blanks. b34sexec options run$ b34seend$ b34sexec dtassm$ strip('chow test') jump(3) blankon$ b34srun$ Example 2. Lines starting with 'Chow test' will be removed. Blanks will not replaced this line. b34sexec options run$ b34seend$ b34sexec dtassm$ strip('chow test') jump(1) blankoff$ b34srun$ Example 3. After lines starting with 'Chow test' 4 lines will be added b34sexec options run$ b34seend$ b34sexec dtassm$ strip('Chow test') addtext('Line 1', 'Line 2', 'Line 3', 'Line 4') jump(1) blankoff$ b34srun$ Example 4. Takes NAME OF THE SYSTEM AND 30 ADDED LINES OUT OF RUN # 1. The second call takes any line with ********* out. /$ Tests the STRIP option in DTASSM b34sexec options include('c:\b34slm\ch4.b34')$ b34seend$ b34sexec options run$ b34seend$ b34sexec dtassm$ strip('NAME OF THE SYSTEM') jump(30)$ b34srun$ /$ strip('NAME OF THE SYSTEM') blankon jump(31)$ b34srun$ /$ Test # 2 removes all ******************* for all of file /$ NAME OF THE SYSTEM IN FOR CASE # 2 b34sexec options include('c:\b34slm\ch4.b34')$ b34seend$ b34sexec options run$ b34seend$ b34sexec dtassm$ strip('******************') blankon leadblank$ b34srun$