how to print below requirement
Moderators: chulett, rschirm, roy
how to print below requirement
Hi
I have a seq file like below with 2 rows, 123 should print 4 times....same 456 print 3 times
A, B
123,4
456,3
i want out put as below please let me any suggestions. Thanks
A
123
123
123
123
456
456
456
I have a seq file like below with 2 rows, 123 should print 4 times....same 456 print 3 times
A, B
123,4
456,3
i want out put as below please let me any suggestions. Thanks
A
123
123
123
123
456
456
456
Amar
-
- Participant
- Posts: 27
- Joined: Mon Jul 09, 2012 6:51 am
- Location: Chennai
Since transform loops, which would solve your problem, are only available in later releases that solution cannot be used. What is the maximum number that can be in Column B? If it is a known, and small, number {n} you could make a transform stage with {n} outputs each coupled to a constraint that would multiply your rows relatively easily.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
I can't think of an easy direct way to do this in a PX job offhand. It isn't difficult to do with a Server job. How big is your data volume?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
I am in an urgent project right now and with 14-16 hour days I don't have much spare time and energy to approach such problems. Considering that my solution, if any, would be posted as premium content you should at least consider getting a premium membership. Note that "urgent" or "ASAP" for responses doesn't go down well with the volunteers who log into this forum (particularly considering what some of them get as an hourly wage) and the pro bono publico work isn't remunerated.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 27
- Joined: Mon Jul 09, 2012 6:51 am
- Location: Chennai
Hi Amar,
Try this.
Write the data to a Dataset. Then use a unix script. In that script, call orchadmin commands and save Columns A and B in different arrays. Create a for loop like structure, call records in one loop and then create another loop to print the records to file based on B column's value. This is the only option i found.
Try this.
Write the data to a Dataset. Then use a unix script. In that script, call orchadmin commands and save Columns A and B in different arrays. Create a for loop like structure, call records in one loop and then create another loop to print the records to file based on B column's value. This is the only option i found.
ray.wurlod wrote:I'm on vacation. Nothing is urgent. ...
Regards,
Aravind V A
Aravind V A
-
- Participant
- Posts: 527
- Joined: Thu Apr 19, 2007 1:25 am
- Location: Melbourne
Hi Stuartjvnorton,
Try the below-
In the output derivation for A in trnsformer-
In the target sequential file Filter option-
Please let me know if you are getting the desired output.
Try the below-
In the output derivation for A in trnsformer-
Code: Select all
str(A:"|",B)
Code: Select all
tr -s '|' '\n'
-
- Participant
- Posts: 27
- Joined: Mon Jul 09, 2012 6:51 am
- Location: Chennai