Hey guys,
Here is the solution is used. Please feel free to contact me for any source you would like. I have gotten the concept to work fine.
In any case I have a read/write program written in assembler that clearly shows how to get the input format and LRECL. It essentially does what SORT=COPY does for simple QSAM files. I am about 90% done writing the smart compare program in assembler. (I decided that I would just do this all in assembler but I have the ability to call COBOL now that I have it working.)
This smart compare has the following desirable features.
1. Key start/length provided to program for adds/deletes
2. OMIT columns provided allowed to prove you only changed thos columns
3. New file in
4. Old file in
5. Adds file out same length as new file
6. Deletes file out the same length as new file
7. Compare OMIT file (like compare file but omits columns in compare)
8. Compare file out 10 bytes longer than input with a 10 byte header showing 7 bytes of a record count and a new/old indicator with only the miscompared characters shown on the old file line and * under those characters for an easy read.
Code:
0000022 N MISCOMPARE YYY
0000024 O NOT XXX
* *** OOOOO
9. Smart compares are done by adding an omit card. This allows the omit columns to be omitted for compare purposes. This is enter by control card of omit or include. This card is optional.
The whole premise here is to prove a file change by compare. After a file fix if you expected to change the customer code on the master file for 100 accounts a before and after download would be done and the key and omit card supplied to the program. Your expected results would be that there was 100 miscompares but zero would be in the omit file. This proves you changed what you wanted but also importantly proves you did not truncate all the records you updated for instance. This is soimetimes overlooked in testing.
The assembler version of this program does a couple of things that the COBOL version did not. The assembler version allows the input file to be any length. This allows you to omit a reformatting step to a particular length of file that the COBOL version required. The omit table built is not limited by a value imposed like 4096 and can always be the same as the input file. While this is little limitation it does make the utility more general purpose.
Here is the code needed for getting the input file attirbutes and setting an output file to the same attributes as an input file. If someone needs a general use program called from COBOL I would be happy to provide one. As you can see the format and LRECL can be gotten easily from the DCB after the input file is open but before it is read.
Code:
OPEN (IFILE,INPUT) OPEN INPUT TO GET ATTRIBUTES
MVC OFILE+36(1),IFILE+36 MOVE THE FORMAT INPUT TO OUTPUT
* V=X'40',VB=X'50,F=X'80',FB=X'90'
MVC OFILE+82(2),IFILE+82 MOVE THE LRECL INPUT TO OUTPUT
* (RECORD LENGTH IS A HALF WORD)
OPEN (OFILE,OUTPUT) OPEN OUPUT WITH INPUT ATTRIBUTES
IFILE DCB DSORG=PS,MACRF=GL,DDNAME=IFILE,EODAD=EOFI
OFILE DCB DSORG=PS,MACRF=PL,DDNAME=OFILE
Thanks for everyone pointing me in the right direction. Yak back if you want a copy of the finished program of anything you have seen me post.