View previous topic :: View next topic
|
Author |
Message |
banuradha
New User
Joined: 20 Dec 2006 Posts: 19 Location: India
|
|
|
|
Hi all,
How to remove spaces in the output.I have to format my output.
while printing it am getting more lines with spaces
for eg:
JOB=xxxxxx SCHID=000 QTM=0000 LEADTM=0000 SUBMTM=0000
--------------------------- TRIGGERED JOBS ----------------------------
JOB=xxxxx SCHID=000 QTM=0000 LEADTM=0000 SUBMTM=0000
I need to remove those null lines using REXX. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Open and read the input.
Remove all spaces from the record.
Determine the record length. Only if it is >0, then write the record.
Go back to read the next record. |
|
Back to top |
|
|
banuradha
New User
Joined: 20 Dec 2006 Posts: 19 Location: India
|
|
|
|
Already,I don't have any null lines in my input file.but I get the same problem. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
What does "don't have any null lines in my input file" mean?
Is your question about how the blank lines got into the output? Whatever "printed" the output most likely inserted the blank lines. This does not mean there were blank/null lines in the "input". If you have control of the source of whatever program printed those lines, you could eliminate the unwanted lines.
If the output came from a purchased program, you will have to read the "output" and skip the lines you do not want in the final output. To do this, you'll need to specify a dataset for the output instead of SYSOUT. |
|
Back to top |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
banuradha,
If I read you correctly, you are writing lines to the output without the extra lines of spaces, right?
It sounds like you are outputting something that is being interpreted as carriage control.
Make sure this is not a problem. |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Quote: |
I need to remove those null lines using REXX. |
Posting this response finding this topic in "other mainframe topis" rather than "REXX" section.
Just in case you are more interested in record contents rather than the sequence of lines:-
> Open dataset
> On Command Prompt give "SORT 1 80"
> DELETE in one shot all the irrelevent material, which is clubbed one after one. |
|
Back to top |
|
|
banuradha
New User
Joined: 20 Dec 2006 Posts: 19 Location: India
|
|
|
|
Hi all ,
Thank you very much for your response.This is my code and I need a formatted output.
My input file is an output of CA7 command ,which is a sorted output by removing blank lines.
Code: |
"EXECIO * DISKR INFILE ( FINIS STEM JOB."
DO I = 1 TO JOB.0
FLAG = 0
P1 = POS('JOB SET FOR EXEC',JOB.I)
IF P1 /=0 THEN
DO
VAL = P1 - 5
NOEX = SUBSTR(JOB.I,VAL,1)
SAY 'JOB SET FOR EXEC ON MAIN --' NOEX
END
P2 = POS('TRIGGERED',JOB.I)
IF P2 /=0 THEN FLAG = 1
IF FLAG = 1 THEN
DO K = I TO JOB.0
IF INDEX(JOB.K,'REQUIREMENTS') = 0 THEN
SAY JOB.K
ELSE
EXIT
END
END
|
|
|
Back to top |
|
|
|