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
 
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 Merging records, but not all the time prino DFSORT/ICETOOL 11 Sat Feb 17, 2018 4:20 pm
No new posts Need all records with high key kalidasvs SYNCSORT 14 Fri Feb 09, 2018 10:38 pm
No new posts Why is SORT rearranging records that ... cschablow DFSORT/ICETOOL 4 Wed Jan 24, 2018 10:14 pm
No new posts How to change the logon screen info o... sakthikumarT TSO/ISPF 4 Fri Dec 29, 2017 6:44 pm
No new posts Skip records depends on count lakshmiibmmainframes DFSORT/ICETOOL 5 Sun Dec 24, 2017 9:51 pm

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