Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to reformat records using SORT command

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
mkssampathkumar
Warnings : 1

New User


Joined: 31 Aug 2006
Posts: 57
Location: chennai

PostPosted: Tue Feb 20, 2007 2:57 pm    Post subject: How to reformat records using SORT command
Reply with quote

Hi
How to reformat the records using SORT command.

for example,
am having 2 fields(field1 and field2)

The length of both the fields are 10.

input rec :
pos: 12345678901234567890
rec: abcdefghij0987654321

output rec :
pos: 12345678901234567890
rec: 0987654321abcdefghij

I want to reformat the record like second field has to come in first position.

How to do that using SORT command.


Thanks..
Back to top
View user's profile Send private message

guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Tue Feb 20, 2007 3:10 pm    Post subject:
Reply with quote

HI there,

Use the folowing control card

Code:
//SYSIN    DD  *                   
   OPTION COPY                     
   OUTFIL OUTREC=(1:11,10,11:1,10) 
                                   
/*
Back to top
View user's profile Send private message
mkssampathkumar
Warnings : 1

New User


Joined: 31 Aug 2006
Posts: 57
Location: chennai

PostPosted: Tue Feb 20, 2007 3:26 pm    Post subject:
Reply with quote

Hi
Thanks for ur reply.
its very useful for me.

its is only for reformatting.If i want to sort and then i have to reformat means,what shall i do??.

i want to sort by field2 and then i have to reformat using one step.
Is it possible?
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Tue Feb 20, 2007 3:29 pm    Post subject:
Reply with quote

Hi There,

Code:
//SYSIN    DD  *
  SORT FIELDS= (11,10,CH,A)
  OUTFIL OUTREC=(1:11,10,11:1,10)
/*
Back to top
View user's profile Send private message
mkssampathkumar
Warnings : 1

New User


Joined: 31 Aug 2006
Posts: 57
Location: chennai

PostPosted: Tue Feb 20, 2007 4:33 pm    Post subject:
Reply with quote

Hi
Thanks for your reply..
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Skip records depends on count lakshmiibmmainframes DFSORT/ICETOOL 5 Sun Dec 24, 2017 9:51 pm
No new posts Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm
No new posts SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 9 Thu Dec 14, 2017 3:52 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us