Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Data security erase on RAID device steve-myers All Other Mainframe Topics 0 Sat Jan 13, 2018 6:41 am
No new posts Append the milliseconds to the data s... girishb2 DFSORT/ICETOOL 1 Thu Dec 21, 2017 9:07 pm
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 9 Thu Dec 14, 2017 3:52 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us