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
 

 

How to search and move a value from a file having no layout

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
RAJESHB4U

New User


Joined: 10 Jul 2006
Posts: 2

PostPosted: Thu Mar 08, 2007 1:52 pm    Post subject: How to search and move a value from a file having no layout
Reply with quote

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
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu Mar 08, 2007 4:39 pm    Post subject:
Reply with quote

If "C" is the delimiter then UNSTRING is up to the task.
Back to top
View user's profile Send private message
RAJESHB4U

New User


Joined: 10 Jul 2006
Posts: 2

PostPosted: Thu Mar 08, 2007 7:27 pm    Post subject:
Reply with quote

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
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 685
Location: Earth

PostPosted: Thu Mar 08, 2007 7:42 pm    Post subject:
Reply with quote

Quote:

The given file is a variable file, so reference modification cannot be used

Could you please explain why???
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Mar 08, 2007 9:37 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Fri Mar 09, 2007 11:06 am    Post subject:
Reply with quote

Your Scenario can be easily handled with SAS program.

Do you want SAS solution?
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


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