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

Identifying tab in sort


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

Active User


Joined: 22 Dec 2005
Posts: 116

PostPosted: Tue Oct 28, 2008 2:08 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Oct 28, 2008 2:37 pm
Reply with quote

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
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Tue Oct 28, 2008 2:40 pm
Reply with quote

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
View user's profile Send private message
pjnithin

Active User


Joined: 22 Dec 2005
Posts: 116

PostPosted: Tue Oct 28, 2008 4:52 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Oct 28, 2008 5:10 pm
Reply with quote

what do You see vertically under the mysterious dots ???
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Tue Oct 28, 2008 5:16 pm
Reply with quote

enrico-sorichetti wrote:
what do You see vertically under the mysterious dots ???
Sounds like something to send towards Baker Street!
Back to top
View user's profile Send private message
pjnithin

Active User


Joined: 22 Dec 2005
Posts: 116

PostPosted: Tue Oct 28, 2008 7:44 pm
Reply with 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.
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: Tue Oct 28, 2008 7:47 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Tue Oct 28, 2008 8:01 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Tue Oct 28, 2008 8:52 pm
Reply with quote

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
View user's profile Send private message
pjnithin

Active User


Joined: 22 Dec 2005
Posts: 116

PostPosted: Wed Oct 29, 2008 11:38 am
Reply with quote

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
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 Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top