|
View previous topic :: View next topic
|
| Author |
Message |
MainB
New User
Joined: 03 Nov 2005 Posts: 17
|
|
|
|
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 |
|
 |
DavidatK
Active Member

Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
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 |
|
 |
MainB
New User
Joined: 03 Nov 2005 Posts: 17
|
|
|
|
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 |
|
 |
MainB
New User
Joined: 03 Nov 2005 Posts: 17
|
|
|
|
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 |
|
 |
DavidatK
Active Member

Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
MainB,
Sorry it took so long to get back with you. Work got in the way.
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 |
|
 |
MainB
New User
Joined: 03 Nov 2005 Posts: 17
|
|
|
|
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 |
|
 |
DavidatK
Active Member

Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
MainB,
No I don't
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 |
|
 |
DavidatK
Active Member

Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
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 |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
| 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 |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
| 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 ([email protected]). Please put "DFSORT" somewere in your Subject line to catch my attention. |
|
| Back to top |
|
 |
DavidatK
Active Member

Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
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.
 |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
David,
No resentment whatsoever. As stated in my signature line, I work on DFSORT, so obviously I'm not objective on this subject. 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 |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|