dimpy


{ City } bangalore
< Country > india
* Profession *
User No # 119646
Total Questions Posted # 36
Total Answers Posted # 41

Total Answers Posted for My Questions # 27
Total Views for My Questions # 53741

Users Marked my Answers as Correct # 11
Users Marked my Answers as Wrong # 3
Answers / { dimpy }

Question { 1868 }

Explain about LMPUT-


Answer

1.The LMPUT service writes one logical record to the data set associated with a given data ID.
2.The first LMPUT writes the first logical record to the data set, and later invocations write succeeding records.
3.The LMINIT service with ENQ(EXCLU), ENQ(SHRW), ENQ(MOD), and the LMOPEN service with the OUTPUT option must be completed before you can use the LMPUT service.
4.In INVAR mode and MULTX mode, the data-location parameter variable contains the data itself.
In MOVE mode, the data-location parameter contains the address of the data to be written.

>>-ISPEXEC--LMPUT--DATAID(data-id)--MODE(-+-INVAR-+-)----------->
+-MOVE--+
'-MULTX-'

>--DATALOC(dataloc-var)--DATALEN(data-length)--+---------+-----><
'-NOBSCAN-'

Is This Answer Correct ?    0 Yes 0 No

Question { 1653 }

Explain about LMCLOSE�close a data set


Answer

If LMINIT is issued with an enqueue (ENQ) of SHRW and LMOPEN is issued with the OUTPUT option,
it is important that an LMCLOSE be issued when the dialog has finished processing the data set, since the DASD volume is reserved until LMCLOSE is invoked.

>>-ISPEXEC--LMCLOSE--DATAID(data-id)---------------------------><

Is This Answer Correct ?    0 Yes 0 No


Question { 1559 }

Explain about SYSVAR


Answer

>>-SYSVAR(arg_name)--------------------------------------------><

1. SYSVAR returns information about MVS�, TSO/E, and the current session, such as levels of software available, your logon procedure, and your user ID.
2. The information returned depends on the arg_name value specified on the function call.
3. The arg_name values are divided into the following categories of information: user, terminal, exec, system, language, and console session information.

Is This Answer Correct ?    0 Yes 0 No

Question { 1407 }

Explain about User Information


Answer

SYSUID - the user ID under which the current TSO/E session is logged on
SYSPREF - the prefix as defined in the user profile. The prefix is the string that is prefix to data set names that are not fully-qualified.
The prefix is usually the user's user ID.

Is This Answer Correct ?    0 Yes 0 No

Question { 1448 }

Explain about File Tailoring


Answer

1.File-tailoring services read skeleton files and write tailored output that can be
used to drive other functions.
2.Frequently, file tailoring is used to generate job files for batch execution.

FTOPEN - Prepares the file-tailoring process and specifies whether
the temporary file is to be used for output
FTINCL - Specifies the skeleton to be used and starts the tailoring process
FTCLOSE - Ends the file-tailoring process
FTERASE - Erases an output file created by file tailoring


he file name of the temporary file is available in system variable ZTEMPF.
In MVS�, ZTEMPF contains a data set name.

The ddname of the temporary file is available in system variable ZTEMPN.

Is This Answer Correct ?    0 Yes 0 No

Question { 1695 }

Explain about ISPFTTRC


Answer

1. You can use the ISPFTTRC command to trace both the execution of file tailoring service calls
(FTOPEN, FTINCL, FTCLOSE, and FTERASE)

2. The ISPFTTRC command traces the processing of file tailoring services that are invoked from
any screen within the current ISPF session.

3. You can trace both the execution of file tailoring service calls (FTOPEN, FTINCL, FTCLOSE, and FTERASE)
and the processing that occurs within the file tailoring code and processing of each statement.

4. The output from the trace is written to a dynamically allocated VB (variable blocked) data set that has a record length of 255.

Is This Answer Correct ?    0 Yes 0 No

Question { 1354 }

Explain about Internal Sort


