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

Sorting to extract only the values and leave the spaces


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

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Sat Apr 19, 2008 11:07 am
Reply with quote

Hi all,

I would like to extract only the values and leave the spaces. My i/p DS is below. Can any one get me the solution?

Code:
70308010                                 173067EB1CCMT 04-C2 A2                                         0410{26D
70308010                                 173067ED7CCMT 04-C2 A4                    å       å                0462C26D
70308010                                 173067EH8CCMT 04-C2 B                                          0483I26D
70308010                                 17309DAA1CGCMT2006-C4 A-1                —      çbb„             0572D26D
70308010                                 17309DAD5CGCMT2006-C4 A-3                 •&     •&              0572D26D
70308010                                 17309DAG8CGCMT2006-C4 A-J                Í      Í                0572D26D
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Apr 19, 2008 12:44 pm
Reply with quote

Hello,

Quote:
I would like to extract only the values and leave the spaces.
This needs a better explanation.

Which spaces - field by field or every individual space?

Looking at the data you posted, it appears that there are either packed or binary fields. If so, they will very likely contain an x'40' (space) as part of the numeric value (i.e. a 9(3) comp-3 value of +400 would be x'400c') which contains a space.

It will help if you post the desired output from that posted input.

Also post the recfm and lrecl of the input and output files.
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Sat Apr 19, 2008 1:41 pm
Reply with quote

Dick,

Thanks for your reply

Which spaces - field by field or every individual space?
Field by field.

There are some PD fields also. How do i sort that.



Also post the recfm and lrecl of the input and output files.
(RECFM=FB,LRECL=350,BLKSIZE=27650

According to my requirement i have extracted the field by field sorting and the problem now i have is i have some PD fields, I am not sure how to give the fields for that. Plz have a look into the below INRECT parm and advise me

Code:
INREC FIELDS=(1:1,8,                                 
              9:42,9,                               
              19:81,8,ZD,EDIT=(TTTT.TTT),           
              28:109,5,                             
              34:114,3,                             
              38:141,9,                             
              48:150,9,                             
                             58:166,7,               
                             66:173,7,               
                             74:180,7,               
                                            82:220,7,
                                            90:242,1)


without giving ZD,EDIT=(TTTT.TTT), it works but the PD fields are not extracted .. There are some speical chars in the output file!!! So how to i specify for this?
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Sat Apr 19, 2008 2:30 pm
Reply with quote

Hi,

I am having a field like below. How do i give the ZD parm??

Code:
 GL-ORIG-FACE     
 8/PS             
 (81-88)         
 15---------------
************ TOP O
        200000.000
        250000.000
           420.000
       2000000.000
        470000.000
       3000000.000
       3080000.000
        355000.000
       7750000.000
    2263536038.000


As it was said that the length is 8 but the value seems to be at the highest of 18 char. can anyone instruct me...
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Sat Apr 19, 2008 2:59 pm
Reply with quote

Hi all,

After lot of R& D , i tried and found the solution.

Quote:
INREC FIELDS=(1:1,8,
9:C' ',
10:42,9,
20:C' ',
21:81,8,PD,EDIT=(TTTTTTTTTTTT.TTT),
37:C' ',
38:109,5,ZD,EDIT=(T.TTT),
44:C' ',
45:114,3,
49:C' ',
50:141,9,ZD,EDIT=(T.TTTTTTTT),
60:C' ',
61:150,9,ZD,EDIT=(T.TTTTTTTT),
71:C' ',
72:166,7,PD,EDIT=(TTTTT.TT),
80:C' ',
81:173,7,PD,EDIT=(TTTTT.TT),
89:C' ',
90:180,7,PD,EDIT=(TTTTT.TT),
98:C' ',
99:220,7,
108:242,1)

This is the condition i use to extract the value from the i/p PS file.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Apr 19, 2008 5:00 pm
Reply with quote

Hello,

So, is your processing working as needed?

If yes, cool icon_cool.gif

If not, please let us know what needs to be worked on.
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 Apr 19, 2008 9:42 pm
Reply with quote

k.a.khamaurutheen,

I still can't figure out what you're trying to do. Your posts are quite confusing and seem to go in many directions.

You say you have PD fields - PD fields do not store the decimal point internally (the decimal point is implicit). You also show non-PD fields with decimal points (these are NOT ZD fields since ZD fields do not store the decimal point internally). You can use DFSORT's UFF or SFF formats to handle fields with explicit decimal points but I don't know what you want to do with these fields (or if you even have them in your input records).

You never really showed what your input records actually look like or what you expect for output, or explained the rules for getting from input to output.

If you have PD fields and want to display them with a decimal point, you can use p,m,PD,EDIT=(pattern). If you have ZD fields and want to display them with a decimal point, you can use p,m,ZD,EDIT=(pattern). I don't know what it is you want to do with the fields that already have a decimal point, if you have such fields, since they're already displayable.

If you still need help, you're going to have to do a much better job of explaining what your input fields look like and what you need for output.
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 Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
This topic is locked: you cannot edit posts or make replies. Automation need help in sorting the data DFSORT/ICETOOL 38
Search our Forums:

Back to Top