|
View previous topic :: View next topic
|
| Author |
Message |
r2k1984
New User
.jpg)
Joined: 21 Jun 2005 Posts: 69 Location: chennai
|
|
|
|
Hi,
My mainframe shop is having SYNCSORT and I'm having the following requirement.
1. Convert all the packed decimals in the file to zone decimals.
2. Input file is VB of 1000 record lenght.
3. In 210,225,245,235,255 lenght there are few packed decimals. But only for few records , details will be available after 210.
4. So when ever I try to convert the record after 210, the records for which no details are available it is not converting since the values for the fields short records are null.
Due to that I'm getting short record error.
Below is the JCL I was trying t use.
| Code: |
//STEP1 EXEC PGM=SORT,PARM='VLTESTI=2'
//SORTIN DD DSN=TEST.CS9.TAPEMIGR.F3A,DISP=SHR
//SORTOUT DD DSN=TEST.CS9.TAPEMIGR.F3B,DISP=SHR
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSIN DD *
INCLUDE COND=((205,1,CH,NE,C' '),AND,(229,1,CH,NE,C' '))
SORT FIELDS=COPY
OUTREC FIELDS=(1,4,5,110,
115,6,PD,EDIT=(TTTTTTTTT.TT),
121,6,PD,EDIT=(TTTTTTTTT.TT),
127,6,PD,EDIT=(TTTTTTTTT.TT),
133,6,PD,EDIT=(TTTTTTTTT.TT),
139,6,PD,EDIT=(TTTTTTTTT.TT),
145,6,PD,EDIT=(TTTTTTTTT.TT),
151,6,PD,EDIT=(TTTTTTTTT.TT),
157,6,PD,EDIT=(TTTTTTTTT.TT),
163,37,
201,2,PD,EDIT=(TTT),
203,2,PD,EDIT=(TTT),
205,12,
217,6,PD,EDIT=(TTTTTTTTT.TT),
223,6,PD,EDIT=(TTTTTTTTT.TT),
229,12,1000:X)
//* 241,6,PD,EDIT=(TTTTTTTTT.TT),
//* 247,6,PD,EDIT=(TTTTTTTTT.TT),1000:X)
/* |
In which fields after 217 is having short records issue. Since most of the records are not having records greater than 210. Please help me on how to solve this issue |
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
If you have different record-types on the file, test the field which differentiates them and only attempt conversion of the fields on that record-type.
If you have occurs, with different numbers of entries, then test the count of the number of entries.
If you have both, do both.
If you have none of the above 1) you should 2) you could try to use the record-length.
EDIT: Are those decimal-points you are putting in most of the fields? That makes your field Numeric Edited not Zoned Decimal. Is that what you want? |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Surely not what you are looking for, but why does someone believe it is a good idea to change the data from packed to zoned? This will waste space as well as require more resources to process.
If some data needs to be downloaded to a pc for example, that data could be formatted to be pc-friendly without making a mess of the entire data file. |
|
| Back to top |
|
 |
r2k1984
New User
.jpg)
Joined: 21 Jun 2005 Posts: 69 Location: chennai
|
|
|
|
We are migrating data from one platform to another platform.So we need to migarate history data also.
So at any cost we need to do this. |
|
| Back to top |
|
 |
Akatsukami
Global Moderator

Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
| r2k1984 wrote: |
We are migrating data from one platform to another platform.So we need to migarate history data also.
So at any cost we need to do this. |
The implication being that you are migrating off the mainframe to a programmable calculator enviroment? |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
| Quote: |
| We are migrating data from one platform to another platform.So we need to migarate history data also. |
Yup, bringing the history info would be a good thing. . .
Depending on the target platform, you may be ahead if the values are sent "edited" - including the sign and the decimal point, etc.
As to your actual question - please look at this topic and see if it will help:
ibmmainframes.com/viewtopic.php?t=49812&highlight=vlshrt |
|
| Back to top |
|
 |
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
| There is nothing an auditor whould like more then going back to history info and not being able to tell debits from credits. |
|
| Back to top |
|
 |
r2k1984
New User
.jpg)
Joined: 21 Jun 2005 Posts: 69 Location: chennai
|
|
|
|
Thanks for all your inputs .
I tried with VLTESTI=2 and 1 and also added VLSHRT. Job abends if I'm removing the include condition .
If I add the include condition ,job is working fine. I have a big occurs field and there can be random records for the fields.
Please provide inputs.
Below is the JCL I was using with include condition.
| Code: |
//STEP1 EXEC PGM=SORT,PARM='VLTESTI=1'
//SORTIN DD DSN=TEST.CS9.TAPEMIGR.F3A,DISP=SHR
//SORTOUT DD DSN=TEST.CS9.TAPEMIGR.F3B,DISP=SHR
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY,VLSHRT
INCLUDE COND=((205,1,CH,NE,C' '),AND,(229,1,CH,NE,C' '))
SORT FIELDS=COPY
OUTREC FIELDS=(1,4,5,110,
115,6,PD,EDIT=(TTTTTTTTT.TT),
121,6,PD,EDIT=(TTTTTTTTT.TT),
127,6,PD,EDIT=(TTTTTTTTT.TT),
133,6,PD,EDIT=(TTTTTTTTT.TT),
139,6,PD,EDIT=(TTTTTTTTT.TT),
145,6,PD,EDIT=(TTTTTTTTT.TT),
151,6,PD,EDIT=(TTTTTTTTT.TT),
157,6,PD,EDIT=(TTTTTTTTT.TT),
163,37,
201,2,PD,EDIT=(TTT),
203,2,PD,EDIT=(TTT),
205,12,
217,6,PD,EDIT=(TTTTTTTTT.TT),
223,6,PD,EDIT=(TTTTTTTTT.TT),
229,12,1000:X),CONVERT |
Below is the error message , I'm getting if I dont use include condition.
| Code: |
OPTION COPY,VLSHRT
SORT FIELDS=COPY
OUTREC FIELDS=(1,4,5,110,
115,6,PD,EDIT=(TTTTTTTTT.TT),
121,6,PD,EDIT=(TTTTTTTTT.TT),
127,6,PD,EDIT=(TTTTTTTTT.TT),
133,6,PD,EDIT=(TTTTTTTTT.TT),
139,6,PD,EDIT=(TTTTTTTTT.TT),
145,6,PD,EDIT=(TTTTTTTTT.TT),
151,6,PD,EDIT=(TTTTTTTTT.TT),
157,6,PD,EDIT=(TTTTTTTTT.TT),
163,37,
201,2,PD,EDIT=(TTT),
203,2,PD,EDIT=(TTT),
205,12,
217,6,PD,EDIT=(TTTTTTTTT.TT),
223,6,PD,EDIT=(TTTTTTTTT.TT),
229,12,1000:X),CONVERT
WER901I **WARNING** SYNCSORT 1.3.2.2 WILL EXPIRE IN 32 DAYS
WER276B SYSDIAG= 94277, 632830, 632830, 1943100
WER164B 8,876K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 2,309,064 BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=VB ; LRECL= 1004; BLKSIZE= 27998
WER237I OUTREC RECORD LENGTH = 1000
WER110I SORTOUT : RECFM=FB ; LRECL= 1004; BLKSIZE= 27108
WER462I OUTPUT LRECL DIFFERS FROM SORTOUT LRECL
WER410B 7,848K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B 0 BYTES RESERVE REQUESTED, 2,161,608 BYTES USED
WER244A OUTREC - SHORT RECORD
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE |
|
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
I agree about the signs. Unless the there is something, external to the amount field which tells you with absolute certainty what is what, I can't see how you can go without them.
'd have done this in Cobol. Checking everything I can for logical consistency, a big report, printed cross-reference, cross-reference file... headers and trailers on everything.
Going out with a SORT doing a blind field conversion seems to be going out with a whimper, instead of a BANG! Have the users saying "that old system, it only had green screens, but boy that history report never lets us down".
Not my call, though, is it? |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
You might try:
OPTION VLSHRT
SORT FIELDS=COPY
instead of:
OPTION COPY,VLSHRT
SORT FIELDS=COPY
for the run without the INCLUDE. Untested, but may be worth a shot. . . |
|
| Back to top |
|
 |
r2k1984
New User
.jpg)
Joined: 21 Jun 2005 Posts: 69 Location: chennai
|
|
|
|
Thanks Dick for the inputs.
I tried both the options .Both are not working.
Any other ideas? |
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
In general the VLSHRT sort of stuff is going to affect SORT fields, INCLUDE/OMIT fields and SUM fields, I believe.
Consult the documentation to verify if there is some way to use it for this purpose.
Also check on the output lrecl message you are getting. |
|
| Back to top |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
you could change your include to something like this this
| Code: |
INCLUDE COND=(1,2,BI,GE,+240,&,
205,1,CH,EQ,C' ',&,229,1,CH,EQ,C' ')
|
Gerry |
|
| Back to top |
|
 |
r2k1984
New User
.jpg)
Joined: 21 Jun 2005 Posts: 69 Location: chennai
|
|
|
|
Issue with Short record is solved but I didnt get any reocrds in output.
Could you please explain the condition? |
|
| Back to top |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
it's selecting records longer or equal to 240 bytes
sorry it should be
| Code: |
INCLUDE COND=(1,2,BI,GE,+240,&,
205,1,CH,NE,C' ',&,229,1,CH,NE,C' ') |
Gerry |
|
| Back to top |
|
 |
r2k1984
New User
.jpg)
Joined: 21 Jun 2005 Posts: 69 Location: chennai
|
|
|
|
| I tried it. Now job is not getting abended and no records are found in output. |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you hex-dump a few blocks of data and make sure your displacements are correct. . .
Possibly there are no records that meet the first part of the INCLUDE? |
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Is this a file with variable-length records but only one type of record?
If so, somewhere there must be a count of the number of occurences.
You'd have to do all your static fields, then do some test to know how many of the coversions to do for the variable fields.
If you proceed with what you have now (setting aside for the moment the fact that it does not work) won't you only be changing the long records, and leaving all the others with their original packed data? |
|
| Back to top |
|
 |
kratos86
Active User

Joined: 17 Mar 2008 Posts: 148 Location: Anna NGR
|
|
|
|
| Try using VLFILL parameter, which i believe would help in your case. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|