View previous topic :: View next topic
|
Author |
Message |
seahawk789
New User
Joined: 22 Feb 2010 Posts: 56 Location: Cochin
|
|
|
|
I have a file with 2 fields
1. Member ID - PIC x(9)
2. Date - PIC 9(8) COMP-3
I need to extract all the member ids from the file having date > '2006-01-01'
I passed the following parameter to SYSIN * but its not working?
Code: |
SORT FIELDS=COPY
INCLUDE COND=(10,5,BI,GT,X'0200601010')
|
Am I using the correct X equivalent for 20060101 ? Please help me. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
No, you're not.
Your date is a PIC 9(8) COMP-3 value which in DFSORT terms is a 5-byte PD value that looks like this P'yyyymmdd' (X'0yyyymmddC'). So the correct INCLUDE statement would be:
Code: |
INCLUDE COND=(10,5,PD,GT,20060101)
|
|
|
Back to top |
|
|
seahawk789
New User
Joined: 22 Feb 2010 Posts: 56 Location: Cochin
|
|
|
|
Thanks.. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Hi Seahawk,
This(From DFSORT Application programming guide by Frank) will help you...
Code: |
COBOL DATA TYPE DFSORT LENGTH DFSORT FORMAT
PIC X(N) USAGE DISPLAY N CH
GROUP DATA ITEMS WITH N BYTES N CH
PIC 9(N) DISPLAY N ZD
PIC S9(N) DISPLAY <TRAILING> N ZD
PIC S9(N) DISPLAY LEADING N CLO
PIC S9(N) DISPLAY SEPARATE <TRAILING> N+1 CST
PIC S9(N) DISPLAY LEADING SEPARATE N+1 CSL OR FS
PIC 9(N) COMP|BINARY|COMP-4|COMP-5
N = 1 TO 4 2 BI
N = 5 TO 9 4 BI
N >= 10 8 BI
PIC S9(N) COMP|BINARY|COMP-4|COMP-5
N = 1 TO 4 2 FI
N = 5 TO 9 4 FI
N >= 10 8 FI
PIC 9(N) COMP-3|PACKED-DECIMAL (N/2)+1 PD
PIC S9(N) COMP-3|PACKED-DECIMAL (N/2)+1 PD
|
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
Back to top |
|
|
abraralum
New User
Joined: 19 Dec 2010 Posts: 42 Location: Bangalore
|
|
|
|
Hi Frank/Escapa,
Please can you point me to the link for same in Syncsort.. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
Hi Frank/Escapa,
Please can you point me to the link for same in Syncsort. |
This is the DFSORT Forum for questions on DFSORT. Questions on Syncsort should be posted in the JCL Forum.
I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort. However, I can tell you that whereas the DFSORT books are available online, the Syncsort books are not. |
|
Back to top |
|
|
seahawk789
New User
Joined: 22 Feb 2010 Posts: 56 Location: Cochin
|
|
|
|
Thanks a lot folks.. |
|
Back to top |
|
|
|