Answer

SORT work-file ON ASCENDING KEY rec-key1
[ON DESCENDING KEY rec-key2]
USING input-file GIVING output-file.


Input file - is the file which we have to sort either in ascending or descending order.

Work file - is used to hold records while the sort process is in progress.
Input file records are transferred to the work file for the sorting process.
This file should be defined in the File-Section under SD entry.

Output file - is the file which we get after the sorting process.
It is the final output of the Sort verb.


SORT performs the following operations -

1. Opens work-file in I-O mode, input-file in the INPUT mode and output-file in the OUTPUT mode.
2. Transfers the records present in the input-file to the work-file.
3. Sorts the SORT-FILE in ascending/descending sequence by rec-key.
4. Transfers the sorted records from the work-file to the output-file.
5. Closes the input-file and the output-file and deletes the work-file.

Is This Answer Correct ?    0 Yes 0 No

Question { 1744 }

Explain about Cobol Subroutines


Answer

cobol subroutines
1.internal subroutines - like PERFORM statement.
2.external subroutines - using CALL verb (call by value and call by reference).
-----default------

subroutine can be compiled stand alone but cannot be executed independently.

Is This Answer Correct ?    0 Yes 0 No

Question { 1681 }

Explain about RECORDING MODE Clause


Answer

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

Question { 1823 }

Explain about Specifying compiler options in the PROCESS (CBL) statement


Answer

1. Within a COBOL program, you can code most compiler options in PROCESS (CBL) statements.
2. Code the statements before the IDENTIFICATION DIVISION header and before any comment lines
or compiler-directing statements.

Is This Answer Correct ?    0 Yes 0 No

Question { 2249 }

Explain about CBL/PROCESS statement syntax


Answer

>>-+-CBL-----+--+--------------+-------------------------------><
'-PROCESS-' '-options-list-'
You can use CBL as a synonym for PROCESS.


options-list - A series of one or more compiler options, each one separated by a comma or a space.

**Compiler option can be set up in two way
1. JCL
2. COBOL Code

1. JCL - pass in PARM in EXEC statement

//MANGO1 EXEC PGM=IGYCRCTL,
// PARM='NUM,NODYN,APOST,NOSEQUENCE,NONAME,NOMDECK,LIST'

2. COBOL Code - PROCESS LIST,NOOFFSET

PROCESS LIST,NOOFFSET
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
DATA DIVISION.
FILE SECTION.
WORKING-STORAGE SECTION.
01 VAR1 PIC 999 VALUE ZEROS.
01 VAR2 PIC 999 VALUE ZERO .
01 VAR3 PIC 999 VALUE ZEROS.
PROCEDURE DIVISION.
DISPLAY ' IN PROCEDURE DIVISION ' .
MOVE 12 TO VAR2.
MOVE 10 TO VAR3.
DIVIDE VAR1 INTO VAR2 GIVING VAR3.
DISPLAY ' VAR3 ' VAR3.
STOP RUN.



then go to sysout check message like below ---

The system detected a decimal-divide exception (System Completion Code=0CB).
From compile unit HELLO at entry point HELLO at compile unit offset +000001E2 at
address 25C001E2.

here offset +000001E2
take last 4 and check in compiler listing for the offset

000016: DIVIDE VAR1 INTO VAR2 GIVING VAR3.
0001D6 E902 D16C 80A0 000016 PKA 364(R13),160(3,R8)
0001DC E902 D15C 8098 000016 PKA 348(R13),152(3,R8)
0001E2 FD31 D178 D16A 000016 DP 376(4,R13),362(2,R13)
0001E8 F321 80A8 D178 000016 UNPK 168(3,R8),376(2,R13)
0001EE 96F0 80AA 000016 OI 170(,R8),X'F0'

now check line number 000016
000016** DIVIDE VAR1 INTO VAR2 GIVING VAR3.

Is This Answer Correct ?    0 Yes 0 No

Prev    1   2    [3]