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
 

 

Sorting to extract only the values and leave the spaces

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Sat Apr 19, 2008 11:07 am    Post subject: Sorting to extract only the values and leave the spaces
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

Site Director


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

PostPosted: Sat Apr 19, 2008 12:44 pm    Post subject:
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: 680
Location: NJ

PostPosted: Sat Apr 19, 2008 1:41 pm    Post subject: Reply to: Sorting to extract only the values and leave the s
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: 680
Location: NJ

PostPosted: Sat Apr 19, 2008 2:30 pm    Post subject:
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: 680
Location: NJ

PostPosted: Sat Apr 19, 2008 2:59 pm    Post subject:
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

Site Director


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

PostPosted: Sat Apr 19, 2008 5:00 pm    Post subject:
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 Moderator


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

PostPosted: Sat Apr 19, 2008 9:42 pm    Post subject:
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    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 Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts setting new limit Key values for inde... srilata83 DB2 1 Fri Feb 10, 2017 9:24 pm


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