What is ? in reformat fields?
- Anuj Dhawan
- Founder
- Posts: 2812
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: What is ? in reformat fields?
You might want to give an example of your specific situation. An educated guess is that you are talking about REFORMAT used in JOINKEYs, are you? Please elaborate.
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Re: What is ? in reformat fields?
Hi Anuj,
Thank you for your reply.
Yes, I am talking about the REFORMAT in JOINKEYs like below:
Thank you for your reply.
Yes, I am talking about the REFORMAT in JOINKEYs like below:
You do not have the required permissions to view the files attached to this post.
- Anuj Dhawan
- Founder
- Posts: 2812
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: What is ? in reformat fields?
? indicates a 1-byte indicator is to be included in each joined record. The indicator will be set to one of the following values in each paired or unpaired joined record, as appropriate:
'B' - the key was found in F1 and F2.
'1' - the key was found in F1, but not in F2.
'2' - the key was found in F2, but not in F1.
Only one ? can be specified in the FIELDS operand. If ? is not the last item, it must be followed by F1: or F2:.
For TYPE=F joined records, the indicator can appear anywhere in the record. For example, each of the following is valid:
For TYPE=V joined records, the indicator must appear in the fixed part of the record, that is, after the RDW and before the position without length fields. For example, the following is valid:
See this link for details: https://www.ibm.com/docs/en/zos/2.1.0?t ... -statement
'B' - the key was found in F1 and F2.
'1' - the key was found in F1, but not in F2.
'2' - the key was found in F2, but not in F1.
Only one ? can be specified in the FIELDS operand. If ? is not the last item, it must be followed by F1: or F2:.
For TYPE=F joined records, the indicator can appear anywhere in the record. For example, each of the following is valid:
Code: Select all
* Put indicator in position 1 of each joined record.
REFORMAT FIELDS=(?,F1:1,20,F2:5,8)
* Put indicator in position 21 of each joined record.
REFORMAT FIELDS=(F1:1,20,?,F1:31,9)
* Put indicator in position 25 of each joined record.
REFORMAT FIELDS=(F2:11,20,6,4,?)
Code: Select all
* Put indicator in position 5 of each joined record.
REFORMAT FIELDS=(F1:1,4,?,F1:11)
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Re: What is ? in reformat fields?
Thank you so much Anuj. This is really helpful.Anuj Dhawan wrote: ↑Mon Aug 08, 2022 9:02 pm ? indicates a 1-byte indicator is to be included in each joined record. The indicator will be set to one of the following values in each paired or unpaired joined record, as appropriate:
'B' - the key was found in F1 and F2.
'1' - the key was found in F1, but not in F2.
'2' - the key was found in F2, but not in F1.
Only one ? can be specified in the FIELDS operand. If ? is not the last item, it must be followed by F1: or F2:.
For TYPE=F joined records, the indicator can appear anywhere in the record. For example, each of the following is valid:
For TYPE=V joined records, the indicator must appear in the fixed part of the record, that is, after the RDW and before the position without length fields. For example, the following is valid:Code: Select all
* Put indicator in position 1 of each joined record. REFORMAT FIELDS=(?,F1:1,20,F2:5,8) * Put indicator in position 21 of each joined record. REFORMAT FIELDS=(F1:1,20,?,F1:31,9) * Put indicator in position 25 of each joined record. REFORMAT FIELDS=(F2:11,20,6,4,?)
See this link for details: https://www.ibm.com/docs/en/zos/2.1.0?t ... -statementCode: Select all
* Put indicator in position 5 of each joined record. REFORMAT FIELDS=(F1:1,4,?,F1:11)
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute