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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Syncsort - converting a VB to FB and padding with diff data
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: 500
Location: USA

PostPosted: Sat Aug 07, 2010 1:15 am    Post subject:
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    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 Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts JCL to get submitted once dataset has... vinu78 JCL & VSAM 17 Thu Feb 16, 2017 7:32 am


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