COBOL User Groups COBUG Header Graphics COBOL User Groups COBUG Logo COBOL User Groups COBUG Header Graphics
Home | Search | User Registration | Membership | Contact | About | Advertise

COBOL Resources
 >  Academics
 >  Books
 >  Code Samples
 >  Forums
 >  Knowledge Bases
 >  Magazines
 >  Portals
 >  User Groups
 >  Vendor Manuals
 >  Vendor Support
 >  White Papers
COBOL User Groups COBUG Spacer Graphics

COBOL Software
 >  Change Management
 >  Code Conversion
 >  Compilers/IDEs
 >  Data Access
 >  Database Management
 >  Debugging and Testing
 >  Documentation
 >  Editors
 >  File Conversion
 >  Graphical User Interfaces
 >  Middleware/Integration
 >  Report Generators
 >  Sort
 >  Terminal Emulators
 >  Transaction Processing
 >  Utilities
COBOL User Groups COBUG Spacer Graphics

General Information
 >  COBOL Jobs
 >  Upcoming Events
 >  COBOL News
 >  Product News
 >  COBOL Standards
COBOL User Groups COBUG Spacer Graphics
COBOL User Groups COBUG Spacer Graphics
 

COBUG Forums

 
COBOL Language [ return ]
From Message
tk

 Email

5/11/2005
23:28:22
Subject: cobol


Message:
Hi
I have a technical question.

I have a text file with data for several clients sorted by client no. each client no is preceded with "@" and followed by several lines of data for that client.
I want to read the text file and break it up into multiple files ie a file for each client with the client no as part of the file.
Thanks in advance

TK


ramdantu

5/11/2005
23:41:19
RE: cobol


Message:
Hi TK,

I red your message, let me clarify one thing, that you want to create indexed file, or line seqential file, If you want to create Indexed file then read that text file where ever you find the @ then open one indexed file with name of Claint No, and write the remaing data of that claint into that indexed file. where every you find another claint then close this indexed file and again open another indexed file based on the new claint no.

I hope this will solve your problem. If you find any difficult let me inform.

Regards


Siva Ram DS
Cell: 09819558006
India.


gdownsalex

5/12/2005
04:19:49
RE: cobol


Message:
It makes a big difference what you mean by "several".
Create one file for each client. Open each file as output. Read through your input file sequentially. If client number = 1, write to output file 1. if client number = 2, write to output file 2, etc.
Close all files when you are done.
Gary


tk

5/12/2005
23:41:29
RE: cobol


Message:
Thanks for the replies. I have a few thousand clients and need to create a file for each client. I need code or script where I can use a variable file name.

Thanks again


P 1 Next Page >>


 
[ Go to Top of Page ]
COBOL NuTrak Ad


COBOL Forums
COBOL Forum Do you need COBOL help?
Let the COBUG members help you. Post your issues!



COBOL Job Resources
COBOL Jobs Here are references to a wealth of COBOL job resources, including job listing sites, resume preparation, and interview questions.


Job and Resume Matchmaker!
COBOL Jobs Employers submit your COBOL job openings. Job seekers submit your resumes.

Join COBUG!
COBOL User Groups Become a part of the COBUG community today. Register Now ...


Start a COBOL User Group!
COBOL User Groups Make a difference today and start an Acucorp User Group, Fujitsu User Group, or Micro Focus User Group

COBOL (c) Information Computing Services. All Rights Reserved. COBOL