View previous topic :: View next topic
|
Author |
Message |
swapnadeep.ganguly
Active User
Joined: 21 Mar 2007 Posts: 203 Location: India
|
|
|
|
Hi all,
I want to change the first two columns of my FB file to spaces. The current file layout is as:
Code: |
XX1920-01-012005-08-03 2005-08-03 9999-12-31
XX1920-01-012005-08-03 2005-08-03 9999-12-31
XX1920-01-012005-08-03 2005-08-03 9999-12-31
XX1920-01-012005-08-03 2005-08-03 9999-12-31
XX1920-01-012005-08-03 2005-08-03 9999-12-31
XX1920-01-012005-08-03 2005-08-03 9999-12-31
XX1920-01-012005-08-03 2005-08-03 9999-12-31
XX1920-01-012005-08-03 2005-08-03 9999-12-31
XX1920-01-012005-08-03 2005-08-03 9999-12-31
XX1920-01-012005-08-03 2005-08-03 9999-12-31 |
However, I want the same to appear as:
Code: |
1920-01-012005-08-03 2005-08-03 9999-12-31
1920-01-012005-08-03 2005-08-03 9999-12-31
1920-01-012005-08-03 2005-08-03 9999-12-31
1920-01-012005-08-03 2005-08-03 9999-12-31
1920-01-012005-08-03 2005-08-03 9999-12-31
1920-01-012005-08-03 2005-08-03 9999-12-31
1920-01-012005-08-03 2005-08-03 9999-12-31
1920-01-012005-08-03 2005-08-03 9999-12-31
1920-01-012005-08-03 2005-08-03 9999-12-31
1920-01-012005-08-03 2005-08-03 9999-12-31 |
Please help me out regarding the same. |
|
Back to top |
|
|
HappySrinu
Active User
Joined: 22 Jan 2008 Posts: 194 Location: India
|
|
|
|
try this option in your edited member command line
C 1 3 P'XX' '' ALL
Cheers,
Srini |
|
Back to top |
|
|
swapnadeep.ganguly
Active User
Joined: 21 Mar 2007 Posts: 203 Location: India
|
|
|
|
Thanks for your suggestion...
But I want a SORT card for the same. This is to be performed while executing my job.
I don't want the manual change. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Swapnadeep,
Use outrec ifthen=(when=....,overlay=....). For examples, saerch thru forum. |
|
Back to top |
|
|
swapnadeep.ganguly
Active User
Joined: 21 Mar 2007 Posts: 203 Location: India
|
|
|
|
All the examples that are provided involves ICEMAN/DFSORT. But I require the SYNCSORT card for the same. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
You got an answer in terms of "ICE...." because You posted to the DFSORT/ICETOOL
Anyway both products have a strong base of similar/identical functionalities
so it should not be difficult to search for a similar requirement and it' s solution |
|
Back to top |
|
|
anil salve b
New User
Joined: 31 Oct 2007 Posts: 3 Location: Mumbai
|
|
|
|
Use this Sort card for the same,taken LRECL=80
OUTREC FIELDS=(01,02,CHANGE=(2,C'XX',C' '),NOMATCH=(01,02),
03,78)
SORT FIELDS=COPY |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
same without CHANGE:
Code: |
OUTREC FIELDS=(1:2X,3:3,78)
SORT FIELDS=COPY |
|
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
Hi Srini,
Please elaborate on
Quote: |
C 1 3 P'XX' '' ALL |
How does it work?
Thanks,
Ajay |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
swapnadeep.ganguly wrote: |
I want to change the first two columns of my FB file to spaces. |
You can also try this:
Code: |
//SYSIN DD *
SORT FIELDS=COPY
OUTREC OVERLAY=(1:2X)
/*
|
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
This is an editor command intended to remove the XX in cols 1 & 2. I believe it will not give the requested result due to shifting.
To get what i believe is the required result, i'd use:
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi,
dick scherrer wrote: |
This is an editor command intended to remove the XX in cols 1 & 2. |
And in your 'internal perception' You can spell it as "change all XX with two SPACES starting from column 1"
Quote: |
I believe it will not give the requested result due to shifting. |
Yes, it will not provide the expected result, second-code shown by You would result expected outcome.
P.S.: Perhaps I'm too young too give any suggestion but Swapnadeep this problem was pretty simple, You could've done with it with a very little effort from your side. Your maximum post are on SORT, so I believe You do have manuals. To put two spaces in SORTOUT using in inrec/outrec was not a big deal..perhaps no magic from Alissa or Frank was needed. Just a personal view.. don't be addicted to forum. Please don't take it otherwise, no offences meant...
have a good one,
later |
|
Back to top |
|
|
|