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 copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am


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