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 Question about dataset sequence numbe... harisukumaran JCL & VSAM 23 Tue May 29, 2018 9:31 am
No new posts INVALID RECFM FOR DDNAME SYSLIN AND C... sandeep kumar302 All Other Mainframe Topics 7 Fri Apr 27, 2018 6:07 pm
No new posts Repeat Sequence Number Until change i... rahulabvp DFSORT/ICETOOL 6 Thu Mar 29, 2018 12:51 pm
No new posts Detect break in the sequence tuxama DFSORT/ICETOOL 6 Tue Mar 20, 2018 1:35 pm
No new posts How to Generate JCL using Sort naveen katkuri DFSORT/ICETOOL 7 Tue Mar 13, 2018 3:50 pm

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