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

Removing lines from the input file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Priyanka Pyne

New User


Joined: 09 Feb 2008
Posts: 95
Location: India

PostPosted: Mon Aug 29, 2011 10:02 pm
Reply with quote

Yes Bill. You are absolutely right. I want exactly what Arun has mentioned in his output. The only change thing thats need to be modified is, I want '|' as well in my output file. I am totally pissed off with this. icon_mad.gif

Someone please help.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Aug 29, 2011 10:18 pm
Reply with quote

But your input is not the same as your original input. Data that you want is now lined-up with data that you don't want. So when you do the exclude as from the original sample data, you loose all the "ID" and "I" stuff etc.

Can you get the line-up back to your original example?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Aug 29, 2011 10:27 pm
Reply with quote

Quote:
I am totally pissed off with this


how do you think everybody feels about you?
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: Mon Aug 29, 2011 10:29 pm
Reply with quote

Hello,

Quote:
I am totally pissed off with this.
Understandable as you are just flailing away. . .

Suggest you consider how you would get what you want writing actual code and then implement same in sort control statements.

Your control statements need to be specific rather than just some collection of positions and values. . . No one here should fiddle with code that does not even follow the processing rules.
Back to top
View user's profile Send private message
Priyanka Pyne

New User


Joined: 09 Feb 2008
Posts: 95
Location: India

PostPosted: Mon Aug 29, 2011 10:39 pm
Reply with quote

This is my output.

Code:

                                                                       
                                                                       
                                                                       
                                                                       
 New data set fields:   NAME      SURNAME                               
 ID NREC-# OREC-#       <---+---> <---+--->                             
 I  000001              mmmmmmm   nnnn                                 
 I  000003              rrrrr     ggggg                                 
 Old data set fields:   NAME      SURNAME                               
 ID NREC-# OREC-#       <---+---> <---+--->                             
 D         000002       ddddd     ggggg                                 
 C  000004              sssssss   ggggg                                 
 O         000003       sssssss   ppp                                   
                                  |||||                                 
                                                                       
                                                                       


Just help me to remove the lines with spaces. And the o/p is a VB file.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Aug 29, 2011 10:48 pm
Reply with quote

dare I ask?
what does the current input look like?
what do your control statements look like?

to simply remove lines with spaces, omit 10,30,ch,eq,30C' '
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: Mon Aug 29, 2011 11:02 pm
Reply with quote

Hello,

Quote:
The only change thing thats need to be modified is, I want '|' as well in my output file.
Is there some reason you did not post the modified sort control and jcl. . . icon_confused.gif

Quote:
But my out put is totally different from yours.
When you change the code, expect different output. . .

As you have changed things multiple times, suggest you re-post the current input data, the current jcl/sort control, and the current output if you have not determined why you do not get the desired output. By continuing to flail about, this topic is now into 3 pages - 2 of which are not really needed.

If this ever gets resolved, i'll try to clean up the unneeded posts. . .
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Aug 29, 2011 11:29 pm
Reply with quote

Priyanka Pyne wrote:
This is my output.

Code:

                                                                       
                                                                       
                                                                       
                                                                       
 New data set fields:   NAME      SURNAME                               
 ID NREC-# OREC-#       <---+---> <---+--->                             
 I  000001              mmmmmmm   nnnn                                 
 I  000003              rrrrr     ggggg                                 
 Old data set fields:   NAME      SURNAME                               
 ID NREC-# OREC-#       <---+---> <---+--->                             
 D         000002       ddddd     ggggg                                 
 C  000004              sssssss   ggggg                                 
 O         000003       sssssss   ppp                                   
                                  |||||                                 
                                                                       
                                                                       


Just help me to remove the lines with spaces. And the o/p is a VB file.


The column where the first pipe is has a non-blank in every line you want. If you exclude blanks in that column, you should get the output - remembering the VLTESTI for the short lines. Might keep it simpler having got this output to do a second pass just for the blanks as a "get the damn thing out of the way" if you don't get it with the OMIT all together.
Back to top
View user's profile Send private message
Priyanka Pyne

