View previous topic :: View next topic
|
Author |
Message |
sril.krishy
Active User
Joined: 30 Jul 2005 Posts: 183 Location: hyderabad
|
|
|
|
I have a FB file of length 80 and a VB file with length 3600. I want to match the records and replace a field in particular position. With the JOIN feature, I'm able to produce the output with REFORMAT statement. But the output file is getting padded with x'00' values. How can I remove the padding of the output file? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
You haven't made your REFORMAT record variable in length.
Please show your control cards, sysout from your run, sample inputs and expected outputs. |
|
Back to top |
|
|
sril.krishy
Active User
Joined: 30 Jul 2005 Posts: 183 Location: hyderabad
|
|
|
|
Code: |
JNF1 :
General Data:
File Type: KSDS
Key length: 52
Key location: 2
Record format: V
Average record length: 93
Maximum record length: 3600
Physical block size: 27998
Primary cylinders: 27
Secondary cylinders: 30
JNF2 :
Organization . . . : PS
Record format . . . : FB
Record length . . . : 80
Block size . . . . : 27920
1st extent cylinders: 1
Secondary cylinders : 1
Data set name type :
SMS Compressible. . : NO
SORTOUT :
General Data:
File Type: KSDS
Key length: 52
Key location: 2
Record format: V
Average record length: 93
Maximum record length: 3600
Physical block size: 27998
Primary cylinders: 1
Secondary cylinders: 30
I/P FILE-1(JNF1) SAMPLE DATA:
@@AAAAAAAA 12 FFFFFF
@@BBBBBBBB 12 AA
@@CCCCCCCC 13 CCCC
I/P FILE-2(JNF2) SAMPLE DATA:
AAAAAAAA @@
BBBBBBBB $$
CCCCCCCC !!
JOINKEYS FILES=F1,FIELDS=(3,8,A)
JOINKEYS FILES=F2,FIELDS=(1,8,A)
REFORMAT FIELDS=(F1:1,52,
F2:26,2,F1:55,3544)
SORT FIELDS=COPY
|
i am getting the o/p with the value replaced at 53 position,but the zeroes(x'00') are getting padded in the output file after FFFFF(of record1) and AA(of record2) etc..
where as the input file is completely spaces in the input file after these records(FFFFF,AA and CCC). |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
And the sysout from your step, with all the messages?
When you say "completely spaces" you mean "there is nothing there at all, the record has ended"? |
|
Back to top |
|
|
sril.krishy
Active User
Joined: 30 Jul 2005 Posts: 183 Location: hyderabad
|
|
|
|
I am getting the below note in the o/p in sysout.
Code: |
WER164B 26,928K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 340,480 BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER481I JOINKEYS REFORMAT RECORD LENGTH= 3599, TYPE = F
[b]WER256I SORTOUT VSAM FILE, RECORDS PADDED ON OUTPUT [/b]
WER110I SORTOUT : RECFM=F ; LRECL= 3600; CISIZE = 26624
|
Spaces means,the record is getting eneded at that position.
Thanks. |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Because you are placing data in position 53, DFSORT needs to 'fill' the space between what was the end of the record and this position.
It is using binary zeros (low-values) for this filler.
I believe you can tell it to use spaces x'40' instead. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
"WER" prefixed messages indicate that you are using SYNCSORT, in which case you are in the wrong forum. JCL forum is where SYNCSORT help is to be found.
Garry. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
sril.krishy,
Now we've got you in the right place.
Code: |
WER481I JOINKEYS REFORMAT RECORD LENGTH= 3599, TYPE = F |
This message is telling you your REFORMAT record is fixed in length, and is 3599 bytes long. When you write this to your VSAM, you should get one byte of padding on the "end" of the record.
To make the REFORMAT record variable, you need to do this:
Code: |
REFORMAT FIELDS=(F1:1,52,
F2:26,2,F1:55) |
Your REFORMAT record will consist of 1,52 from F1, which will include the RDW from your VB, then bytes 26 and 27 from F2, then bytes 55-to-the-end-of-the-record from F1.
However, looking back on your previous information, two things. Your original REFORMAT is not that which produced the sysout you showed (3598 vs 3599) and you do not have a VB as your file to the JOINKEYS, you have a VSAM.
For the former, it is a great help if you provide everything requested (the full sysout from the step would have shown your actual cards from the run). For the latter, consult your documentation about VSAM in SyncSort and let us know. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Bill Woodger wrote: |
you do not have a VB as your file to the JOINKEYS, you have a VSAM. |
You've been hanging around here too long; next thing you know, you'll be writing "a JCL" |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
But, the VSam file is also VB? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Strictly, no, it is not VB. It is V, "blocking" meaning nothing to VSAM.
It can probably be explained to SyncSort as V. Whether that will get V with the expected variable lengths, or V with the maximum lengths, on the output VSAM file, I don't know. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Akatsukami wrote: |
Bill Woodger wrote: |
you do not have a VB as your file to the JOINKEYS, you have a VSAM. |
You've been hanging around here too long; next thing you know, you'll be writing "a JCL" |
Well, I left the "file" implied from earlier in the sentence :-)
That is not a Ring Spanner that you have, it is an Adjustable (Spanner/one).
Whether this was correct usage or not, I bow to your undoubtedly higher level of English Language studies than mine :-)
With "two (look up the correct quote) seperated by a common language" I don't know what they, "over there", do with those from "over there" who know "our" language better than we generally do :-) |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Or as when the blonde walking thru the woods came to a river, looked across and saw another blonde - called "Hello, how do i get to the other side?".
The "across the river" blonde replied - "Silly, you are on the other side". . .
|
|
Back to top |
|
|
sril.krishy
Active User
Joined: 30 Jul 2005 Posts: 183 Location: hyderabad
|
|
|
|
All,
Thanks a lot for the help. |
|
Back to top |
|
|
|