Abinitio Display records between 50-75..

In input dataset i am having 100 records. I want records between 50-75 and i don't want to read 5th record? which component i have to use..

Questions by shylender

Showing Answers 1 - 63 of 63 Answers

m_dump is 'THE' best for multiple file system.

For serial and mfs there are many ways the components can be used.

1.Filter by Expression : use next_in_sequence() >50 && next_in_sequence() < 75 for 1st requirement and next_in_sequence() !=5 for 2nd one.

2. We can also use multiple LEADING RECORDS component for meeting the requirement.

Abhisek B
fresh as dew!!

If you have the access to Co>Op then you can try an alternate.

Say suppose the input file is : file 1

Use the Run programme component in GDE and write the below command:

`sed -n50,75p file 1 > file 2`

Your file 2 will be the required one.

  Was this answer useful?  Yes

harpreet singh

  • Sep 20th, 2012
 

We cannot use next_in_sequence() function more than once in a transform. this next_in_sequence()>=50 &&next_in_sequence() <=75 wont give correct answer.

One way to do is:
Use reformat and add another field record_number and assign next_in_sequence() to it. Then in filter_by_expression : mention record_number >=50 && record_number < =75.

  Was this answer useful?  Yes

pramod

  • Sep 21st, 2012
 

use LEADING RECORDS component
with condition
next_in_sequence()>=50 && next_in_sequence()< =75

  Was this answer useful?  Yes

sudharshan

  • Jan 5th, 2013
 

sed -n 50,75p file1 > file2

  Was this answer useful?  Yes

srilakshmi

  • Nov 12th, 2013
 

i/p----->f.b.e--------->
------>f.b.e-------->join------>o/p
get the all required records

  Was this answer useful?  Yes

Rahul

  • Sep 22nd, 2014
 

In filter by exp or reformat add this condition (while ( rec > 50 & < 75)
if(rec mod5 !=0)
select the record

  Was this answer useful?  Yes

Atin

  • Oct 8th, 2014
 

m_dump -start 50 -end 25

  Was this answer useful?  Yes

siddardha

  • Dec 10th, 2014
 

Use next_in_sequence function

  Was this answer useful?  Yes

milan

  • Jan 7th, 2015
 

use m_dump < file_name> -start 50 -end 75

  Was this answer useful?  Yes

Kiran

  • Apr 22nd, 2015
 

There are 2 ways to find the records in between 50-75.
1. We can find the records using Filter By Expression(FBE) component.
You can give transformation function as Param>50 && Param<<70.
2. We can find the records using Unix Command as Stream editor(Sed).

  Was this answer useful?  Yes

Shweta

  • Jun 7th, 2016
 

Hi Pramod,
I suppose we can not use this component for capturing required records since it gives records only from starting. Next_in_sequence() can not be used in this component. We can give only numeric value.
let me know if you have anything I have missed out.

  Was this answer useful?  Yes

Jagnyadatta Sena

  • Jun 10th, 2016
 

In serial processing Provide a filter expression in input dataset i.e. next_in_sequence() != 5 and use a reformat after it.
In output index of reformat, store next_in_sequence() value in a variable. while outing the record put the condition(Out :1: if(variable >=lower_value $$ variable <= upper_value ) {required port }) and send to out port and attach it to output file .

  Was this answer useful?  Yes

Shikha

  • Mar 15th, 2020
 

You can use filter by expression in 1st FBE put condition
next_in_sequence() >=50 and invocation_number() <=75
and in 2nd FBE put condition
next_in_sequence() !=5

  Was this answer useful?  Yes

Krishna

  • Aug 21st, 2020
 

What if we use (next_in_sequence() >=50 and invocation_number() <=75) and next_in_sequence() !=55 within the same FBE component?

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions