MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

want to revert the seq of the record

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
issac1029
Intermediate


Joined: 10 Dec 2005
Posts: 159
Topics: 75

PostPosted: Fri Jul 07, 2006 11:27 pm    Post subject: want to revert the seq of the record Reply with quote

Hi,

I've saw a method to revert the sequence occasionally like:

old: 1234
new: 4321

What the option for this?I fogot the subject of the post.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12401
Topics: 75
Location: San Jose

PostPosted: Sat Jul 08, 2006 6:57 am    Post subject: Reply with quote

issac1029,

Try this
Code:

//STEP0100 EXEC  PGM=SORT     
//SORTOUT  DD SYSOUT=*       
//SYSOUT   DD SYSOUT=*       
//SORTIN   DD *               
1234                           
//SYSIN    DD *               
 SORT FIELDS=COPY                 
 OUTREC FIELDS=(4,1,   $ 4th byte
                3,1,   $ 3rd byte
                2,1,   $ 2nd byte
                1,1)   $ 1st byte   
/*                     


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
issac1029
Intermediate


Joined: 10 Dec 2005
Posts: 159
Topics: 75

PostPosted: Sat Jul 08, 2006 11:16 am    Post subject: Reply with quote

koluso,

NO,I want a whole row.maybe very long,to avoid a complcate code on sysin outrec,is there a option for revert?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Sat Jul 08, 2006 3:26 pm    Post subject: Reply with quote

There is no built-in option for reversing bytes.

How long a row length exactly?
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Sat Jul 08, 2006 4:36 pm    Post subject: Reply with quote

If the file is not too big and you can EDIT it, try the following Edit-Macro:
Code:
/* REXX */                                 
                                           
ADDRESS ISREDIT "MACRO PROCESS"             
                                           
ADDRESS ISREDIT "(LASTL) = LINENUM .ZLAST" 
                                           
DO I = 1  TO LASTL                         
  ADDRESS ISREDIT "(CURRL) = LINE &I"       
  NEWL = REVERSE(CURRL)   
  ADDRESS ISREDIT "LINE &I = (NEWL)"               
END I                                       
                                           
EXIT                                       


For bigger files, you can try the same method with EXECIO.

O.
________
[URL=http://www.ford-wiki.com/wiki/Ford_TH!NK]Ford TH!NK history[/URL]


Last edited by ofer71 on Sat Feb 05, 2011 11:37 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
issac1029
Intermediate


Joined: 10 Dec 2005
Posts: 159
Topics: 75

PostPosted: Tue Jul 11, 2006 4:36 am    Post subject: Reply with quote

Hi Frank,

I just mean I don't want my code affected by the length~

The rexx seems a good choice.


ofer71:
What do you mean by 'file is not too big'?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12401
Topics: 75
Location: San Jose

PostPosted: Tue Jul 11, 2006 4:43 am    Post subject: Reply with quote

issac1029,

COBOL has an Intrinsic function REVERSE which does what you are asking for.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Tue Jul 11, 2006 6:09 am    Post subject: Reply with quote

issac1029 -

It depends in you REGION settings.

O.
________
no2 vaporizer review
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group