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
 

 

expand a binary field from half word to full using syncsort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
raja1128

New User


Joined: 09 Jan 2007
Posts: 17
Location: india

PostPosted: Fri Jan 23, 2009 4:49 am    Post subject: expand a binary field from half word to full using syncsort
Reply with quote

hi all,

I need to expand a file by two bytes.
here are the details...

file is fixed block with length 36.
fileld type is PIC S9(04) COMP
field starts at byte 21.

I have to make the field to PIC S9(08) COMP and retain the value.

kindly give me the sort card for this...and manual too

thanks in advance..
Back to top
View user's profile Send private message

raja1128

New User


Joined: 09 Jan 2007
Posts: 17
Location: india

PostPosted: Sat Jan 24, 2009 1:12 am    Post subject:
Reply with quote

is there a way with DFSORT for the same??


thanks...
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 Jan 24, 2009 2:00 am    Post subject:
Reply with quote

Your Subject says "using Syncsort" so why are you asking for a DFSORT solution? Which product are you using.

PIC S9(04) is a 2-byte value. PIC S9(08) is a 4-byte value. If the values are unsigned (e.g. X'FFFF' = 65535), then you'd just need to insert X'0000' on the left. If the values are signed (e.g. X'FFFF' = -1), then you'd have to insert X'0000' on the left for positive values or X'FFFF' on the left for negative values. So you need to indicate whether the values are unsigned or signed.

Either way, you need to insert 2 bytes, so you can either overlay the two bytes after the field, or move the bytes after the field to the right. Which do you want to do?

In the simplest case, if the values are unsigned and you just want to insert X'0000' before the field and increase the record length, you can use these DFSORT control statements:

Code:

   OPTION COPY
   INREC BUILD=(1,20,2X'00',21,16)


The DFSORT books are available at:

www.ibm.com/systems/support/storage/software/sort/mvs/srtmpub.html

But if you're using Syncsort, you'll need to get the books from Syncsort.
Back to top
View user's profile Send private message
raja1128

New User


Joined: 09 Jan 2007
Posts: 17
Location: india

PostPosted: Sat Jan 24, 2009 3:56 am    Post subject:
Reply with quote

thanks frank...

I figured it out. it is a positive field and inserted x'0000' (low values) on the left. actually inserting 2Z ( binary zeoes ) also does the same.
I have both syncsort and dfsort and am using syncsort.

here is the card i used...

SORT FIELDS=COPY
OUTFIL FILES=01,
OUTREC FIELDS=(1,20,X'0000',21,16)

thansk again...have a nice weekend.
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 Jan 24, 2009 4:59 am    Post subject:
Reply with quote

Quote:
I figured it out.


Hmmm ... seems like I figured it out. icon_wink.gif

2Z, 2X'00' and X'0000' are all equivalent. Your choice.

You could use INREC, OUTREC or OUTFIL for this. Your choice.

In the future, since you have both products, please indicate which one you want the solution for and post in the appropriate Forum accordingly.
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 -> JCL & VSAM 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 SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts 2 byte YEAR from Y'DATE2' field tecnokrat DFSORT/ICETOOL 2 Tue Feb 07, 2017 12:05 pm


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