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 the function of dd name parameter with a 2 part structure; audit.report?

1234


Where & How Do You Code Identifier In Jcl?

1281


How to pass the parameter in parm using linkage section ? (syntax)?

1130


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

7802


Explain how can values be passed from the job stream to an executable program?

1220


I have many files which i am receiving from client everyday. I have one step for every file to check for empty or not. Here client gives 30 files i need to check for every file for empty or not and i need to perform 30 steps. Can I do it in single step. Dynamically i need to change the File name in my step.

1210


In sms datasets, what is the function of the dd avgrec keyword?

1090


why should SYSIN DD * statement should not be included inside a PROCedure snippet??? please answer this.. i need to know.

2452


What is the purpose of dd dummy statement?

1460


how JCL works?

1258


Name a few IBM utility programs, and explain its function.

4968


how can you check if a file is empty using jcl?

1418


I have 60 steps in the JCL and want to Execute Only First from PROC by overriding in JCL ?

1836


What are the utility programs in jcl?

1157


Explain how can a stopped job be started again?

1134