MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Reformat Binary fields using sort

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
C D' Rozario
Beginner


Joined: 16 Dec 2002
Posts: 5
Topics: 1
Location: San Francisco

PostPosted: Tue Sep 28, 2004 1:03 am    Post subject: Reformat Binary fields using sort Reply with quote

Hi,

I tried reformatting 6 bytes of signed binary to display format using the sort card given below

OUTREC FIELDS=(1,6,FI,EDIT=(STTTTTTTTTTT),SIGNS=(' ','-',,)

It throws me a reformatting error. But the same sort card works for 4 byte binary fields and less. Any work-arounds ?!!?
Im using DFSORT.

Thanks, Craig
Back to top
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Tue Sep 28, 2004 5:27 am    Post subject: Reply with quote

craig,

BI/Fi fields can only be in 2,4,8 bytes. For equivalent DFSORT formats for various COBOL data types, see the "What are the equivalent DFSORT formats for various COBOL data types?" Ask Professor Sort item at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/professor_sort/


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue Sep 28, 2004 10:02 am    Post subject: Reply with quote

You can edit BI and FI fields of 1-4 bytes. You can't directly edit BI and FI fields greater than 4 bytes.

You could use this trick to edit a 6-byte BI field:

Code:

 OUTREC FIELDS=((1,2,BI,MUL,+4294967296),ADD,3,4,BI,
   EDIT=(STTTTTTTTTTT),SIGNS=(' ','-',,))


But I can't think of a trick that will work with 6-byte FI fields - treating the first 2 bytes and last 4 bytes as separate FI fields won't work because of the way negative numbers are stored for FI.

Maybe there's a "mathematician" out there who can come up with a trick for 6-byte FI fields.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
C D' Rozario
Beginner


Joined: 16 Dec 2002
Posts: 5
Topics: 1
Location: San Francisco

PostPosted: Tue Sep 28, 2004 12:14 pm    Post subject: Reply with quote

You guys are doing an awesome job. And thatz a cool trick, Frank !

Thanks, Craig
Back to top
View user's profile Send private message Yahoo Messenger
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue Dec 21, 2004 2:21 pm    Post subject: Reply with quote

With z/OS DFSORT V1R5 PTF UQ95214 or DFSORT R14 PTF UQ95213 (Dec, 2004), you can now use up to 8 bytes for FI fields in INREC, OUTREC and OUTFIL, so

Code:

  OUTREC FIELDS=(1,6,FI,EDIT=(STTTTTTTTTTT),SIGNS=(' ','-',,) 


will work just fine. This is part of the new larger fields and constants support provided by these PTFs. For complete details on all of the new functions available with these PTFs, see:

www.ibm.com/servers/storage/support/software/sort/mvs/pdug/
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
C D' Rozario
Beginner


Joined: 16 Dec 2002
Posts: 5
Topics: 1
Location: San Francisco

PostPosted: Tue Dec 21, 2004 5:00 pm    Post subject: Reply with quote

Ooops ! Thatz just terrific !
I just cant stop wondering how you keep track of old posts and provide them with most recent updates !

Hats off to you my friend.

And thats a pretty cool feature, as you dont have to worry about the binary length upto 8 bytes.

Thanks for the update,
Craig
Back to top
View user's profile Send private message Yahoo Messenger
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue Dec 21, 2004 5:37 pm    Post subject: Reply with quote

Craig,

Thanks for the words of encouragement.

Quote:
I just cant stop wondering how you keep track of old posts and provide them with most recent updates !


Just that. I keep track of posts for things DFSORT and ICETOOL can't do yet. Helps me determine what to put into DFSORT/ICETOOL and lets me refer back to the posts once I teach DFSORT/ICETOOL how to do it. Smile
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group