Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

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

Active User


Joined: 30 Jul 2005
Posts: 182
Location: hyderabad

PostPosted: Tue Dec 11, 2012 7:59 pm    Post subject: Join a FB file with VSAM and the o/p reformat on VSAM
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Tue Dec 11, 2012 8:11 pm    Post subject: Reply to: Join a FB file with VSAM and the o/p reformat on V
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: 182
Location: hyderabad

PostPosted: Tue Dec 11, 2012 8:37 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Tue Dec 11, 2012 8:50 pm    Post subject: Reply to: Join a FB file with VSAM and the o/p reformat on V
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: 182
Location: hyderabad

PostPosted: Tue Dec 11, 2012 9:04 pm    Post subject:
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: 645
Location: Pennsylvania

PostPosted: Tue Dec 11, 2012 9:06 pm    Post subject:
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

Active Member


Joined: 08 May 2006
Posts: 990
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Dec 11, 2012 9:19 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Tue Dec 11, 2012 9:53 pm    Post subject: Reply to: Join a FB file with VSAM and the o/p reformat on V
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: 1738
Location: Bloomington, IL

PostPosted: Tue Dec 11, 2012 10:06 pm    Post subject: Re: Reply to: Join a FB file with VSAM and the o/p reformat
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

Site Director


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

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

Hello,

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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Tue Dec 11, 2012 10:51 pm    Post subject: Reply to: Join a FB file with VSAM and the o/p reformat on V
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Tue Dec 11, 2012 11:56 pm    Post subject: Re: Reply to: Join a FB file with VSAM and the o/p reformat
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

Site Director


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

PostPosted: Wed Dec 12, 2012 12:52 am    Post subject: Reply to: Join a FB file with VSAM and the o/p reformat on V
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: 182
Location: hyderabad

PostPosted: Wed Dec 12, 2012 10:34 pm    Post subject: Reply to: Join a FB file with VSAM and the o/p reformat on V
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us