What is ? in reformat fields?

IBM's Sort Product, ICETOOL, ICEMAN and ICEGENER.
Post Reply
Chaitnaya
Registered Member
Posts: 17
Joined: Thu Jan 16, 2014 4:48 pm

What is ? in reformat fields?

Post by Chaitnaya »

Hi guys,

What is ? in reformat fields?
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: What is ? in reformat fields?

Post by Anuj Dhawan »

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.
Chaitnaya
Registered Member
Posts: 17
Joined: Thu Jan 16, 2014 4:48 pm

Re: What is ? in reformat fields?

Post by Chaitnaya »

Hi Anuj,

Thank you for your reply.

Yes, I am talking about the REFORMAT in JOINKEYs like below:

reformat fields.jpeg
You do not have the required permissions to view the files attached to this post.
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: What is ? in reformat fields?

Post by Anuj Dhawan »

? 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:

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,?)
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 5 of each joined record. 
  REFORMAT FIELDS=(F1:1,4,?,F1:11)
See this link for details: https://www.ibm.com/docs/en/zos/2.1.0?t ... -statement
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.
Chaitnaya
Registered Member
Posts: 17
Joined: Thu Jan 16, 2014 4:48 pm

Re: What is ? in reformat fields?

Post by Chaitnaya »

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:

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,?)
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 5 of each joined record. 
  REFORMAT FIELDS=(F1:1,4,?,F1:11)
See this link for details: https://www.ibm.com/docs/en/zos/2.1.0?t ... -statement
Thank you so much Anuj. This is really helpful.
Post Reply

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

Register

Sign in

Return to “IBM DFSort, ICETOOL, ICEMAN, ICEGENER.”