In ACR/Detail, access mode 6, Keys Precede Detail Values, evaluates every record in the input source by selection group, starting with the first group.
You have a large file that contains several concatenated reports. Each concatenated report has the word Report in positions 1 through 6. You need to extract data from a specific report, GL-135, but the selection criteria, CREDIT, exists on other reports, as well. As you add the values for the CREDIT selection criteria, you want to include only the CREDIT values from the relevant report. In other words, you want to skip the other reports and process only the relevant report.
Complete the steps below to set up selection criteria to show where to begin referencing the data.
1 ) Set up a literal in an extraction variable and set the value to Y when you reach the beginning of report GL-135. For the same extraction variable, set the literal to N to indicate the end of report GL-135.
This step ensures that only the desired report is processed.
SELECT if Pos 1 through 6 = "REPORT"
SELECT if Pos 8 through 6 = GL-135
Move literal "Y" to MyReportExtractionVariable
SELECT if Pos 8 through 6 NOT = GL-135
Move literal "N" to MyReportExtractionVariable
2 ) Add a SELECT statement for all criteria that pertain to the data on your report to make sure that you have the right report.
SELECT if MyReportExtractionVariable = "Y" and SELECT if Pos 5 through 10 = "CREDIT"
3 ) Specify a detail field to extract the values from the correct report.