how to have variable length record in outrec..i have the
requmt as follows..
i/p file variable lenght record
output file : i need to alter the input and write into
outrec(another file)

sort fields:
copy from(dd1) using ctl1

ctl1cntl dd *
outfil fnames=xxx,
outrec=(1,131)

here i outrec is bombing with error..how to overcome this
defect...???

Answer Posted / deepika

We need to include RDW in OUTREC,Record Descriptor Word :
Data preceding a variable record that specifies the length
of the entire record including the RDW.) in outputs which
takes 4-bytes.So we need to add add 4-bytes to OUTREC as,

OUTREC=(1,4,5,131)

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how do you code a null statement?

768


A chkpt is the parameter coded for multi-volume qsam datasets in a dd statement. When a chkpt is coded as chkpt=eov, a checkpoint is written to the dataset specified in the sysckeov statement at the end of each volume of the input/output multi-volume dataset. State whether true or false?

730


Are there any set of rules for the names of the steps used in a job?

628


Explain in DD statement what is the use of DCB parameter?

649


What do you understand by the term “keyword” with respect to jcl and what is the opposite of the term?

669






in a jcl, a large volume dataset is loaded to a table using bmcload in step1 and an image copy of the loaded table is taken using bmccopy in step2. Step2 abends because the image copy dataset cannot hold the volume of the table. How can this be rectified?

816


How do you run a COBOL batch program from a JCL? How do you run a COBOL/DB2 program?

667


Explain the purpose of dd * statement in jcl?

631


What is jcl in mainframe, and how many types of jcl statements are there for a job?

627


which utility is used to run a cobol-db2 program?

799


Is condition checking possible in jcl? If yes, how?

733


What are the 2 types of parameters in dd statement?

637


Is their any set of rules for dd? Explain.

655


1) SORT FIELDS=(20,4,CH,D,10,3,CH,D) OUTREC FIELDS=(7:20,4,C' FUTURE ',20,2,10,3,1Z,1,9,13,7, 24,57,TRAN=LTOU,6X'FF') This example illustrates how a fixed-length input data set can be sorted and reformatted for output. The SORTIN LRECL is 80 bytes. The reformatted output records are fixed length with a record size of 103 bytes. SOLRF (the IBM-supplied default) is in effect, so unless the SORTOUT LRECL is specified or available, it will automatically be set to the reformatted record length of 103. in the above example i have some doubts that a) sort fields=(20,4,CH,D,10,3,CH,D) -what exactly it does and this fields related to output record fields or input record fields b)outrec used to refprmat the records after sorting that means could please reply me as soon as possible Thanks. Venkat

7074


which utility is used a dummy utility?

784