Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 HEX value search in a DB2 query maxsubrat DB2 2 Wed Oct 04, 2017 3:04 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us