Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Comparing COMP-3 variable in DFSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Comparing COMP-3 variable in DFSORT
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 Moderator


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

PostPosted: Wed Apr 06, 2011 11:19 pm    Post subject:
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    Post subject:
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    Post subject:
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 Moderator


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

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

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

http://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    Post subject:
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 Moderator


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

PostPosted: Thu Apr 07, 2011 9:27 pm    Post subject:
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    Post subject: Reply to: Comparing COMP-3 variable in DFSORT
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Comparing two sequential files Mohan Kothakota COBOL Programming 14 Mon Apr 16, 2018 6:35 pm
No new posts Need urgent suggestion on DFSORT subratarec DFSORT/ICETOOL 6 Wed Mar 21, 2018 8:46 pm
No new posts To get Non matching row after compari... vinu78 DB2 7 Fri Jan 05, 2018 5:43 pm
No new posts COMP Variables Mismatch gayu7 COBOL Programming 5 Wed Dec 20, 2017 5:06 pm
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us