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

Reverse name input data using comma


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
naveen_amudalapelly
Warnings : 1

New User


Joined: 15 Oct 2004
Posts: 16

PostPosted: Mon May 14, 2007 10:00 pm
Reply with quote

Hi,
First i am sorry for my bad english.
I have few below formatted records in a data set.

Code:

ID              Name             street
1234          kamal,atn          12 th st
1235          john,axy           13 th st
1236          mark,vell          14 the st


in the above Name starting at 30th position. could any one help me in arrainging the above data in below format. Name data should be reversed using comma (,) .

Code:

1234          atn kamal          12 th st
1235          axy john           13 th st
1236          Vell mark          14 the st
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: Mon May 14, 2007 11:30 pm
Reply with quote

You can use a DFSORT job like the one below to do what you asked for. You'll need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) in order to use DFSORT's PARSE and SQZ functions. If you don't have the April, 2006 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTF, see:

Use [URL] BBCode for External Links

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
1234                         kamal,atn        12 th st
1235                         john,axy         13 th st
1236                         mark,vell        14 the st
/*
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
  INREC PARSE=(%01=(ABSPOS=30,ENDBEFR=C',',FIXLEN=8),
               %02=(ENDBEFR=C' ',FIXLEN=8)),
        OVERLAY=(30:%02,%01,30:30,16,SQZ=(SHIFT=LEFT,MID=C' '))
/*


SORTOUT will have:

Code:

1234                         atn kamal        12 th st
1235                         axy john         13 th st
1236                         vell mark        14 the st
Back to top
View user's profile Send private message
naveen_amudalapelly
Warnings : 1

New User


Joined: 15 Oct 2004
Posts: 16

PostPosted: Tue May 15, 2007 7:26 pm
Reply with quote

Thank you Frank. But here I dont have Iceman utility. Can we do this using sort utility only ?
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: Tue May 15, 2007 9:09 pm
Reply with quote

Quote:
here I dont have Iceman utility. Can we do this using sort utility only ?


I don't know what you mean by this statement. PGM=ICEMAN and PGM=SORT are just equivalent ways of invoking the sort product at your site (DFSORT, Syncsort, CA-SORT). If DFSORT is the sort product at your site, then the job will work providing you have the April, 2006 PTF installed. Syncsort and CA-SORT do not support the PARSE or SQZ functions, so you won't be able to use my job if you have one of those sort products instead of DFSORT.

I'm a DFSORT developer. DFSORT, Syncsort and CA-Sort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on the other products.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
Search our Forums:

Back to Top