Page 1 of 1

Original record number in a original file

PostPosted: Thu Nov 03, 2011 4:28 pm
by Ganymedes
I have a file with data which need to select one or more records according to specific criteria (filters). Please, see below:

original file -

number of records - data
000001 jose silva dept purchasing manager position
000002 john coast dept maintenance supervisor position
.
.
.
.
003000 Paulo Santos purchasing dept coordinator position

I'm selecting records dept purchases. This is usually quite simple, but I need to maintain or generate a separate report indicating the number of the original record in the input file.
as below:
000001 jose silva dept purchasing manager position
003000 Paulo Santos purchasing dept coordinator position
and not so:
000001 jose silva dept purchasing manager position
000002 Paulo Santos purchasing dept coordinator position

Re: Original record number in a original file

PostPosted: Thu Nov 03, 2011 10:53 pm
by Frank Yaeger
Your description is quite confusing.

Are the record numbers you show actually in the input file or do you want to add them? If they are in the input file, then why wouldn't they just appear as you want them in the output file? If they are not in the input file, then you can just use INREC to add the input numbers and OUTFIL INCLUDE to select the records you want which will have the original input numbers.

If you need more help on this, you need to do a better job of explaining what you want to do.

Show an example of the records in each input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. Give your exact criteria (or INCLUDE statement) for including the records you want.