View previous topic :: View next topic
|
Author |
Message |
jemonthomas
New User
Joined: 24 Jul 2006 Posts: 35 Location: india
|
|
|
|
Hi,
I have a file where a varable copy which is at different loc in a file.I need to format it so that I can get it allinged.
Could someone help me on this? |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
call your team mate and show him what you posted here. See if he understands anything at all.
Please explain in detail how input output records look and how you want to achieve it.
The forum members are not professor Xaviers..
except me of course |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
I think you have to re-read what you have written, and then make it a lot clearer.
If you want to it in Syncsort, say so. How many files? What format is the field? What do you mean by "copy"? etc |
|
Back to top |
|
|
jemonthomas
New User
Joined: 24 Jul 2006 Posts: 35 Location: india
|
|
|
|
the word copy is just an example.
In a file
dsadsdasdasdacopysdddsaddasdasd
sdsadassdasdsdasdassddcopyddsad
ssadsadasdsadasdsadsdasdasdsasdascopy
how can I format it as
dsadcopy
sdsacopy
ssadcopy |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Well, some progresss.
You have a particular "string" which appears somewhere in a record and you'd like to have it in a fixed location?
If this is it, can the "string" occur more than once in the record? In your example the records are suddenly much shorter on output, is that something to do with the requirement?
Again, anything else you feel might clarify it for us. |
|
Back to top |
|
|
jemonthomas
New User
Joined: 24 Jul 2006 Posts: 35 Location: india
|
|
|
|
The string wont occur more than once in the same record.Output is shorter than input as per the requirement |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
I don't know if this will give you something of a start, because things are still very unclear...
Code: |
//FNDSTRNG EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=(1,80,SS,EQ,C'STRING'),
BUILD=(1,5,C'STRING'))
//*
//SORTIN DD *
STRING
STRING FROM STUFF
X1234 STRING
X1234 STRONG STUFF HERE
|
Output is:
Code: |
STRINSTRING
STSTRING
X1234STRING
X1234 STRONG STUFF HERE
|
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
jemonthomas,
In your example, 'copy' appears in every record. If that's really the case then you can just use:
Code: |
OPTION COPY
BUILD=(1,4,C'copy')
|
If it's more complicated then that (e.g. copy does NOT appear in every record), then you need to show a much better example of input and expected output for all of the possible variations. Showing the most trivial case does NOT lead to good solutions here. |
|
Back to top |
|
|
|