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: 686
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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