Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Change Squeezed records to ordered one

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Change Squeezed records to ordered one
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: 3158
Location: Tucson AZ

PostPosted: Fri Jun 08, 2007 3:53 pm    Post subject:
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    Post subject: Re: Change Squeezed records to ordered one
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: 3158
Location: Tucson AZ

PostPosted: Fri Jun 08, 2007 5:00 pm    Post subject: Re: Change Squeezed records to ordered one
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Fri Jun 08, 2007 5:43 pm    Post subject: Re: Change Squeezed records to ordered one
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    Post subject:
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 Moderator


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

PostPosted: Sat Jun 09, 2007 8:56 pm    Post subject:
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:

www.ibm.com/servers/storage/support/software/sort/mvs/peug/

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    Post subject:
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    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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us