IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Change Squeezed records to ordered one


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
prabs2006

Active User


Joined: 12 Jan 2006
Posts: 103

PostPosted: Fri Jun 08, 2007 12:16 pm
Reply with quote

Hi,

I have a file with records like below

Code:
123 456 789
1234 7628 23
1 23 4567


The O/P should be something like below

Code:
123   456  789
1234  7628 23
1     23   4567

Basically it should be segrgated in an ordered layout.

Thanks & Regards
Prabs
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Fri Jun 08, 2007 3:53 pm
Reply with quote

How will you know what the longest field length is?
Back to top
View user's profile Send private message
prabs2006

Active User


Joined: 12 Jan 2006
Posts: 103

PostPosted: Fri Jun 08, 2007 4:31 pm
Reply with quote

Hi,

The max length it can take is 9(9).9(2).

Can it be done?

Prabs
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Fri Jun 08, 2007 5:00 pm
Reply with quote

prabs2006 wrote:
The max length it can take is 9(9).9(2).
Which?
Code:
+..........++..........++..........+
123         456         789
1234        7628        23
1           23          4567
or
Code:
+..........++..........++..........+
         123         456         789
        1234        7628          23
           1          23        4567
or
Code:
+..........++..........++..........+
1.23        4.56        7.89
12.34       76.28       .23
.01         .23         45.67
or
Code:
+..........++..........++..........+
        1.23        4.56        7.89
       12.34       76.28         .23
         .01         .23       45.67
Back to top
View user's profile Send private message
prabs2006

Active User


Joined: 12 Jan 2006
Posts: 103

PostPosted: Fri Jun 08, 2007 5:32 pm
Reply with quote

Hi William,

The last one

Prabs
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Fri Jun 08, 2007 5:43 pm
Reply with quote

prabs2006 wrote:
The max length it can take is 9(9).9(2).
So you want to convert from this:
Code:
123 456 789
1234 7628 23
1 23 4567
to this:
Code:
+..........++..........++..........+
        1.23        4.56        7.89
       12.34       76.28         .23
         .01         .23       45.67
Have you looked at a sort manual, sort has some very interesting functions that might be able to do this....
Back to top
View user's profile Send private message
prabs2006

Active User


Joined: 12 Jan 2006
Posts: 103

PostPosted: Fri Jun 08, 2007 5:54 pm
Reply with quote

Hi,

The input should be replicated in the output. The inputs should not be tampered.

If the input is 123 the output should also be 123 aligned with other recs.
If the input is 1.23 the output should be 1.23 aligned with other recs.

I would say the second option (and not the last one) in your last reply

I aplogize I didnt make you clear in the last reply only.

Prabs
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sat Jun 09, 2007 8:56 pm
Reply with quote

Prabs,

Here's a DFSORT job that will do what you asked for. You'll need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) in order to use DFSORT's PARSE function. If you don't have the April, 2006 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTF, see:

Use [URL] BBCode for External Links

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN    DD    *
  OPTION COPY
  INREC PARSE=(%01=(ENDBEFR=BLANKS,FIXLEN=11),
               %02=(ENDBEFR=BLANKS,FIXLEN=11),
               %03=(FIXLEN=11)),
  BUILD=(%01,%02,%03)
/*
Back to top
View user's profile Send private message
prabs2006

Active User


Joined: 12 Jan 2006
Posts: 103

PostPosted: Mon Jun 11, 2007 8:25 am
Reply with quote

Frank,

Thanks a lot.

Prabs
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
Search our Forums:

Back to Top