Hi All,
I have a query as below...
Query UserPRF that has below file selection and record selection criteria.
File selection as below?
File . . . . . . . . . FILE_A (File ID: T01)
File . . . . . . . . . FILE_B (File ID: T02)
File . . . . . . . . . FILE_C (File ID: T03)
File . . . . . . . . . FILE_D (File ID: T04)
2=Matched records with primary file
UPUPRF EQ SPUSR (File ID = T02)
UPUPRF EQ USRID3 (File ID = T03)
UPUPRF EQ USRID (File ID = T04)
Select record condition as below?
SPUSR EQ ' '
AND USRVM# NE ' '
AND USRPRT NE ' '
And I am trying to achieve the same using join LF as below...
A R RDSPUSR TEXT('Active User Profile')
A*
A JFILE(FILE_A FILE_B +
A FILE_C FILE_D )
A J JOIN(1 2)
A JFLD(UPUPRF SPUSR )
A J JOIN(1 3)
A JFLD(UPUPRF USRID3 )
A J JOIN(1 4)
A JFLD(UPUPRF USRID )
A UPUPRF
A JREF(1)
A COLHDG('User')
A USRNME
A JREF(4)
A COLHDG('User Name')
A UPTEXT
A JREF(1)
A COLHDG('User Text')
So when I compile the file and run using runqry or SQL then it does not produce any records but if I run the above query then it produce records on same machine, so what am I missing in my DDS of JLF?
Thanks,
NIL
I have a query as below...
Query UserPRF that has below file selection and record selection criteria.
File selection as below?
File . . . . . . . . . FILE_A (File ID: T01)
File . . . . . . . . . FILE_B (File ID: T02)
File . . . . . . . . . FILE_C (File ID: T03)
File . . . . . . . . . FILE_D (File ID: T04)
2=Matched records with primary file
UPUPRF EQ SPUSR (File ID = T02)
UPUPRF EQ USRID3 (File ID = T03)
UPUPRF EQ USRID (File ID = T04)
Select record condition as below?
SPUSR EQ ' '
AND USRVM# NE ' '
AND USRPRT NE ' '
And I am trying to achieve the same using join LF as below...
A R RDSPUSR TEXT('Active User Profile')
A*
A JFILE(FILE_A FILE_B +
A FILE_C FILE_D )
A J JOIN(1 2)
A JFLD(UPUPRF SPUSR )
A J JOIN(1 3)
A JFLD(UPUPRF USRID3 )
A J JOIN(1 4)
A JFLD(UPUPRF USRID )
A UPUPRF
A JREF(1)
A COLHDG('User')
A USRNME
A JREF(4)
A COLHDG('User Name')
A UPTEXT
A JREF(1)
A COLHDG('User Text')
So when I compile the file and run using runqry or SQL then it does not produce any records but if I run the above query then it produce records on same machine, so what am I missing in my DDS of JLF?
Thanks,
NIL
Comment