IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Comparing COMP-3 variable in DFSORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
seahawk789

New User


Joined: 22 Feb 2010
Posts: 56
Location: Cochin

PostPosted: Wed Apr 06, 2011 10:50 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Apr 06, 2011 11:19 pm
Reply with quote

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
View user's profile Send private message
seahawk789

New User


Joined: 22 Feb 2010
Posts: 56
Location: Cochin

PostPosted: Thu Apr 07, 2011 7:54 am
Reply with quote

Thanks..
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Apr 07, 2011 2:33 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Apr 07, 2011 8:50 pm
Reply with quote

Here's the link to that section in the DFSORT book:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA50/C.3?DT=20100630155256
Back to top
View user's profile Send private message
abraralum

New User


Joined: 19 Dec 2010
Posts: 42
Location: Bangalore

PostPosted: Thu Apr 07, 2011 8:58 pm
Reply with quote

Hi Frank/Escapa,

Please can you point me to the link for same in Syncsort..
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Apr 07, 2011 9:27 pm
Reply with quote

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
View user's profile Send private message
seahawk789

New User


Joined: 22 Feb 2010
Posts: 56
Location: Cochin

PostPosted: Sat Apr 09, 2011 5:10 pm
Reply with quote

Thanks a lot folks..
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
Search our Forums:

Back to Top