Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Find the absolute position of a string in a given record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Aham

New User


Joined: 24 Oct 2007
Posts: 42
Location: chennai

PostPosted: Sun Dec 09, 2007 5:43 pm    Post subject: Find the absolute position of a string in a given record
Reply with quote

Is there a way I can find out the absolute position of a string in a record so that I can process it further. I have an input file and there are more than one record types in them. They may a have a string say 'Account name' in diffenet positions and based on the starting of them my further processing should be done. Logical record length is too high and also there are substaintial type of records. So using the IFTHEN WHEN is not feasible. Is that possible to get the absolute position of the string?
Back to top
View user's profile Send private message

Aham

New User


Joined: 24 Oct 2007
Posts: 42
Location: chennai

PostPosted: Mon Dec 10, 2007 11:54 pm    Post subject: Reply to: Find the absolute position of a string in a given
Reply with quote

icon_sad.gif no replies for my post. my question sounds so inane ? icon_rolleyes.gif
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Dec 11, 2007 12:03 am    Post subject:
Reply with quote

Do you mean "inane" or "insane"? icon_smile.gif

There's no built-in function to get the absolute position of a string. Since you ruled out IFTHEN, I had nothing to offer and so didn't post a reply.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Dec 11, 2007 12:03 am    Post subject: Re: Find the absolute position of a string in a given record
Reply with quote

Aham wrote:
Is there a way I can find out the absolute position of a string in a record so that I can process it further. I have an input file and there are more than one record types in them. They may a have a string say 'Account name' in diffenet positions and based on the starting of them my further processing should be done. Logical record length is too high and also there are substaintial type of records. So using the IFTHEN WHEN is not feasible. Is that possible to get the absolute position of the string?


Use reference modification with a variable for the start position and do a perform varying to look for a match with your literal.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Dec 11, 2007 12:06 am    Post subject:
Reply with quote

Quote:
Use reference modification with a variable for the start position and do a perform varying to look for a match with your literal.


I assume your proposed solution has nothing to do with DFSORT - right? (You might have mentioned that considering this is the DFSORT/ICETOOL Forum.)
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Tue Dec 11, 2007 2:51 am    Post subject: this solution has nothing to do with Dfsort.
Reply with quote

A little Cobol program or even a smaller Rexx program would do the job.

;)
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Tue Dec 11, 2007 11:45 am    Post subject: Reply to: Find the absolute position of a string in a given
Reply with quote

Aham,

Yes, You can use REXX to find the absolute posiiton of the string. You can make use of the Keyword POS .



Quote:
my further processing should be done.


What processing are you going to do after finding the absolute position?
Back to top
View user's profile Send private message
Aham

New User


Joined: 24 Oct 2007
Posts: 42
Location: chennai

PostPosted: Tue Dec 11, 2007 12:51 pm    Post subject: Reply to: Find the absolute position of a string in a given
Reply with quote

Thanks a lot for all your replies.

Frank - You are equally good in being humerous too icon_smile.gif I can get your point.

Aaru - I am totally new to REXX. After getting the position I would execute a cobol program based on the record type identifed. So I want to write this position to a record. Is that possible ?
Back to top
View user's profile Send private message
Alain Benveniste

New User


Joined: 14 Feb 2005
Posts: 88

PostPosted: Tue Dec 11, 2007 6:04 pm    Post subject: Reply to: Find the absolute position of a string in a given
Reply with quote

Aham,

What do you mean by
Code:

Is there a way I can find out the absolute position of a string in a record so that I can process it further

Depending on your reply and if you could post how your recs look like I could take a look to find a dfsort solution.

alain
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us