|
View previous topic :: View next topic
|
| Author |
Message |
migusd
New User
Joined: 08 Aug 2014 Posts: 44 Location: USA
|
|
|
|
Hi guys,
Need your assistance with a issue that I have.
I am trying to use EDIT, FTOV & Dictionary items in the same sort, but struggling to put it to work.
I am selecting a couple of fields from the input file.
The first field is 255 bytes long, that I am trying to convert to variable.
The second field is numeric packed. Trying to converted to zone.
also attempting to switch the fields in the output file.
File is sorted by the long field.
I tried moving the EDIT to the input field and still not able to finish.
here are the results.
//SORTOUT DD DSN=NNNN.LLLLL.SUBSET,
// DISP=(NEW,CATLG,DELETE),
// RECFM=VB,LRECL=275,BLKSIZE=0,DSORG=PS,
// UNIT=(SYSALLDA,30),SPACE=(CYL,(30,50),RLSE)
--------------------------------------------------------------------------
INREC FIELDS=(ESRI,TESN) ESROURCE ID & TES NUMBER
SORT FIELDS=(1,255,CH,A)
OUTFIL OUTREC=(5:NTES,EDIT=('IIIIIIIIIIIIT'),18:NESR),
FTOV,VLTRIM=X'40'
DATA DICTIONARY SYMBOLS SUBSTITUTED :
INREC FIELDS=(65,255,679,7)
SORT FIELDS=(1,255,CH,A)
OUTFIL OUTREC=(5:5,7,PD,EDIT=('IIIIIIIIIIIIT'),18:12,255),FTOV,VLTRIM=X'40'
….
WER108I SORTIN : RECFM=FB ; LRECL= 686; BLKSIZE= 27440
WER073I SORTIN : DSNAME=nnnn.mmmm.f7dl
WER257I INREC RECORD LENGTH = 262
WER230A SORTOUT OUTREC FIELD OUTSIDE RANGE
What am I doing wrong?
numeric field grows from 7 PD, to 13, starting at 5 and finishing at 17, right?
and the second field starting at 18 for 255 bytes (max).
what am I missing?
Thanks |
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Your input to OUTFIL is 262 bytes long. You are referencing 1,255. Do the maths.
Why are you starting from position 5 for your "number"?
With your INREC FIELDS (please use BUILD) you put 255 bytes from start position 65, then 7 from 679 for your number.
Why are you starting the OUTREC (please, make it BUILD) at position 5? Start it at 1, the default, so you don't have to specify, then start the 255 field just at the next available position. |
|
| Back to top |
|
 |
migusd
New User
Joined: 08 Aug 2014 Posts: 44 Location: USA
|
|
|
|
Thank you, Bill...
That made a huge difference
here are my new cards...
| Quote: |
SYSIN :
INREC BUILD=(TESN,ESRI) NES RESS & TES KEY
SORT FIELDS=(08,255,CH,A)
OUTFIL BUILD=(NTES,EDIT=('TTTTTTTTTTTTT'),NESR),
FTOV,VLTRIM=X'40'
DATA DICTIONARY SYMBOLS SUBSTITUTED :
INREC BUILD=(679,7,65,255)
SORT FIELDS=(08,255,CH,A)
OUTFIL BUILD=(5,7,PD,EDIT=('TTTTTTTTTTTTT'),8,255),FTOV,VLTRIM=X'40' |
Unfortunately Sort is abending with a s0C7... doesn't like something in the 255 byte field... sadly...
Thanks for your help  |
|
| Back to top |
|
 |
migusd
New User
Joined: 08 Aug 2014 Posts: 44 Location: USA
|
|
|
|
my mistake... again...
forgot to change the start of the OUTFIL build as suggested to...
OUTFIL BUILD=(1,7,PD...
works fine!!!
Thanks a lot!!! |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|