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

How to convert Packed data to Display with common utilities


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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
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
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
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
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
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
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 Developer


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

PostPosted: Fri Dec 16, 2005 11:51 pm
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 Developer


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

PostPosted: Fri Dec 16, 2005 11:53 pm
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
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 Developer


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

PostPosted: Sat Dec 17, 2005 2:27 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top