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
 

 

How to convert Packed data to Display with common utilities

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

New User


Joined: 03 Nov 2005
Posts: 17

PostPosted: Fri Dec 09, 2005 9:22 pm    Post subject: How to convert Packed data to Display with common utilities
Reply with quote

I have an input dataset which has some packed data. I have the layout. I need to put this to another dataset such that all the packed fields are converted to Display format.

I can do it by writing a simple COBOL program - but I was trying to find ways where it can be done simply by using a job and some utility like FILEAID, SYNCSORT etc.

Anybody have an idea?

Thanx
Back to top
View user's profile Send private message

DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Sat Dec 10, 2005 3:18 am    Post subject:
Reply with quote

MainB,

Using SYNCSORT:

Input Dataset:

BROWSE SEQ.INREC
Command ===>
********************************* Top of


---------------------------------------
...(c?......r@
0124890020009744444444444444444444444444
003D3C02F0099C00000000000000000000000000
---------------------------------------
******************************** Bottom

Using
Code:

 OUTREC FIELDS=(1,4,PD,EDIT=(SIIIIIIT),SIGNS(' ','-'),       
                5,2,PD,EDIT=(SIIT),SIGNS('+','-'),           
                7,3,PD,EDIT=(SIIIIT),SIGNS(' ','-'),         
                10,5,PD,EDIT=(III,IIT.TTS),SIGNS(' ','-'))   
 SORT FIELDS=COPY                                                                                     


returns

Output Dataset:

BROWSE SEQ.SORTOUT
Command ===>
********************************* Top of


---------------------------------------
-10234+839 22 99.97 ...........
446FFFFF4FFF4444FF44444FF4FF400000000000
00010234E8390000220000099B97000000000000
---------------------------------------
******************************** Bottom
Back to top
View user's profile Send private message
MainB

New User


Joined: 03 Nov 2005
Posts: 17

PostPosted: Tue Dec 13, 2005 11:13 pm    Post subject: Re: How to convert Packed data to Display with common utilit
Reply with quote

Thanks for the POST. Cna you please elaborate on the parameters used for SORT. - 1,4,PD,EDIT=(SIIIIIIT),SIGNS(' ','-'),

From Location 1 thru 4 pick PD (packed data) and edit as ....???????
What does SIII.. T stands for and
how many I's are needed and
why S in front and a T at the end etc...
What if I donot want to show a Sign - I know all are positive so - no blank needs to be on the output file in the place of sign.

Thanks
Back to top
View user's profile Send private message
MainB

New User


Joined: 03 Nov 2005
Posts: 17

PostPosted: Wed Dec 14, 2005 2:17 am    Post subject:
Reply with quote

Also in my case I have an input record where col 1 thru 30 is display data 30 thru ?? is packed and then display thereafter. How will the sort card look like for this type of input record.

The data on 30 is PIC S9(15) COMP-3.

Thanks
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Thu Dec 15, 2005 4:35 am    Post subject: Re: How to convert Packed data to Display with common utilit
Reply with quote

MainB,

Sorry it took so long to get back with you. Work got in the way. icon_confused.gif

Editing char.
I = insignificant leading digits (Like the Z in PIC ZZZZZZ9).
T = significant digits (Like the 9 in PIC ZZZZZZ9)
S = location of the sign
SIGN=(S1,S2,S3,S4)
S1 = Leading positive sign indicator
S2 = Leading negative sign indicator
S3 = Trailing positive sign indicator
S4 = Trailing negative sign indicator

If you leave the sign Char off, there should be no space used for it.



OUTREC FIELDS=(1,30,BI,
31,4,PD,EDIT=(SIIIIIIT),SIGNS(' ','-'),
35,2,PD,EDIT=(SIIT),SIGNS('+','-'),
37,3,PD,EDIT=(SIIIIT),SIGNS(' ','-'),
40,5,PD,EDIT=(III,IIT.TTS),SIGNS(' ','-'),
45,50,BI)
SORT FIELDS=COPY
This should (I didn?t test this) move the first 30 bytes, unchanged,
And bytes 45 through 94 unchanged.

Your input record is 94 bytes long, but your output record, in this case will be, if my math is correct 109 bytes long due to the COMP-3 conversion to display.
Back to top
View user's profile Send private message
MainB

New User


Joined: 03 Nov 2005
Posts: 17

PostPosted: Fri Dec 16, 2005 5:13 am    Post subject:
Reply with quote

Thanks a lot,

I kind of figured that out and was able to do the conversion correctly.
But was not sure of what each EDIT letter really meant. Now I can use it more intelligently.

Do you know of some online manual for SYNCSORT?

Thanks a Lot again.
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Fri Dec 16, 2005 9:42 pm    Post subject:
Reply with quote

MainB,

No I don't icon_sad.gif

I have aquired a CD with a Syncsort PDF that I use. I don't even have a CD drive on my work PC so I had to have someone else copy it to a LAN drive for me.

I don't understand why SYNCSORT doesn't have this published on thier web site. It sure would help a lot of people.

Sorry,,,
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Fri Dec 16, 2005 11:31 pm    Post subject:
Reply with quote

MainB,

check this link out, its in the VSAM & DFSORT Forum

http://www.ibmmainframes.com/viewtopic.php?t=1348 Posted by Frank Yaeger

I used to use the DFSORT manual for SYNCSORT all the time. Pertty much the same product, different companies.

Thanks Frank
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: Fri Dec 16, 2005 11:51 pm    Post subject:
Reply with quote

Quote:
Pertty much the same product, different companies.


Not true at all. The products are similar, but have significant differences as well. DFSORT and DFSORT's ICETOOL have many features not found in Syncsort (e.g. IFTHEN, OVERLAY, UFF, SFF, larger numbers, KEEPBASE, etc) . If you try to use the DFSORT books for Syncsort, you'll be in for many surprises. That's why you often see threads where I give a solution that works fine with DFSORT or DFSORT's ICETOOL, and the poster comes back and says it didn't work and shows the WER messages that indicate they're using Syncsort, not DFSORT.
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: Fri Dec 16, 2005 11:53 pm    Post subject:
Reply with quote

BTW, if you or anyone else on this board would like some documents prepared by the DFSORT Team that describe what we see as the advantages of DFSORT over Syncsort, as well as considersations for migrating from Syncsort to DFSORT, send me an e-mail offline (yaeger@us.ibm.com). Please put "DFSORT" somewere in your Subject line to catch my attention.
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Sat Dec 17, 2005 2:01 am    Post subject: Re: How to convert Packed data to Display with common utilit
Reply with quote

Frank,

Thanks for setting us straight about DFSORT vs. SYNCSORT. I can see from your e-mail address where that would be a sensitive subject. I guess we use pretty straight forward functionality that both support. Sorry for misleading that these are the same products. I hope there won?t be any long term resentment.
icon_redface.gif
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 Dec 17, 2005 2:27 am    Post subject:
Reply with quote

David,

No resentment whatsoever. As stated in my signature line, I work on DFSORT, so obviously I'm not objective on this subject. icon_smile.gif What you said is a common misconception of people who've only scratched the surface of DFSORT, who haven't worked on both products, or haven't done so for a long time. I'm happy to have a chance to provide information to those people and others who are interested.
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 Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts DB2 utilities, contention or failure? sheersh DB2 2 Fri Apr 21, 2017 6:18 pm


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