Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
how to remove null lines in output

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: how to remove null lines in output
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

Moderator Team Head


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

PostPosted: Wed Jan 17, 2007 6:50 pm    Post subject: Re: how to remove null lines in output
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    Post subject:
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

Site Director


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

PostPosted: Wed Jan 17, 2007 10:17 pm    Post subject:
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    Post subject: Re: how to remove null lines in output
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: 1452
Location: Chicago, IL

PostPosted: Thu Jan 18, 2007 8:47 am    Post subject: Re: how to remove null lines in output
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us