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
 

 

getting spaces in output file while using join keys

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 236

PostPosted: Thu Oct 30, 2014 8:45 pm    Post subject: getting spaces in output file while using join keys
Reply with quote

Hi all,

I am trying to copy the matching record from two files ( VB files) as shown below

Code:

//STEP01 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*               
//SYSOUT   DD SYSOUT=*               
//SORTJNF1 DD DSN=VARIABLE.FILE1,DISP=SHR
//SORTJNF2 DD DSN=VARIABLE.FILE2,DISP=SHR
//SORTOUT DD DSN=VARIABLE.FILE3,DISP=SHR
//SYSIN DD *                     
  JOINKEYS FILE=F1,FIELDS(20,7,A)
  JOINKEYS FILE=F2,FIELDS(5,7,A) 
  REFORMAT FIELDS=(F2:1,4,1504)   
  OPTION COPY                 
/*     
                         


But i am getting matching records but the output file is having spaces, instead of having data. Please let me know if i am missing any syntax.
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Thu Oct 30, 2014 8:58 pm    Post subject:
Reply with quote

That is incomplete.
You need to show us what do you have at this offsets.. F2:1,4,1504)

Also you need to show us sample data. and I hope the files are sorted before you do a join.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Thu Oct 30, 2014 9:18 pm    Post subject: Reply to: getting spaces in output file while using join key
Reply with quote

Rohit, It's not incomplete, it's rare example of a variable-length REFORMAT record definition.

Whether intended is a different question :-)

pkmurali, what do you have from position 1504 to the end of the record on File 2? Because that's what you've asked to be placed on the REFORMAT record, nothing else except the RDW.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Fri Oct 31, 2014 8:34 pm    Post subject:
Reply with quote

Bill, I meant that when TS say about getting spaces without showing the sample record then it is difficult to judge what was wrong as at that offset there could already be a spaces in the input file who knows....

Otherwise, I agree with you that this is a rare example of VB REFORMAT.
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 -> DFSORT/ICETOOL 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