IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Join a FB file with VSAM and the o/p reformat on VSAM


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Tue Dec 11, 2012 7:59 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Dec 11, 2012 8:11 pm
Reply with quote

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
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Tue Dec 11, 2012 8:37 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Dec 11, 2012 8:50 pm
Reply with quote

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
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Tue Dec 11, 2012 9:04 pm
Reply with quote

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
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Tue Dec 11, 2012 9:06 pm
Reply with quote

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
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Tue Dec 11, 2012 9:19 pm
Reply with quote

"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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Dec 11, 2012 9:53 pm
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Tue Dec 11, 2012 10:06 pm
Reply with quote

Bill Woodger wrote:
you do not have a VB as your file to the JOINKEYS, you have a VSAM.

icon_eek.gif

You've been hanging around here too long; next thing you know, you'll be writing "a JCL" icon_wink.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Dec 11, 2012 10:24 pm
Reply with quote

Hello,

But, the VSam file is also VB?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Dec 11, 2012 10:51 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Dec 11, 2012 11:56 pm
Reply with quote

Akatsukami wrote:
Bill Woodger wrote:
you do not have a VB as your file to the JOINKEYS, you have a VSAM.

icon_eek.gif

You've been hanging around here too long; next thing you know, you'll be writing "a JCL" icon_wink.gif


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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Dec 12, 2012 12:52 am
Reply with quote

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". . .

icon_cool.gif
Back to top
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Wed Dec 12, 2012 10:34 pm
Reply with quote

All,
Thanks a lot for the help.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top