IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

TO find a variable at different location and format it


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jemonthomas

New User


Joined: 24 Jul 2006
Posts: 35
Location: india

PostPosted: Thu Mar 22, 2012 12:43 pm
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Thu Mar 22, 2012 12:51 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Mar 22, 2012 12:52 pm
Reply with quote

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
View user's profile Send private message
jemonthomas

New User


Joined: 24 Jul 2006
Posts: 35
Location: india

PostPosted: Thu Mar 22, 2012 1:09 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Mar 22, 2012 1:14 pm
Reply with quote

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
View user's profile Send private message
jemonthomas

New User


Joined: 24 Jul 2006
Posts: 35
Location: india

PostPosted: Thu Mar 22, 2012 1:53 pm
Reply with quote

The string wont occur more than once in the same record.Output is shorter than input as per the requirement
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Mar 22, 2012 2:12 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Thu Mar 22, 2012 11:57 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Mainframe openings in Techmahnidra fo... Mainframe Jobs 0
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top