:sftpput catalog.pub.sys, remsys.hp.com, mgr.vance ftpput.vance --- SFTPPUT --- version A.06 Password for mgr.vance on remsys.hp.com? (MPE password syntax is 'user[,acct]') <--- password entered here ** encrypting file : /SYS/PUB/CATALOG ** transferring file: /SYS/PUB/CATALOG ===================================================== 1 file transferred successfully. 1 file was encrypted. And here is the spoolfile from the remote 3000: :JOB JDECRYPT,MGR.VANCE,FTPPUT. Priority = DS; Inpri = 8; Time = UNLIMITED seconds. Job number = #j1774. TUE, MAY 15, 2007, 6:41 PM. HP3000 Release: C.75.00 User Version: C.75.00 MPE/iX HP31900 C.45.05 Copyright Hewlett-Packard 1987. All rights reserved. :# This job was created by SFTPPUT.FTPTEST.VANCE to decrypt file :# /SYS/PUB/CATALOG sent from MYSYS at IP: 15.xx.yy.zzz. :# Job create time: TUE, MAY 15, 2007 6:41 PM :# Job created by user: JEFF.VANCE :# :# always purge this job since it may contain passwords. :purge jdecrypt >$null :# :if not finfo("./CATALOG.enc","exists") then *** EXPRESSION FALSE: COMMANDS IGNORED UNTIL MATCHING ELSEIF/ELSE /ENDIF : continue : tell mgr.vance; Encrypted file ./CATALOG.enc missing. Job stopped. : escape 1 :endif *** RESUME EXECUTION OF COMMANDS :setvar _decryptf "./"+basename("./CATALOG.enc",".enc")+".dec" :echo Decrypting ./CATALOG.enc as !_decryptf Decrypting ./CATALOG.enc as ./CATALOG.dec :setvar _rootfile "./CATALOG" :purge !_rootfile >$null :# decrypt the file based on the same key in the key file :input _key <./CATALOG.key :# local copy of crypt.hpbin.sys sent as "/CWD/CRYPT01" :# but crypt01 can be purged by a copy of this job :# running simultaneously. Try to handle this... :setvar _cryptF "CRYPT01" :if not finfo(_cryptF,"exists") then *** EXPRESSION TRUE : setvar _cryptF "CRYPT.HPBIN.SYS" : if not finfo(_cryptF,"exists") then *** EXPRESSION FALSE: COMMANDS IGNORED UNTIL MATCHING ELSEIF/ELSE /ENDIF : tell mgr.vance; Missing CRYPT program to decrypt file. : tell mgr.vance; Can't find CRYPT01 or CRYPT.HPBIN.SYS. : tell mgr.vance; ./CATALOG.enc needs to be decrypted. Job stopped. : escape 2 : endif *** RESUME EXECUTION OF COMMANDS :endif :# set up file equations for crypt :file jcryin=./CATALOG.enc,old :setjcw CJCW 0 :setvar HPCIERR 0 :continue :xeq !_cryptF "!_key" <*jcryin >*jcryout :if not (CJCW=0 and HPCIERR=0 and finfo(_decryptf,'exists')) then *** EXPRESSION FALSE: COMMANDS IGNORED UNTIL MATCHING ELSEIF/ELSE /ENDIF : tell mgr.vance; Decryption failed on ./CATALOG.enc. Job stopped. : escape 3 :endif *** RESUME EXECUTION OF COMMANDS :# save decrypted file for either FCOPY or the rename below :purge !_decryptf >$null :save !_decryptf :# don't fcopy the file if it was a bytestream file to begin with. :# convert decrypted file from bytestream to fixed file :file fcin=!_decryptf,old :file fcout=!_rootfile,new ;rec=-80,,F,ascii ;disc=14095 ;code=0 :setvar HPCIERR 0 :continue :fcopy from=*fcin;to=*fcout >$null :if not (HPCIERR=0 and finfo(_rootfile,'exists')) then *** EXPRESSION FALSE: COMMANDS IGNORED UNTIL MATCHING ELSEIF/ELSE /ENDIF : tell mgr.vance; FCOPY failed on !_decryptf. HPCIERR=!hpcierr. Job stopped. : escape 4 :endif *** RESUME EXECUTION OF COMMANDS :purge !_decryptf :# clean up :purge ./CATALOG.enc :purge ./CATALOG.key :purge crypt01 >$null :eoj CPU sec. = 2. elapsed min. = 1. TUE, MAY 15, 2007, 6:41 PM.