View previous topic :: View next topic
|
Author |
Message |
RAJESHB4U
New User
Joined: 10 Jul 2006 Posts: 2
|
|
|
|
Hi
Can anybody suggest me how to resolve the mentioned issue.
I have a file in the form of a segments and cannot be mapped to a layout, as shown below.
AM04 C2880054109 CCROHAN CDNAIK FOH5526 C91 C100982203 C3001 C61
i need to check for the fild separtor , Ex - I am searching for C2 and if found, i need to move the value untill next separator(CC) i.e 880054109 to a output file varable.
Please suggest me how to procced in this type of scenario.
Thanks & Regards
Rajesh |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
If "C" is the delimiter then UNSTRING is up to the task. |
|
Back to top |
|
|
RAJESHB4U
New User
Joined: 10 Jul 2006 Posts: 2
|
|
|
|
William Thompson wrote: |
If "C" is the delimiter then UNSTRING is up to the task. |
Hi,
The given file is a variable file, so reference modification cannot be used and i have more the one occurance of C, but i want only "880054109" from the file, without using many unstring functions
AM04 C2880054109 CCROHAN CDNAIK FOH5526 C91 C100982203 C3001 C61 |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Quote: |
The given file is a variable file, so reference modification cannot be used |
Could you please explain why??? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please post the file definition of the file.
You may use reference modification on a variable length record. At this point, i'm not sure that the definition is clear enough to make recommendations.
What should happen if there is a "C2" and there is no "CC" or the "CC" is encountered 100 bytes later?
When you post more of your "rules", we will offer suggestions. |
|
Back to top |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
Your Scenario can be easily handled with SAS program.
Do you want SAS solution? |
|
Back to top |
|
|
|