In my table i had a field of type VARCHAR of length 78. When i do the unload the output file it is creating as VB format.
Say the file name as UNLOAD.TABLE.VBFMT
Now i am using this table as my input and sorting. The output file is FB format.
The job is as follows:
//SORTJOB JOB 1,CLASS=6,MSGCLASS=0,NOTIFY=&SYSUID
//STEP010 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=C
//SYSPRINT DD SYSOUT=*
//INPUT DD DSN=UNLOAD.TABLE.VBFMT,DISP=SHR
//OUTPUT DD DSN=OUTPUT.FILE.AFTER.SORT,
//TOOLIN DD *
COPY FROM(INPUT) TO(OUTPUT) USING(CTL1)
//CTL1CNTL DD *
OUTFIL FNAMES=OUDMCSTA,REMOVECC, VTOF,
When i run this the output file is creating. But the data alignment is not proper.
This is because even though my varchar is of 78 length i am giving data of 10 characters. So the rest of 68 is filled by the data next to it. But it should be spaces. So the data alignment is not proper. If i give the value for the entire varchar field then i am getting proper output. If it is less than 78 the later part of data is moved to this varchar field.
What should i do in this regard.