New User


Joined: 09 Feb 2008
Posts: 95
Location: India

PostPosted: Tue Aug 30, 2011 12:35 am
Reply with quote

Hi Dick,

I have re-posted my requirement to avoid confusion.
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: Tue Aug 30, 2011 12:40 am
Reply with quote

Hello,

Please post ALL that was requested. . . You posted 1 of 3. . .

Best to have the input, the jcl/code, and the unwanted output with an explanaton all in the same post. . .
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: Tue Aug 30, 2011 12:45 am
Reply with quote

Hello,

If you post another duplicate topic, it will be deleted. One more after that, and you'll likely be banned. . . icon_sad.gif

The most recent no-value duplicte has already been deleted. . .

d
Back to top
View user's profile Send private message
Priyanka Pyne

New User


Joined: 09 Feb 2008
Posts: 95
Location: India

PostPosted: Tue Aug 30, 2011 12:56 am
Reply with quote

I am sorry Dick. I posted a fresh topic but it has been deleted.
Please let me know if I can go ahead and repost or if I can continue here.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Aug 30, 2011 11:07 am
Reply with quote

Quote:
When you change the code, expect different output
Hi Dick,

Change in the input data format did most of the damage. The solution provided was as per what had been told so far by the OP. And the requirements have been contradictory as well. Initially '||" was not needed and all of a sudden it is needed.

As Bill has pointed earlier in this thread, the data required is tied to the data not required now. Other than 'PRINT', there seems to be so many other strings which are to be checked if we follow the OP's data omission rules.
Code:
 PRINTOUT=SYSPRINT  HEADERPG=YES  ASCII=NO       RECLIMIT=(1,*) 
 PRINTLEN=132       PAGESKIP=NO   PAD=OFF        MSGUPPER=NO     
 PAGESIZE=60        DATAHDR=YES   PRTCLASS=A     LANGUAGE=ENGLISH
 PRTTRANS=ON        DUMP=UPDOWN   TAPELBL=SL     CYLHD=ABSOLUTE 
 SMFNO=000          PRTDISP=MOD   USEIOX=DISABLE IOX= 


Let's hope that the TS comes up with a better explanation of his/her requirement.
Back to top
View user's profile Send private message
kalyan.v

New User


Joined: 04 Feb 2008
Posts: 65
Location: Hyd

PostPosted: Fri Sep 02, 2011 8:11 pm
Reply with quote

Priyanka,

i dont know whether you have found out the answer for your requirement.
but my idea is there is an option called SUBSTRING

use this condition and run your JCL it will work.

SORT FIELDS=COPY
INCLUDE COND=(1,50,SS,NE,C'||')

FYI...i considered the file as FB and lrecl is 50 bytes.
in case of VB the values differ.

please let me know if you have any questions,

thanks,
Ravi.
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: Fri Sep 02, 2011 8:25 pm
Reply with quote

Hello,

Code:
SORT FIELDS=COPY
INCLUDE COND=(1,50,SS,NE,C'||')
Has this been tested to see if it meets the complete requirement? I'm fairly certain that it does not. . .
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Sep 02, 2011 8:29 pm
Reply with quote

39 post and getting nowhere icon_evil.gif
Back to top
View user's profile Send private message
Priyanka Pyne

New User


Joined: 09 Feb 2008
Posts: 95
Location: India

PostPosted: Tue Sep 06, 2011 10:18 pm
Reply with quote

Hello Dick,

As you said, I also had an impression that its not going to help me and that was true. I tried but it didn't help.
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: Tue Sep 06, 2011 11:34 pm
Reply with quote

Hello,

I suspect that somewhere in your job description is "write program code".

Maybe it is time to write a bit and be done with this. . .
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 -> JCL & VSAM Goto page Previous  1, 2

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top