Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: If the date is 2006 then i need to make the Name field Blank
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: 1439
Location: Bangalore,India

PostPosted: Tue Mar 27, 2007 2:48 pm    Post subject:
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 Moderator


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

PostPosted: Tue Mar 27, 2007 8:59 pm    Post subject:
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    Post subject: Thanx
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    Post subject: to move space without condition
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    Post subject: solved myself
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 Moderator


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

PostPosted: Fri Mar 30, 2007 9:19 pm    Post subject:
Reply with quote

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


www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html

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    Post subject: thanks
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    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 INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us