$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! $! $! EDR_COPY.COM $! $! This command procedure will create the JCL to submit multiple $! copy jobs on the IBM 9021. $! $! written by Tim McClanahan code 694 $! $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! $ set Noon $ delete/noconfirm/before ftpfile.dat;* $ delete/noconfirm/before jclfile.dat;* $ set on $ on control_y then exit $ on error then goto errmsg $ wo :== write sys$output $ ask:== inquire $ clr :== @sys$system:clear.com $ AGAIN: $ clr $ wo " ===================================================" $ wo " ===== CREATE EDR EDR COPY JCL ====================" $ wo " ===================================================" $ wo " * Will copy 1 year of EDR's on IBM 9021 to disk " $ wo " * EDR names must be on standard increments of " $ wo " * 5 or 30 days. $ wo "" $! $ ask id " Enter the IBM 9021 (GIBBS) USER ID " $ set terminal/noecho $ ask pass " Enter the IBM 9021 (GIBBS) PASSWORD " $ set terminal/echo $ id = f$edit(id,"trim,upcase") $ pass = f$edit(pass,"trim,upcase") $! $ SCID: $ ask spccft " Enter Spacecraft ID (A = VGR-1, B = VGR-2) " $ if spccft .nes. "A" .and. spccft .nes. "B" $ then $ wo "" $ wo " Invalid entry! Enter A or B only. $ wo "" $ goto scid $ endif $ if spccft .eqs. "A" then spcval = "1" $ if spccft .eqs. "B" then spcval = "2" $ ask year " Enter Year of Coverage (2 digits) " $ ask edrcnt " Enter FIRST FILE Day extension (3 digits) " $ ask endcnt " Enter LAST FILE Day extension (3 digits) " $ ask dayinc " Enter EDR time length in days (5 or 30) " $ ask dsname " Enter DSname on tape (MAG,MAGEDR,MAG31,MAG32) " $ spccft = f$string(spccft) $ year = f$string(year) $ dsname = f$string(dsname) $ ecnt = f$integer(edrcnt) $! $ ANOTHER_EDR: $ if f$length(ecnt) .eqs. 1 then p = "00" $ if f$length(ecnt) .eqs. 2 then p = "0" $ if f$length(ecnt) .eqs. 3 then p = "" $ c = f$string(ecnt) $ file'ecnt' :== 'year''spccft''p''c' $ ecnt = ecnt + dayinc $ if ecnt .le. endcnt then goto another_edr $! $ RUN_REBLCK: $ wo "" $ wo " Are these PARAMETERS correct?" $ ecnt = f$integer(edrcnt) $ cnt = 1 $ wo "" $ wo " IBM 9021 (GIBBS) ID = ",id $ wo "" $ WRITCHK: $ wo " FILE #",cnt," = ",file'ecnt' $ cnt = cnt + 1 $ ecnt = ecnt + dayinc $ if ecnt .le. endcnt then goto writchk $ wo "" $ wo " DSNAME = "'dsname' $ wo "" $ ask yesno " Enter (Y/N)" $ if yesno .eqs. "N" then goto again $ wo "" $ ask class " Enter the job class (A,E,F,N) " $ ask msgclass " Enter the output class (A,X) " $ ecnt = f$integer(edrcnt) $ open/write jcl_file jclfile.dat $ write jcl_file "//",id,"DSK JOB (U0016,N598,40)," $ write jcl_file "// TIME=(9,59)," $!write jcl_file "// CLASS=N,NOTIFY=",id,"," $!write jcl_file "// MSGCLASS=X" $ write jcl_file "// CLASS=",class,",NOTIFY=",id,"," $ write jcl_file "// MSGCLASS=",msgclass $ CREATE_JCL: $ write jcl_file "//COPY",'cnt'," EXEC PGM=IEBGENER,REGION=500K" $ write jcl_file "//SYSPRINT DD SYSOUT=*" $ write jcl_file "//SYSIN DD *" $ write jcl_file "//SYSUT1 DD UNIT=T3480,DISP=(OLD,KEEP)," $ write jcl_file "// DCB=(RECFM=U,BLKSIZE=11280),DSN="'dsname'"," $ write jcl_file "// LABEL=(,SL,,IN)," $ write jcl_file "// VOL=(PRIVATE,SER=(",file'ecnt',"))" $ write jcl_file "//SYSUT2 DD DSN=XRTPM.E",file'ecnt',".EDR,UNIT=USERDA," $ write jcl_file "// DISP=(NEW,CATLG,DELETE)," $ write jcl_file "// DCB=(RECFM=U,BLKSIZE=11280)," $ write jcl_file "// SPACE=(CYL,(200,10),RLSE)" $ write jcl_file "//FTPIT EXEC PGM=FTP" $ write jcl_file "//INPUT DD *" $ write jcl_file "lepvgrcd" $ write jcl_file "anonymous" $ write jcl_file "voyager" $ write jcl_file "type i" $ write jcl_file "cd v"'spcval' $ write jcl_file "cd edr" $ write jcl_file "cd y"'year' $ write jcl_file "put 'XRTPM.E",file'ecnt',".EDR' E",file'ecnt',".EDR" $ write jcl_file "dir" $ write jcl_file "quit" $ write jcl_file "//OUTPUT DD SYSOUT=*" $ cnt = cnt + 1 $ ecnt = ecnt + dayinc $ if ecnt .le. endcnt then goto create_jcl $ write jcl_file "//" $ close jcl_file $! $! FTP session created and submitted for recovery from IBM to LEPVGRCD $! $ open/write ftp_file ftpfile.dat $ write ftp_file "put jclfile.dat" $ write ftp_file "exit" $ close ftp_file $ ftp/username='id'/password='pass' GIBBS /novms_structure - /take_file=ftpfile.dat $ sbmt :== submit/remote $!define ibm gibbs"""id pass""":: $ blank :== " " $ decn :== "gibbs"""""""'id''blank''pass'""""""":: $ define ibm 'decn' $ sbmt ibm::jclfile.dat $!delete jclfile.dat;* $!delete ftpfile.dat;* $ wo "" $ wo " EDR copy job submitted to the GIBBS node" $ wo "" $ exit $ ERRMSG: $ wo "" $ wo " Process error encountered. Procedure terminated. $ wo "" $ exit