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

Syncsort - converting a VB to FB and padding with diff data


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

New User


Joined: 09 Jan 2007
Posts: 17
Location: india

PostPosted: Fri Aug 06, 2010 10:54 pm
Reply with quote

Hi All,

I need help in converting a VB to FB file.

I am converting a VB file to FB using below code...
SORT FIELDS=COPY
OUTREC FIELDS=(1:5,285),CONVERT

but this inserts spaces in output file when input file data is not available. ( as it is a VB file, if there is no data in that field it is not stored. i mean i see nothing for that field in file-manager.in this case last 6 bytes comp3 field)

so i am manually inserting packed zeroes in the 6 byte comp3 field
SORT FIELDS=COPY
OUTREC FIELDS=(5,277,X'00000000000C',284,2),CONVERT

i need a sort card for both scenarios. i mean, if data is available in the input filed then that data has to be populated in output file. if not, it should populate packed zeroes in 6 byte comp3 field and spaces in 2 byte alphanumeric .

Input file Max record length = 4 bytes RDW + 277 + 6 byte comp3 +2 byte alphanumeric = 289 bytes
Requirement :
Output file record length = 277 + 6 byte packed zeroes + 2 byte spaces = 285 bytes

do i make sense? Please help me out. Please let me know if you need more details.

Thanks!
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Sat Aug 07, 2010 1:15 am
Reply with quote

If I understand your requirements correctly, I believe the following control statements will give you the desired output:

Code:
//SYSIN DD *
  SORT FIELDS=COPY                                                     
  OUTREC FIELDS=(5,285),CONVERT                                         
  OUTFIL IFTHEN=(WHEN=(278,8,CH,EQ,X'40'),OVERLAY=(278:X'00000000000C')) 
/*


Regards,
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 Compare only first records of the fil... SYNCSORT 7
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top