View previous topic :: View next topic
|
Author |
Message |
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Krishna,
Could you please provide more details about your file layout and the date format? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
Thanks Frank Yaeger,
Your suggestion is working fine |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
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 |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
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
thanks |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
thanks for the link frank |
|
Back to top |
|
|
|