View previous topic :: View next topic
|
Author |
Message |
pjnithin
Active User
Joined: 22 Dec 2005 Posts: 116
|
|
|
|
I have a dataset which being created thru a program has some tab kind of field seperating after each valid field. How can thi be identified using sort. It appears like a dot when we open the dataset in browse mode as given below.
00213571.K00104625.0815304492287365 C.CR.20080713
And it appears as a space as given below in edit mode.
00213571 K00104625 0815304492287365 C CR 20080713
Though it appears as space we wont be able to edit that place, it always remains uneditable. Could anyone please let how these fields can be identified through sort or any rexx scripts. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
when browsing use "HEX ON" to find out the hex value of the thing
and the process accordingly
or review the specifications to get a fixed format output
untll Yo tell more about the requirement, very little can be said |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Try setting HEX ON and see what the tab looks like. You can then use this hex value in DFSORT or in REXX.
Garry |
|
Back to top |
|
|
pjnithin
Active User
Joined: 22 Dec 2005 Posts: 116
|
|
|
|
I actually don;t know how to get that hex value.
when i do a hex on I get like this below.
Code: |
00213571.K00104625.0815304492287365 C.CR.20080713
FFFFFFFF0DFFFFFFFF0FFFFFFFFFFFFFFFF4444444444C0CD0FFFFFFFF44444444444444
002135715200104625508153044922873650000000000353952008071300000000000000
|
What could be the hex value that can be used.
edited to add the code tags.... |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
what do You see vertically under the mysterious dots ??? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
enrico-sorichetti wrote: |
what do You see vertically under the mysterious dots ??? |
Sounds like something to send towards Baker Street! |
|
Back to top |
|
|
pjnithin
Active User
Joined: 22 Dec 2005 Posts: 116
|
|
|
|
so if i want to copy all those records having dots at position 9 what include cond needs to be used. Right now i tried using :
INCLUDE COND=(14,1,CH,EQ,X'0') - this abended.
Then I used INCLUDE COND=(14,1,CH,EQ,X'F0'), which didn't copy records as expected. Any idea whats going wrong here. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
What you have is a "tab-delimited" file. If the delimiters are "fixed" (always at the same positons in the data), you could simply look for an x'05' at those positions.
If you were using cobol, you could use an UNSTRING delimited by x'05' to separate the fields into the target fields.
If you post what you need to do with the data, we may be able to offer better sugestions. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
so if i want to copy all those records having dots at position 9 what include cond needs to be used. Right now i tried using :
INCLUDE COND=(14,1,CH,EQ,X'0') - this abended.
Then I used INCLUDE COND=(14,1,CH,EQ,X'F0'), which didn't copy records as expected. Any idea whats going wrong here. |
9? 14? You're saying one thing but trying something else -- and neither what you're saying nor what you're trying matches the data values you provided. Did you notice that you need to compare against X'05' to find the tab characters? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
so if i want to copy all those records having dots at position 9 what include cond needs to be used. |
If your input file has RECFM=FB, the INCLUDE statement is:
Code: |
INCLUDE COND=(9,1,BI,EQ,X'05')
|
If your input file has RECFM=VB, the INCLUDE statement is:
Code: |
INCLUDE COND=(13,1,BI,EQ,X'05')
|
13 = 4 (for RDW) + 9
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Use [URL] BBCode for External Links |
|
Back to top |
|
|
pjnithin
Active User
Joined: 22 Dec 2005 Posts: 116
|
|
|
|
Thanks a lot to all you guys. I know I was asking some silly questions, didn;t had a clear idea how to handle hex values. Once again thanks to all your help; it's working now. |
|
Back to top |
|
|
|