HI,
I have two files. and two are having keys in diffrent positions. I need to check the two keys and the one of key value should be one greater then the other. my program will check this and if does not satisfy my job will abend. Insteading of abending the job I need to check this condition before itself in JCl.
Example: file 1: key position is 11,4
Code:
MT1060CTL 8117 090406 CONTROL FILE - PROPOSED ORDER FEED
File 2: key postion is 71,4
Code:
AAAA DRP HEADER FOR PROPOSED ORDER FILE200904068118IX
999999999999999999999999DRP TRAILER FOR PROPOSED ORD FILE 000000000X
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Your description of what you want to do is quite confusing.
It appears you want to compare 11-14 of file1 to positions 71-74 of the first (HEADER) record of file2 - is that right?
Quote:
I need to check the two keys and the one of key value should be one greater then the other.
Are you checking specifically for
file1_key greater than file2_key or
file2_key greater than file1_key or
file1_key not equal to file2_key?
Quote:
Insteading of abending the job I need to check this condition before itself in JCl.
What do you want to happen if the comparison is not satisfied? What do you want to happen if the comparison is satisfied?
It would help if you want show an example of the input records and expected output when the keys satisfy the condition and when the keys don't satisfy the condition.
Give the RECFM and LRECL of the input files.
Does 'HEADER' actually appear in the first record of file1? If so, what is it's starting position?
After condition is satisfied program runs then file1 is created by program putting the file2_key.Then again we will recieve File2 as input in that also key value should be greater then file1_key. Like that it goes on.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
I'm not sure if this will accomplish what you want to, but ...
Here's a DFSORT job that will give RC=0 if your condition is satisfied or RC=16 if your condition is not satisified. You can use the RC in the next step to determine what to do. As an example: