Rocket Software Homepage
Forum Home Forum Home > AccuTerm Knowledge Base (read only) > Code Samples
  New Posts New Posts RSS Feed - Using NOTEPAD to change data
  FAQ FAQ  Forum Search   Register Register  Login Login

The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum.

Forum LockedUsing NOTEPAD to change data

 Post Reply Post Reply
Author
Message
BigRonG View Drop Down
Newbie
Newbie


Joined: June 02 2008
Location: United States
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote BigRonG Quote  Post ReplyReply Direct Link To This Post Topic: Using NOTEPAD to change data
    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.
Back to Top
DanWagner View Drop Down
Newbie
Newbie


Joined: July 02 2008
Location: United States
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote DanWagner Quote  Post ReplyReply Direct Link To This Post 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 .

 
Back to Top
BigRonG View Drop Down
Newbie
Newbie


Joined: June 02 2008
Location: United States
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote BigRonG Quote  Post ReplyReply Direct Link To This Post 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.)
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
BigRonG View Drop Down
Newbie
Newbie


Joined: June 02 2008
Location: United States
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote BigRonG Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
homerlh View Drop Down
Beta Tester
Beta Tester


Joined: November 11 2004
Location: United States
Status: Offline
Points: 288
Post Options Post Options   Thanks (0) Thanks(0)   Quote homerlh Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.