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 Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am


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