I don't know how Gentran: Server 5.3 is configured in your case, but in my case (v. 6.1 which is similar ) I would run input file through preprocess UNIX script and replace ',' character with your element separator and then in the map updated this segment on source side of the map if needed.
Vladimir -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Dave Records Sent: Tuesday, February 22, 2011 9:32 AM To: Mukesh Kumar Cc: [email protected] Subject: Re: [EDI-L] How to put logic to search a pattern within an element in Gentran strstr is not available in 5.3 visual mapper - the closest I see is this, but offhand I didn't see any operator to return the position number a specific character so you might have to loop through using the macro to return the position of the ",". portion of text: Extract a series of alphanumeric characters from a specified value according to the starting position and length specified. portion [of text] EXP1 starting [at position] EXP2 for EXP3 [characters] Where: EXP1=Either a source field or element with an alphanumeric data type or an alphanumeric expression EXP2=An arithmetic expression EXP3=An arithmetic expression This mapping operation produces data consisting of some of the characters of the original data (EXP1). The part returned by this operation starts with the character at the position specified by EXP2 and continues for EXP3 characters. Example The mapping operation portion of text 'ABCDE FG' starting at position 3 for 5 characters produces 'CDE F'. Dave Records Records Consulting, LLC Phone: 616.583.0090 Email: [email protected] On Feb 22, 2011, at 11:57 AM, Mukesh Kumar wrote: > Dear All, > > I have come across a requirement in which I have to search a > particular character within an element. > > I am using Gentran v5.3 (visual map) on IBM-AIX platform. > > My requirement is: full name is coming in one source element of 70 > characters long and it consists first name as well as last name > separated by a comma (,) I have to look for comma and have to map > first name in our destination element and last name in other. > > As far as I know I can use macro to search comma in the element but as > the source element is 70 characters long, hence I have to put same > logic for all 70 positions which I don't think will be a smart solution. > > Can any one suggests do we have any other way to write such logic. > Will appreciate all solutions. > > Thanks > Mukesh > +91-9874320420 > > [Non-text portions of this message have been removed] > > [Non-text portions of this message have been removed] ------------------------------------ ... Please use the following Message Identifiers as your subject prefix: <SALES>, <JOBS>, <LIST>, <TECH>, <MISC>, <EVENT>, <OFF-TOPIC> Job postings are welcome, but for job postings or requests for work: <JOBS> IS REQUIRED in the subject line as a prefix.Yahoo! Groups Links ------------------------------------ ... Please use the following Message Identifiers as your subject prefix: <SALES>, <JOBS>, <LIST>, <TECH>, <MISC>, <EVENT>, <OFF-TOPIC> Job postings are welcome, but for job postings or requests for work: <JOBS> IS REQUIRED in the subject line as a prefix.Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/EDI-L/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/EDI-L/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
