! * 03-06-09 smt file transfer between MULTI-VALUE and DOS * this allows me to edit with wED procedure * it also allows me to work offline saving on my PC * and then back to the MULTI-VALUE environment * Note: * this version is being used in the QM environment * the 'PLZ' option should be used when logged on to QMWEB for Coyote applications ! *** for QM $CATALOGUE GLOBAL *** ! PROMPT '' DISP.HDR = \File Transfer via AccuTerm compliments of Computerized Data Mgmt Inc\ PICKFILE = "QM-DOCS:QMD.PGMS" ; * set to your preference PICKITEM = '' DEFDIR = "f:\qm-linux" ; * set to your preference DOSITEM = '' COMPILE.OPTIONS = '' ; * set to your preference EXECUTE \PTERM CASE NOINVERT\ ; * for AccuTerm ! 100 * MULTI-VALUE account and file ! CRT @(-1):DISP.HDR CRT @(0,2):\'Q'uit, MULTI-VALUE file or for \: CRT @(0,3):PICKFILE GOSUB 18900 IF DIO = "Q" OR DIO = "EX" THEN GOTO 20000 IF DIO = '' THEN DIO = PICKFILE PICKFILE = DIO IF PICKFILE = '' THEN GOTO 100 OPEN PICKFILE TO THEFILE ELSE CRT \Can't open \:PICKFILE:\ \:;GOSUB 18900;GOTO 100 END DOSDIR = PICKFILE CONVERT ":" TO "\" IN DOSDIR CONVERT "," TO "\" IN DOSDIR DOSDIR = DEFDIR:"\":DOSDIR ! 200 * DOS directory ! CRT @(-1):DISP.HDR CRT @(0,2):\PICK file: \:PICKFILE CRT @(0,3):@(-3):\'Q'uit, DOS directory or for \ CRT @(0,4):DOSDIR INPUT DIO IF DIO = '' THEN DIO = DOSDIR IF DIO = "Q" OR DIO = \q\ OR DIO = "EX" THEN GOTO 200 DOSDIR = DIO ! 300 * PICK item ! CRT @(-1):DISP.HDR CRT @(0,2):\PICK file: \:PICKFILE CRT @(0,3):\DOS directory: \:DOSDIR CRT @(0,4):\'Q'uit, PICK item \: IF PICKITEM # '' THEN CRT \or for \ CRT @(0,5):PICKITEM END GOSUB 18900 IF DIO = "Q" OR DIO = \q\ OR DIO = "EX" THEN GOTO 100 IF DIO = '' THEN DIO = PICKITEM PICKITEM = DIO IF PICKITEM = '' THEN GOTO 100 * DOSITEM = PICKITEM ; * one to one no 'renaming' ! 350 * ! CRT @(-1):DISP.HDR CRT @(0,2):\PICK file: \:PICKFILE:\ PICK item: \:PICKITEM CRT @(0,3):\DOS directory \:DOSDIR CRT @(0,4):\'Q'uit, DOS item or for \ CRT @(0,5):DOSITEM GOSUB 18900 IF DIO = "Q" OR DIO = \q\ OR DIO = "EX" THEN GOTO 100 IF DIO = '' THEN DIO = DOSITEM DOSITEM = DIO CRT @(0,4):@(-3):\DOS item \:DOSITEM ! 400 * OUT to DOS or IN from DOS ! CRT @(0,5):@(-3):\'Q'uit, 'E'xport to DOS or 'I'mport from DOS \:;GOSUB 18900 IF DIO = '' OR DIO = \q\ OR DIO = "Q" OR DIO = "EX" THEN GOTO 300 BEGIN CASE CASE DIO = \E\ GOSUB 18000 CASE DIO = \I\ GOSUB 18500 CASE 1 ; GOTO 400 END CASE GOTO 400 ! 18000 * EXPORT to DOS ! CRT @(-1):DISP.HDR MODE = \EXPORTFT\ ; MSG = '' CALL ACCUTERM.FILE.TRANSFER.SUB(DOSDIR,DOSITEM,MODE,MSG,PICKFILE,PICKITEM) IF MSG # '' THEN GOSUB 19900 RETURN ! 18500 * IMPORT from DOS ! CRT @(-1):DISP.HDR MODE = \IMPORTFT\ ; MSG = '' CALL ACCUTERM.FILE.TRANSFER.SUB(DOSDIR,DOSITEM,MODE,MSG,PICKFILE,PICKITEM) IF MSG # '' THEN GOSUB 19900 ELSE GOSUB 19100 RETURN ! 18900 * dio routine ! INPUT DIO: DIO = TRIM(DIO) ; DIO = OCONV(DIO,"MCU") ; DIO = OCONV(DIO,"MCP") RETURN ! 19100 * compile or PLZ ! CRT @(0,3):@(-3) CRT \'C'ompile or 'P'LZ ('C','P', or ) \:;GOSUB 18900 IF DIO = \C\ THEN VERB = \BASIC \:PICKFILE:\ \:PICKITEM:COMPILE.OPTIONS EXECUTE VERB CRT \ \:;INPUT DIO: END IF DIO = \P\ THEN VERB = \PLZ \:PICKFILE:\ \:PICKITEM EXECUTE VERB CRT \ \:;INPUT DIO: END RETURN ! 19900 * errmsg routine ! LOOP UNTIL MSG='' DO LMSG=LEN(MSG) IF LMSG > 78 THEN SPCS=COUNT(MSG[1,78], " ") + 1; B=FIELD(MSG[1,78], " ", SPCS) LST.CHAR=COL1() END ELSE LST.CHAR=LMSG NXT.CHAR=LST.CHAR + 1 CRT @(0,23):@(-3):MSG[1,LST.CHAR]:" ":; INPUT RET: MSG=MSG[NXT.CHAR,999] REPEAT CRT @(0,23):@(-3): RETURN ! 20000 * end of program ! END