if a dataset is already created with fixed length but after
that i want to change fixed length to variable length then
how is it possible

Answer Posted / varsha

You can convert an FB data set to a VB data set with
OUTFIL's FTOV parameter. Each VB output record has a 4-byte
RDW followed by the corresponding data from the FB input
record, and the length in the RDW is the length of the FB
record plus 4.

The following JCL and DFSORT control statements convert the
bookstore data set records from FB to VB.

//FBVB JOB A92,PROGRAMMER
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=A123456.SORT.SAMPIN,DISP=SHR
//VBOUT DD DSN=A123456.SORT.VSAMP,DISP=
(NEW,CATLG,DELETE),
// UNIT=3390,SPACE=(CYL,(5,5))
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=VBOUT,FTOV
/*Because the LRECL of SORT.SAMPIN is 173 bytes, each VB
record in SORT.VSAMP is 177 bytes (the FB record length of
173 plus 4 for the RDW) and SORT.VSAMP is given an LRECL of
177.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what happens if parmparameter passes zero bytes to the program

1650


How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?

687


Explain about different table spaces.

642


How do you differentiate between cobol and cobol-ii?

646


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

701






Explain how to differentiate call by context by comparing it to other calls?

679


Write some characteristics of cobol as means of business language.

611


i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com

1757


What is a scope terminator give example?

650


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

666


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

1796


How many bytes S(8) comp field occupy and its maximum value?

1621


how can i see junk values in dclgen or in hostvariable of comp ?

2532


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

812


Which Search verb is equivalent to PERFORM…VARYING?

677