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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 11 Tue May 16, 2017 2:20 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm


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