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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Output cursor manipulation in rexx

Status
Not open for further replies.

acheait

Programmer
Nov 21, 2007
7
US
I'm trying to be fancy with my rexx script and give feedback to the users when processing a large number of input.

Here's how the script output look now:
USER.NODE.SRCLIB .............................. CREATED
USER.NODE.LOADLIB.............................. CREATED
USER.NODE.PROCLIB.............................. CREATED

What I want to do is to print the dataset name first and hold off showing the 'CREATED' part until the dataset is actually created. The only thing holding me back is that I don't know how to move the output cursor back to the previous line so that 'Say CREATED' would appear on the same line as the dataset name.
I googled about this, but all I got is cursor manipulation when reading data in from a file...

Does anyone know of a way to manipulate the output cursor?

Thanks

 

Not in REXX. You may want to consider CLIST (horrors!) for your output routine.

The only other alternative I can think of is a pop-up ISPF panel which you would CONTROL DISPLAY LOCK and then write your text in a scrollable area.


Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
Thanks for the suggestion. I'll try the ISPF panel approach. I really prefer not to get involved with CLIST.

 
This might do what you're looking for.
You may need to replace the "clear" statement with a clear screen function you use at your location.


/* REXX */
DSname. = ''
Created. = ''
maxi = 0
/* 'Enter a list of dataset names' */
DSname.1 = 'USER.NODE.SRCLIB'
DSname.2 = 'USER.NODE.LOADLIB'
DSname.3 = 'USER.NODE.PROCLIB'
maxi = 3
do i = 1 to maxi
call DisplayMsg
call CreateDataset
Created.i = 'Created'
call DisplayMsg
end
Exit 0
DisplayMsg:
"clear"
"ISPEXEC CONTROL DISPLAY LINE START(1)"
do j = 1 to i
say Left(DSname.j,45,'.') Created.j
end
Return
CreateDataset:
/* wait 5 seconds to simulate time creating a dataset */
Wait = Time('E')
Do until Wait > 5
Wait = Time('E')
end
Return
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top