Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get-List / Save-List help...

Status
Not open for further replies.

ven1047

IS-IT--Management
Sep 4, 2011
1
0
0
US
I just started a new job and have been thrust into writing something in TCL which I've never done before. Here's the gist of what I'm trying to do.

From the main TCL page they have created a list as follows:

SSelect bla bla bla
SL BR1

They basically did a select and then saved the list under the name BR1.

Now they want me to make a program that uses a loop to access that list, saves it under incremental names, edits the new lists, and saves them.

The new program is created by:

ED CBP MYPROGRAMNAME.MC

I'm using the following commands to retrieve list BR1 and save it according to the variable COUNTER which manages the loop.

EXECUTE-CMD = "GET-LIST BR1"
EXECUTE-CMD = "SAVE-LIST BR" : COUNTER
EXECUTE-CMD = "EDIT-LIST BR" : COUNTER
EXECUTE-CMD = "C/TEXTTOCHANGE/CHANGETO" : COUNTER : "/G9999"
EXECUTE-CMD = "FI"
*THEN I OPEN IT SORT IT AND SAVE IT AGAIN
EXECUTE-CMD = "GET-LIST BR" : COUNTER
EXECUTE "SSELECT BLA BLA BLA"
EXECUTE-CMD = "SAVE-LIST BR" : COUNTER
*THEN I INCREMENT COUNTER AND DO THE LOOP

IT SEEMS TO BE WORKING CORRECTLY, BUT IT DOESN'T SEEM TO BE USING BR1 THAT WE SAVED FROM THE MAIN TCL SCREEN, OR SAVING IN THE SAME LOCATION THAT WE SAVED THE ORIGINAL BR1 LIST.

Does TCL use a directory structure where the lists from the main screen aren't accessible from within my little program and vice versa? If so, how can I word the commands within my little program to utilize and save to that same directory???

I know it's probably a stupid question, and my programming skills are laughable, but I hope someone can help.

-mike
 
Are you sure you're using plain Tcl and not SQL?

I can't figure out what you're trying to do and I'm pretty fluent in Tcl.

The term, "list", has a specific meaning in Tcl. Do you mean a Tcl list: a collection of elements? If so, when you say "They basically did a select and then saved the list under the name BR1" does that refer to some operation in Tcl? If so, what does "saved" mean?

_________________
Bob Rashkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top