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 

Write Displayable Data using Sort

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


Joined: 25 May 2005
Posts: 59
Topics: 20

PostPosted: Mon Mar 26, 2007 10:29 am    Post subject: Write Displayable Data using Sort Reply with quote

Hi Guys,
I've a small problem and hope you can help me.

I have a file with Fixed numbers and would like to read it and rewrite in a more readable form.

My file is composed by 3 number:

FIELD1: FIXED ( 11) - a number
FIELD2: FIXED ( 3) - a number
FIELD3: FIXED(9) - a date formatted DDMMYYYY in a number

I would like to read the file and rewrite it more "readble" with numbers as picture and maybe a date as a character reformatted as YYYYMMDD (I'm sorry, I hope you understand what I mean).

For example here's the hexadecimal of my record:

Code:
1000630008098
00009C1C0119C


I would like to obtain:

Code:
10000000693 010 19980810


I hope my example is clear, sorry and thanks a lot for any help!

Wish you a good one!
_________________
Maxisnowhere
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


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

PostPosted: Mon Mar 26, 2007 10:50 am    Post subject: Reply with quote

Here's a DFSORT job that will do what you asked for. I assumed your input file has RECFM=FB and LRECL=80, but the job can be changed appropriately for other attributes.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/80)
//SORTOUT DD DSN=...  output file (FB/80)
//SYSIN    DD    *
  OPTION COPY
  INREC IFOUTLEN=80,
    IFTHEN=(WHEN=INIT,OVERLAY=(81:9,5,PD,M11,LENGTH=8)),
    IFTHEN=(WHEN=INIT,
      BUILD=(1,6,PD,M11,LENGTH=11,X,
        7,2,PD,M11,LENGTH=3,X,
        85,4,83,2,81,2))
/*

_________________
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
maxisnowhere
Beginner


Joined: 25 May 2005
Posts: 59
Topics: 20

PostPosted: Tue Mar 27, 2007 5:20 am    Post subject: Reply with quote

Ciao Frank!
Thank's a lot!!
It function vbery well!!

Have a good one!
_________________
Maxisnowhere
Back to top
View user's profile Send private message
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