********************************* TOP OF DATA **********************************
ICE411I 0 THIS IS THE JOINKEYS MAIN TASK FOR JOINING F1 AND F2
ICE416I 0 JOINKEYS IS USING THE F1 SUBTASK FOR SORTJNF1 - SEE JNF1JMSG MESSAGES
ICE416I 1 JOINKEYS IS USING THE F2 SUBTASK FOR SORTJNF2 - SEE JNF2JMSG MESSAGES
ICE419I 0 JOINED RECORDS: TYPE=F, LENGTH=201
ICE201I H RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE162I 0 ICEIEXIT CHANGED ONE OR MORE OPTIONS IN EFFECT
ICE043A 9 INVALID DATA SET ATTRIBUTES: YESTONLY RECFM - REASON CODE IS 14
ICE751I 0 C5-K76982 C6-K90026 C7-K82419 C8-K67572 E9-K60824 E7-K79990
ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES A
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R12 - 10:57 ON FRI M
* CONTROL STATEMENTS FOR JOINKEYS APPLICATION
JOINKEYS FILE=F1,FIELDS=(21,100,A),SORTED,NOSEQCK,TYPE=V
JOINKEYS FILE=F2,FIELDS=(21,100,A),SORTED,NOSEQCK,TYPE=V
JOIN UNPAIRED,F1,F2
REFORMAT FIELDS=(F1:21,100,F2:21,100,?)
* CONTROL STATEMENTS FOR MAIN TASK (JOINED RECORDS)
OPTION COPY
OUTFIL FNAMES=YESTONLY,INCLUDE=(201,1,CH,EQ,C'1'),
BUILD=(21,100)
OUTFIL FNAMES=TODYONLY,INCLUDE=(201,1,CH,EQ,C'2'),
BUILD=(21,100)
OUTFIL FNAMES=COMMON,INCLUDE=(201,1,CH,EQ,C'B'),
BUILD=(21,100,/,21,100)
ICE411I 0 THIS IS THE JOINKEYS MAIN TASK FOR JOINING F1 AND F2
ICE416I 0 JOINKEYS IS USING THE F1 SUBTASK FOR SORTJNF1 - SEE JNF1JMSG MESSAGES
ICE416I 1 JOINKEYS IS USING THE F2 SUBTASK FOR SORTJNF2 - SEE JNF2JMSG MESSAGES
ICE419I 0 JOINED RECORDS: TYPE=F, LENGTH=201
ICE201I H RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE162I 0 ICEIEXIT CHANGED ONE OR MORE OPTIONS IN EFFECT
ICE043A 9 INVALID DATA SET ATTRIBUTES: YESTONLY RECFM - REASON CODE IS 14
ICE751I 0 C5-K76982 C6-K90026 C7-K82419 C8-K67572 E9-K60824 E7-K79990
ICE052I 3 END OF DFSORT
******************************* BOTTOM OF DATA ********************************
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Why have you got TYPE=V on the two JOINKEYS? Everything points to the data being Fixed, and you don't need to specify TYPE except where the manual indicates you do.
Joined: 22 Mar 2009 Posts: 161 Location: South Africa
hi Nic,
I have to give get the output in the same format as input. Like all 2052 bytes need to be there in output files.
When testing with YESTONLY DD SYSOUT=* its working fine and giving me the output with 100 bytes.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Think about it. If you got 100 bytes on SYSOUT, how many do you think you are going to get on an output dataset? SYSOUT is FIXED, and that "works" for you, so how do you think your output dataset can "magically" become "variable"?
Joined: 22 Mar 2009 Posts: 161 Location: South Africa
Hi Bill,
I am using the JOINKEYS first time and not sure how to make it 2052 and VB. The EZYTRIEVE I used is working fine:
Code:
FILE ORIGTRAN
REC-ORIG 1 2052 A
KEY-ORIG 17 100 A
*
FILE NEWTRAN
REC-NEW 1 2052 A
KEY-NEW 17 100 A
FILE DELACB
REC-DEL 1 2052 A
FILE INSACB
REC-INS 1 2052 A
FILE MTCHACB
REC-MTCH 1 2052 A
OREC1 1 2052 A
FILE REPORT01 PRINTER
JOB INPUT( ORIGTRAN KEY(KEY-ORIG) -
NEWTRAN KEY(KEY-NEW))
IF MATCHED ORIGTRAN, NEWTRAN
* DISPLAY 'MATCHED '
OREC1 EQ REC-ORIG
PUT MTCHACB
GO TO JOB
END-IF
IF ORIGTRAN
* DISPLAY 'EXTRA - ORIG' KEY-ORIG
REC-DEL = REC-ORIG
PUT DELACB
GO TO JOB
END-IF
IF NEWTRAN
* DISPLAY 'EXTRA - NEW ' KEY-NEW
REC-INS = REC-NEW
PUT INSACB
GO TO JOB
END-IF
*
*
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
In Easytrieve you should replace those assignments with either MOVE filename-1 TO filename-2 and then the PUT filename-2, or use PUT filename-2 FROM filename-1.
The difference to your JOINKEYS step is that there you are outputting fixed 100-byte records with the BUILD.
What is it that you actually want to do in the JOINKEYS?
Joined: 22 Mar 2009 Posts: 161 Location: South Africa
I got two files
1) Yesterday File
2) Today File
But the frontend says that there are some records which they sent in both file. We can not process the same record twice so I want to remove. So, in YESTONLY file I need those records which are only for Yesterday, TODYONLY will contain those records which are for today. And the common will contain which are present in both file.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
'cept those will get you FB.
EDIT:
Manual wrote:
If the REFORMAT statement only defines position with length (p,m) fields, each joined record will be fixed-length (TYPE=F) with a LENGTH equal to the total length of all of the p,m fields. The maximum length for TYPE=F joined records is 32760 bytes. The F1 and F2 files can both be fixed-length, both be variable-length, or can be mixed fixed-length and variable-length.
So, the REFORMAT will be F, and you can't just later make a variable-length record by happening to have a binary value.
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
You can create Variable Record after Join when you have a tail.
abhijit.nayak01,
Get rid off all your steps and just run this single step which will give you the desired results. You do not have to code DCB properties as DFSORT can automatically calculate them for you.
Joined: 22 Mar 2009 Posts: 161 Location: South Africa
Hi Skolusu,
The job is working now and I need to check the output in detail:
But I got some doubts :
1) Kindly explain the Reformat. Also for VB file how the reformat is different.
2) Why VLTRIM=C' ' is used ?
3) How the output file becomes VB ?
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
This is why I suggested the "learning exercise". If you complete that, you should be able to answer all those questions yourself, and perhaps pick up something else along the way.
Do you have time to go through that, or are just desperate for an answer?
Also, in future, don't post questions with the Subject all in upper-case.
Joined: 22 Mar 2009 Posts: 161 Location: South Africa
Hi Bill,
Actually I went through the materials and digging more. And the REFORMAT for FB I understood. Need to check more examples for VB.
I was not aware of the subject line upper case. Apology for that and I will take care from my next post.
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
abhijit.nayak01 wrote:
Actually I went through the materials and digging more. And the REFORMAT for FB I understood. Need to check more examples for VB.
abhijit.nayak01 wrote:
Hi Skolusu,
The job is working now and I need to check the output in detail:
But I got some doubts :
1) Kindly explain the Reformat. Also for VB file how the reformat is different.
2) Why VLTRIM=C' ' is used ?
3) How the output file becomes VB ?
Did you even bother reading the REFORMAT statement? If you did you will find out how a variable record is created. Here it is once again the Joinkeys documentation that explains about how p without m gives the starting position of a variable field under the explanation of REFORMAT statement.
Given how many times I stressed about you understanding the control cards, this will be the last time I am going to spoon feed you. You just don't seem to put minimum effort to understand the job you are given.