Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Explain about RECORDING MODE Clause

Answer Posted / dimpy19

RECORDING MODE clause specifies the format of the physical records
Recording mode F (fixed) -
Recording mode V (variable)
Recording mode U (fixed or variable)
Recording mode S (spanned)


FILE-CONTROL.
SELECT INPUTF ASSIGN TO INF.
SELECT OUTPUTF ASSIGN TO OUT.
SELECT WORK ASSIGN TO WRK.
DATA DIVISION.
FILE SECTION.
FD INPUTF.
01 INPUT-STUDENT.
05 STUDENT-ID-I PIC 9(6).
05 FILLER PIC X(74).
FD OUTPUTF.
01 OUTPUT-STUDENT.
05 STUDENT-ID-O PIC 9(6).
05 FILLER PIC X(74).
SD WORK.
01 WORK-STUDENT.
05 STUDENT-ID-W PIC 9(6).
05 FILLER PIC X(74).
WORKING-STORAGE SECTION.
01 VAR1 PIC 9.99 VALUE '124'.
01 STRING1 PIC X(10) VALUE 'ARPITA' .
01 STRING2 PIC X(10) VALUE SPACES.
01 VAR2 PIC 9.99 VALUE '1.24'.
01 VAR3 PIC 9.99 VALUE '.123'.
01 VAR4 PIC 9.99 VALUE '12.4'.
* 01 VAR5 PIC 9V99 VALUE '1.23'.
01 VAR6 PIC 9.99 VALUE '12.5' .
01 VAR7 PIC 9V99.
PROCEDURE DIVISION.
SORT WORK ON ASCENDING KEY STUDENT-ID-W
USING INPUTF GIVING OUTPUTF.
DISPLAY 'SORT SUCCESSFUL'.
MOVE '123' TO VAR7.
DISPLAY 'FIRST VAR7 SENDING :' VAR7.
DISPLAY 'FIRST VAR6 SENDING :' VAR6.
*-------------------------------------------------------------
* USING FUCNTIO LENGTH
*-------------------------------------------------------------
MOVE STRING1 TO STRING2(1:FUNCTION LENGTH(STRING1)).
DISPLAY 'STRING 2 ' STRING2.
*-------------------------------------------------------------
* USING FUCNTIO OF SPECIAL REGISTER
*-------------------------------------------------------------
MOVE STRING1 TO STRING2(1:LENGTH OF STRING1 ).
DISPLAY 'STRING 2 ' STRING2.
STOP RUN.






logic 2

FILE-CONTROL.
SELECT INP ASSIGN TO INF
ORGANIZATION IS SEQUENTIAL
ACCESS MODE IS SEQUENTIAL.
DATA DIVISION.
FILE SECTION.
FD INP
RECORDING MODE IS F.
01 INP-REC.
10 STUDENT-ID PIC 9(3).
10 STUDENT-NAME PIC X(20).
WORKING-STORAGE SECTION.
01 WS-INP-REC.
10 WS-STUDENT-ID PIC 9(3).
10 WS-STUDENT-NAME PIC X(20).
* 01 INX PIC X(3).
01 ARRAY.
05 ARRAY-DEF OCCURS 3 TIMES INDEXED BY INX.
10 STUDENT-ID-TAB PIC 9(3).
10 STUDENT-NAME-TAB PIC X(20).
05 EOF PIC X VALUE 'N'.
01 STRING-A PIC X(30).
01 PRINT-CHAR PIC X(20).
LINKAGE SECTION.
01 CALL-VALUE.
05 CALL-LEN PIC S9(4) COMP.
05 CALL-CHAR PIC X(20).
PROCEDURE DIVISION USING CALL-VALUE.
OPEN INPUT INP.
SET INX TO 1.
READ INP INTO WS-INP-REC.
MOVE WS-INP-REC TO ARRAY-DEF(INX).
* DISPLAY STUDENT-ID.
DISPLAY STUDENT-ID-TAB(INX).
DISPLAY STUDENT-NAME-TAB(INX).
SET INX UP BY 1.
READ INP INTO WS-INP-REC.
MOVE WS-INP-REC TO ARRAY-DEF(INX).
* DISPLAY STUDENT-ID.
DISPLAY STUDENT-ID-TAB(INX).
DISPLAY STUDENT-NAME-TAB(INX).
SET INX UP BY 1.
READ INP INTO WS-INP-REC.
MOVE WS-INP-REC TO ARRAY-DEF(INX).
* DISPLAY STUDENT-ID.
DISPLAY STUDENT-ID-TAB(INX).
DISPLAY STUDENT-NAME-TAB(INX).
CLOSE INP.
DISPLAY 'LENGTH ' CALL-LEN.
DISPLAY 'CALL-CHAR ' CALL-CHAR.
IF CALL-LEN > 0 THEN
MOVE CALL-CHAR(1:CALL-LEN) TO PRINT-CHAR
DISPLAY 'PRINT-CHAR 'PRINT-CHAR
DISPLAY CALL-LEN
END-IF.
ACCEPT STRING-A FROM SYSIN.
DISPLAY 'STRING-A ' STRING-A.
GOBACK.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is use of dsn parameter in dd statement?

1199


Why block size is multiple of lrecl in jcl?

1471


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

1182


Suppose there are 2 Input files Infile-1 and Infile-2. Both the Files contain Employee Records. You need to compare both the files and Write the Common Records in third file named Outfile. How can we do this using File-Aid?

2809


How to pass data to a program that is coded in an exec statement?

1383


Is acct parameter mandatory?

1271


How to read and write a single record into a file. I would like to use it to enter a single 8-character piece of information and use it to put it into a variable for processing in JCL. Thank you

1129


My Question is 1. How to cound no. of records in JCL. Please explain with an example. 2. How to execute only odd steps in JCL? I know EDIT TYPE = Inculde, Step Name = 1,3,5 and COND code for all even step. Anyone knows other than this.

2512


how you can access an uncataloged dataset in a JCL?

1191


Is it possible to define dd statements as you want?

1159


What is the use of symbol // in jcl?

1531


What is the job entry system used in your project? based on what criteria the sequence of jobs are picked if priority is not mentioned in the job card?

2339


Explain how can an in-stream dataset be terminated?

1406


What does a disposition of (MOD,DELETE,DELETE) mean ?

1188


I want to join to input files and write the matching fields on to an output file but i dont want the output file a sorted one

2515