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
 
Generate a Sequence Number and its Reverse

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
kleo32

New User


Joined: 30 Jan 2007
Posts: 1
Location: London

PostPosted: Tue Jan 30, 2007 3:47 pm    Post subject: Generate a Sequence Number and its Reverse
Reply with quote

Hi All,

I need to generate a file (FB/LRECL=16) wherein I need a sequence number and its reverse, each of 8 bytes. The file should look something like this

0000000110000000
0000000220000000
.
.
0000123443210000

I can generate the sequence number using the SEQNUM, however is there any function to reverse it.

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

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Jan 30, 2007 3:52 pm    Post subject:
Reply with quote

I would think that if you generated the sequence during input you could reformat each byte backwards during output. Easily done with sort.
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 Jan 30, 2007 10:00 pm    Post subject:
Reply with quote

This DFSORT job will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN                                   
//SYSOUT    DD  SYSOUT=*                                   
//SORTIN DD DSN=...  input file                                       
//SORTOUT DD DSN=...  output file                                     
//SYSIN    DD    *                                         
  OPTION COPY                                             
  INREC IFTHEN=(WHEN=INIT,BUILD=(SEQNUM,8,ZD)),           
        IFTHEN=(WHEN=INIT,                                 
           BUILD=(1,8,9:8,1,7,1,6,1,5,1,4,1,3,1,2,1,1,1)) 
/*
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 Increment number for every group of r... srajendran2 DFSORT/ICETOOL 7 Thu Nov 09, 2017 10:31 pm
No new posts Generate public-private key in batch ... vasanthz All Other Mainframe Topics 6 Fri Sep 15, 2017 9:20 am
No new posts Profile changed to NUMBER ON STD (fro... Martylin TSO/ISPF 1 Thu Aug 03, 2017 9:14 am
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 SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm

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