IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to remove null lines in output


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
banuradha

New User


Joined: 20 Dec 2006
Posts: 19
Location: India

PostPosted: Wed Jan 17, 2007 6:28 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Jan 17, 2007 6:50 pm
Reply with quote

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
View user's profile Send private message
banuradha

New User


Joined: 20 Dec 2006
Posts: 19
Location: India

PostPosted: Wed Jan 17, 2007 7:17 pm
Reply with quote

Already,I don't have any null lines in my input file.but I get the same problem.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jan 17, 2007 10:17 pm
Reply with quote

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
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Thu Jan 18, 2007 6:07 am
Reply with quote

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
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Thu Jan 18, 2007 8:47 am
Reply with quote

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
View user's profile Send private message
banuradha

New User


Joined: 20 Dec 2006
Posts: 19
Location: India

PostPosted: Thu Jan 18, 2007 9:20 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts Remove leading zeroes SYNCSORT 4
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
Search our Forums:

Back to Top