View previous topic :: View next topic
|
Author |
Message |
ksk
Active User
Joined: 08 Jun 2006 Posts: 355 Location: New York
|
|
|
|
HI,
We have a code as below...
Code: |
JOINKEYS F1=IN1,FIELDS=(1,18,A)
JOINKEYS F2=IN2,FIELDS=(4,18,A)
JOIN UNPAIRED,F2
REFORMAT FIELDS=(F2:1,457,?)
OPTION COPY
|
I know the meaning of all other but can I know what the below question Mark (?) denotes here?
Code: |
REFORMAT FIELDS=(F2:1,457,?)
|
Thanks
KSK |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//INA DD *
AAA
ACC
BBB
CBB
DBB
EBB
FBB
//INB DD *
AAA
BCC
BBB
CBB
DBB
EBB
FBB
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
JOINKEYS F1=INA,FIELDS=(1,5,A)
JOINKEYS F2=INB,FIELDS=(1,5,A)
JOIN UNPAIRED F1,F2
REFORMAT FIELDS=(F1:1,5,F2:1,5,?)
//* |
Gives an output
Code: |
AAA AAA B
ACC 1
BBB BBB B
BCC 2
CBB CBB B
DBB DBB B
EBB EBB B
FBB FBB B |
So using ? in reformat could get you three possible values B,1,2
B - When key is found in both files
1 - When key found in first file only
2 - When key found in second file only |
|
Back to top |
|
|
Gary McDowell
Active User
Joined: 15 Oct 2012 Posts: 139 Location: USA
|
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
Back to top |
|
|
ksk
Active User
Joined: 08 Jun 2006 Posts: 355 Location: New York
|
|
|
|
Thank you for all replies. |
|
Back to top |
|
|
|