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.
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.
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.
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.
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.
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.
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.
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 (yaeger@us.ibm.com). Please put "DFSORT" somewere in your Subject line to catch my attention.
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.
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.