View previous topic :: View next topic
|
Author |
Message |
ramsri
Active User
Joined: 18 Oct 2008 Posts: 380 Location: India
|
|
|
|
Hi,
I have the below input file with some data values and need to have same type appearing in one column and so on.....
Input:- LRECL=80,RECFM=FB
Code: |
MARG1 DATA1 MANS3 SELI5
MANS3 SELI5 MARG1
SELI5 MARG1 DATA1
FINP6 MANS3 HOFG4 MARG1 KIPL9 OLIV2
MANS3 SELI5
|
The expected output should be in the below given format:
Code: |
MANS3 SELI5
MANS3 MARG1 SELI5
FINP6 HOFG4 KIPL9 MANS3 MARG1 OLIV2
DATA1 MARG1 SELI5
DATA1 MANS3 MARG1 SELI5
|
Please help.
Thanks. |
|
Back to top |
|
|
sureshpathi10
Active User
Joined: 03 May 2010 Posts: 158 Location: Kuala Lumpur
|
|
|
|
Are all these values fixed or will it vary time to time? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Ramsri,
You need to provide a full and complete explanation of your data. Also, what is the LRECL and RECFM of your output? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Once again, you have provided far too little and expect people here to write your code for you
If you want help, you need to clearly post the "rules" for getting from the input to the output. What you have posted is some alphabet-soup that has little or no meaning to most of us. You might understand what you are working with but we cannot.
Unless you provide proper info, this topic will be locked/deleted.
Hopefully, no one else will waste time on this . . . |
|
Back to top |
|
|
Paresh123
New User
Joined: 02 Jan 2014 Posts: 4 Location: USA
|
|
|
|
Perhaps this would be better accomplished in Easytrieve or COBOL?
In Easytrieve, use the case statement on each input field and assign to the output field accordingly. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
I suspect the "language" doesn't matter so much if the task cannot be described/explained . . . |
|
Back to top |
|
|
ramsri
Active User
Joined: 18 Oct 2008 Posts: 380 Location: India
|
|
|
|
sorry folks.....its not real situation but an idea that I tried to work out and ended up posting here to seek experts advice. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Even for ideas, we need to know about the data and about the rules.
If the data is known, it can be done with PARSE. If unknown, but limited, perhaps generate the PARSE. If unknown and unlimited can't reasonably be done... |
|
Back to top |
|
|
|