Re: Need program to count delimiters
- From: hcmason@xxxxxxxxxxxxx
- Date: 29 Jun 2006 17:38:14 -0700
Hi:
Back in the day, I used to use both string and unstring with pointer
option to
string things together in cobol...
This was helpful in printer commands...
System Test FBM Legacy MWI DB2 Tables & Data to Oracle OWH
I think it would be difficult to write a generalized program for each
file. programs usually are data dependant, and the record layout tends
to drive your code...
D1000-STRING-THAT-THING.
512700 STRING AREA-OF-HOLD
512800 DELIMITED BY '%'
512900 INTO STRING-WORK-AREA
513000 WITH POINTER WS-STRING-POINTER.
string and unstring will be useful to handle the string or pulling
apart of the data...
sasquatch53@xxxxxxxxx wrote:
I need a utility that validates the number of delimiters in a file on
our MVS mainframe. I'm sure this is a fairly common requirement when
loading data into a data warehouse.
I was thinking that COBOL would probably be the best thing to write it
in. The latest release of COBOL we have is "Enterprise COBOL for z/OS
and OS/390 3.2". Our MVS level is "MVS LEVEL: 0510.05 z/OS V1R7".
We are using JES2.
I know a little bit of COBOL but it would take me a couple of weeks (or
more) to hack something together.
Is there anybody out there that could provide me with the basic COBOL
program that I could modify if required?
The input file is Variable Blocked (VB) but it would be nice if the
program would work for VB or Fixed Block (FB) files.
I'd like to pass in three variables:
LRECL = The logical record length of the file (would this be
required?).
DELIM = Delimiter character in HEX (in my case it's a HEX 2F).
DCOUNT = Delimiter count as an INTEGER.
There are no packed fields in these records. The entire record should
be able to be treated as a single character field.
The program should output records that have the matching number of
delimiters to one DD dataset and records that don't have the matching
number of delimiters to another DD dataset.
I looked at the COBOL manual on line and it looks like there is a
function called INSPECT that counts characters across a record/field.
Would this work?
Tim Lindsey
.
- Follow-Ups:
- Re: Need program to count delimiters
- From: Colin Campbell
- Re: Need program to count delimiters
- References:
- Need program to count delimiters
- From: sasquatch53
- Need program to count delimiters
- Prev by Date: Re: Simple? DISPLAY Question
- Next by Date: Re: Need program to count delimiters
- Previous by thread: Re: Need program to count delimiters
- Next by thread: Re: Need program to count delimiters
- Index(es):
Relevant Pages
|
|