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

If the date is 2006 then i need to make the Name field Blank


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

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Mar 27, 2007 1:24 pm
Reply with quote

My file contains 2 columns.
One column is Year and the another is Name_of_emp.

My requirement is if the date is 2006 then i need to make the Name field Blank.

Is this possible using SORT?

krishna
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Tue Mar 27, 2007 2:48 pm
Reply with quote

Krishna,

Could you please provide more details about your file layout and the date format?
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: Tue Mar 27, 2007 8:59 pm
Reply with quote

Krishna,

You can use a DFSORT like this to do what you asked for. Adjust accordingly for your actual data.

Code:

//S1    EXEC  PGM=ICEMAN                                   
//SYSOUT    DD  SYSOUT=*                                   
//SORTIN DD *                                               
2006EMPLOYEE_A                                             
2007EMPLOYEE_B                                             
2006EMPLOYEE_C                                             
2007EMPLOYEE_D                 
/*                           
//SORTOUT DD SYSOUT=*                                       
//SYSIN    DD    *                                         
  OPTION COPY                                               
  INREC IFTHEN=(WHEN=(1,4,CH,EQ,C'2006'),                   
    OVERLAY=(5:10X))                                       
/*


SORTOUT would have:

Code:

2006             
2007EMPLOYEE_B   
2006             
2007EMPLOYEE_D   
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Mar 29, 2007 3:23 pm
Reply with quote

Thanks Frank Yaeger,
Your suggestion is working fine
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Fri Mar 30, 2007 6:41 pm
Reply with quote

with out putting any condition i tried moving spaces, but its abending as S000. Here is the code that i tried...
Code:

//S1    EXEC  PGM=ICEMAN                                   
//SYSOUT    DD  SYSOUT=*                                   
//SORTIN DD *                                               
2006EMPLOYEE_A                                             
2007EMPLOYEE_B                                             
2006EMPLOYEE_C                                             
2007EMPLOYEE_D                 
/*                           
//SORTOUT DD SYSOUT=*                                       
//SYSIN    DD    *                                         
  OPTION COPY                                               
    OVERLAY=(5:10X)                                       
/*

Is there any other syntax for this criteria? Also please provide me the link to manual(preferably PDF) for ICEMAN,ICETOOL

Next part is instead of spaces could i put some other characters like 'Z'.

Advance thanks
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Fri Mar 30, 2007 8:39 pm
Reply with quote

solved myself
Code:

//S1    EXEC  PGM=ICEMAN                                   
//SYSOUT    DD  SYSOUT=*                                   
//SORTIN DD *                                               
2006EMPLOYEE_A                                             
2007EMPLOYEE_B                                             
2006EMPLOYEE_C                                             
2007EMPLOYEE_D                 
/*                           
//SORTOUT DD SYSOUT=*                                       
//SYSIN    DD    *                                         
  OPTION COPY                                               
   INREC OVERLAY=(5:10X)                                       
/*



And for placing the 'Z' in the place of spaces i did just added
Code:

c'Z'

thanks
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: Fri Mar 30, 2007 9:19 pm
Reply with quote

Quote:
Also please provide me the link to manual(preferably PDF) for ICEMAN,ICETOOL


Use [URL] BBCode for External Links

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Mon Apr 02, 2007 8:09 pm
Reply with quote

thanks for the link frank
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 Replacing 'YYMMDD' with date, varying... SYNCSORT 3
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 Need to convert date format DFSORT/ICETOOL 20
No new posts trying to make sense of keylists TSO/ISPF 11
Search our Forums:

Back to Top