Print Page | Close Window

Using NOTEPAD to change data

Printed From: Rocket Software
Category: AccuTerm Knowledge Base (read only)
Forum Name: Code Samples
Forum Description: Share your code samples and discuss the bundled sample programs
URL: https://forum.asent.com/forum_posts.asp?TID=1322
Printed Date: March 26 2026 at 5:07pm
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


Topic: Using NOTEPAD to change data
Posted By: BigRonG
Subject: Using NOTEPAD to change data
Date Posted: June 20 2008 at 5:35am
I have discovered how to call NOTEPAD to either display data or enter data.  However, I have not discovered how to display data and change it then save it.  The DOSSVC call implies that it will display and then save the changed data.  However, I have not been able to do so.
 
D3 on AIX - Wyse 50 term - Accuterm 2k2 5.2a
 
If someone has code that will do so and is willing to let me peak, I would be grateful.



Replies:
Posted By: DanWagner
Date Posted: July 02 2008 at 4:30am

program below uses D3 file and item , uses NOTEPAD and then writes to D3 file (  Dan Wagner  Taurus Computer Group E Syracuse NY

* AT.NOTEPAD
* DAN WAGNER 4/1/2007  FOR ACCUTERM TESTING
* USE NOTEPAD TO ENTER TEXT INFORMATION
  SVM=CHAR(252)
   VM=CHAR(253)
  AM=CHAR(254)
PRINT 'ENTER FILE':
INPUT FILE
OPEN FILE TO F.FILE ELSE
CRT " no  ":FILE:" file on system stop "
STOP
END
*
PRINT 'ENTER ID':
INPUT ID
IF ID = "" THEN
CRT " must enter a ID  or E to End Exit ":;INPUT ID
IF ID = "E" THEN STOP
IF ID = "Exit" THEN STOP
IF ID = "X" THEN STOP
END
READ ITEM FROM F.FILE,ID ELSE ITEM=''
TMP.TXT=ITEM
ORIG.TXT=ITEM
CALL DOSSVC('NOTEPAD C:\TEMP\TMP.TXT','C:\TEMP','TMP.TXT',ITEM,'C:\TEMP','TMP.TXT',NEWITEM)
WRITE NEWITEM ON F.FILE,ID
IF NEWITEM # ORIG.TXT THEN
CRT " changed item using NOTEPAD "
END
*
CRT "wrote ":ID:" to ":FILE
END*-------   end of program
* this program puts ITEM into C:TEMP  either change c:\temp OR
* make a C:\TEMP folder for notepad to use .

 


Posted By: BigRonG
Date Posted: July 15 2008 at 2:25am
Well, I have been playing with this snippet.  It is very like the ones that I created myself.  The biggest problem that I am having is that the call doesn't wait for me to enter anything into Notepad.  It opens the Notepad document and immediately drops back into D3.  Am I setup wrong?  (The call is exactly like Dan's.)


Posted By: PSchellenbach
Date Posted: July 17 2008 at 11:45am
Hi Big Ron -

The DOSSVC subroutine has code in it that should make it wait until you close Notepad before it returns control to your program. I have not heard of this failing before. Is there anything unique about your environment?

Thanks,

Pete


Posted By: BigRonG
Date Posted: July 17 2008 at 12:04pm
I am not sure about unique environment issues - running on a Dell Inspiron 6000 laptop (1.63 ghz, 1 g ram) with XP Pro 2002 Svc Pk 3.  D3 is running on an AIX box remotely on the customer site.
 
However, I have found that the ATINPUTTXT sample program did everything that I needed to do.
 
So I have abandoned the use of the DOSSVC program.  However, I want to thank all of you for helping and responding.


Posted By: homerlh
Date Posted: July 17 2008 at 2:20pm
Big Ron,

If you are trying to edit some things on D3 and you are running AccuTerm, you should take the time to investigate the WED editor.

At the ">" prompt, you enter the command

WED BP MYPROGRAM (and press enter)

Up pops this wonderful full screen windows editor that does lots of wonderful things. You can have ten files open simultaneously.

Larry Hazel



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net