Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Reverse name input data using comma

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Reverse name input data using comma
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 Moderator


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

PostPosted: Mon May 14, 2007 11:30 pm    Post subject:
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:

www.ibm.com/servers/storage/support/software/sort/mvs/peug/

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    Post subject: Re: Reverse name input data using comma
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 Moderator


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

PostPosted: Tue May 15, 2007 9:09 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us