View previous topic :: View next topic
|
Author |
Message |
anumbhaskar
New User
Joined: 18 Feb 2008 Posts: 1 Location: Bangalore
|
|
|
|
Hi,
I have an easytrieve step in JCL like this:
JOB INPUT (FILE1 KEY FILE1-KEY +
FILE2 KEY FILE2-KEY)
IF MATCHED FILE1 FILE2
IF FILE1-DATE EQ FILE2-DATE
GO TO JOB -----------> EXIT1
ELSE
IF FILE1-AMOUNT LT FILE2-AMOUNT
--do some calculations on file1 data--
PUTF OUTFILE1
GO TO JOB ------------->EXIT2
ELSE
--do some calculations on file2 data--
PUTF OUTFILE2
GO TO JOB -------------->EXIT3
END-IF
END-IF
File1 data is like this:
KEY Date AMT
100 10/12/2009 100.00
101 25/11/2009 150.00
101 15/12/2009 200.00
105 20/01/2010 050.00
Fille2:
KEY Date AMT
090 10/12/2009 100.00
101 25/12/2009 200.00
104 20/01/2010 050.00
"GO TO JOB" is coded at 3 places. in what order this code will read the records from 2 input files? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Please learn to post in the appropriate forum.
This is a CA product.
Topic moved. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
Quote: |
"GO TO JOB" is coded at 3 places. in what order this code will read the records from 2 input files? |
The question has nothing to do with the statement. . . There could be more or less GO TO statements and the records will be read the same way (in the same order).
The GO TO statements mention "exit" - this could be misleading. The GO TO JOB transfers control back to the JOB statement for the next iteration. |
|
Back to top |
|
|
|