I use SUBSTR to format my output lines in REXX. Here is an example from
an exec that  lists storage usage:

OUTLIN=SUBSTR('SYSID',1,6)||SUBSTR('CSASIZE',1,8),                      
||SUBSTR('CSAUSED',1,10)||SUBSTR('CSAPARM',1,8)||SUBSTR('SLACK',1,8),   
||SUBSTR('ECSASIZE',1,10)||SUBSTR('ECSAPARM',1,10),                     
||SUBSTR('ECSAUSED',1,10)||SUBSTR('PRIVATE',1,10)



Jon L. Veilleux
[EMAIL PROTECTED]
(860) 636-2683 


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Sebastian Welton
Sent: Monday, March 26, 2007 9:17 AM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Another REXX query

I have a small bit of REXX which finds the running jobs, STC, TSO users,
etc and sorts them nicely. Using BPXBATCH I can then output this to the
console for some other purpose but I would like it to be tidy, it
doesn't need to be but...Anyway the original code looks like this:

output_line = Strip(job_name) Strip(type_of_task) Say output_line
'BPXBATCH sh logger -d1' output_line

When running in batch (or foreground if you want your session locked
up,) both output statements are the same, i.e.:

+MYUSER: 16779803: PCAUTH System Task
+MYUSER: 16779840: IMS941F1 Batch Job
+MYUSER: 50334273: INIT Initiator
+MYUSER: 83888708: ASCHINT APPC Task
etc. etc. etc.

Now to tidy it up I do:

job_name = Strip(job_name)
job_name = Overlay(job_name,Copies(' ',10)) output_line =
Strip(type_of_task) Say output_line 'BPXBATCH sh logger -d1' output_line

This time the 'say' output is nicely formatted but the BPXBATCH stays as
previously without the formatting. I also tried adding copies of spaces
at the end but still no joy. Any ideas on how to format the text nicely?

Cheers,

Seb.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send
email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search
the archives at http://bama.ua.edu/archives/ibm-main.html

-----------------------------------------
This e-mail may contain confidential or privileged information. If
you think you have received this e-mail in error, please advise the
sender by reply e-mail and then delete this e-mail immediately.
Thank you. Aetna

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to