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 # 53745

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

Question { 1535 }

what modification we need to do in jcl if we use sort in cobol? I mean whether we need to include temporary file used for sorting in assign statement?


Answer

----yes we need to include one temp file whose record size is same as that of input file record size

Is This Answer Correct ?    0 Yes 0 No

Question { 1544 }

what is the difference between perform varying and perform


Answer

until -- Untill will test the condition at end(hence the loop will run at least once)
Varying is creating loops

Is This Answer Correct ?    0 Yes 0 No


Question { 1622 }

difference between internal sort and external sort


Answer

Internal sort is handled by a cobol program using i/p file,work file and o/p file.

Internal sort is when you do any processing you need to recompile the cobol program

External sort is performed through jcl where you provide SORTIN and SORTOUT datasets and its easier to perform this sort as any changes, will require only submitting the jcl.

Is This Answer Correct ?    0 Yes 0 No

Question { 1586 }

01 GROSS-PAY
05 BASIC-PAY PIC 9(5)
05 ALLOWENCES PIC 9(3)
if BASIC-PAY has a value 1000 and ALLOWENCES has a value
of 250,what will be
displayed by the statement
DISPLAY GROSS-PAY
a.1250
b.01000250
c.01250
d.1.250


Answer

b. 01000250

Is This Answer Correct ?    0 Yes 0 No

Question { 2003 }

what if any ,is the syntax error in the following piece of code
01 B PIC A(7)
02 C PIC 9(4)
........
IF(B NUMERIC)
ADD 10 TO C
a.the condition in the if statement is wrong
b.noting is wrong
c.because C is initialised.ADD 10 TO C is wrong
d.both B and C shoud have same size.


Answer

"B (ALPHABETIC)" did not have a valid type for the specified class condition. T
nformational Warning Error Severe Terminating


WORKING-STORAGE SECTION.
01 B PIC A(7) VALUE '1'.
01 C PIC 9(4) VALUE 2.
PROCEDURE DIVISION.
IF(B NUMERIC)
ADD 10 TO C.
STOP RUN.

Is This Answer Correct ?    4 Yes 0 No

Question { 1445 }

01 GROUP-ITEM
05 AMOUNT-1 PIC 99V9 USAGE COMP VALUE 50
05 AMOUNT-2 PIC 9(4)V99 USAGE COMP
MOVE ZERO TO GROUP-ITEM
ADD 50 TO AMOUNT-1
what will be the content of AMOUNT-1?
a.50
b.100
c.0
d.unpredictable


Answer

d. Unpredictable

Is This Answer Correct ?    0 Yes 1 No

Question { 1472 }

WORKING-STORAGE SECTION.
1 GROUP-ITEM.
05 AMOUNT-1 PIC 99V9 USAGE COMP VALUE 50.
05 AMOUNT-2 PIC 9(4)V99 USAGE COMP.
PROCEDURE DIVISION.
MOVE ZERO TO GROUP-ITEM.
ADD 50 TO AMOUNT-1.
DISPLAY AMOUNT-1.
STOP RUN.


Answer

output - 180

Is This Answer Correct ?    0 Yes 0 No

Question { 1595 }

consider the following progrm statements
MOVE 0 TO SW.NO.OF.REC
PERFORM PRI-OUT UNTIL SW=1
DISPALY NO.OF.REC
STOP RUN
PRE-OUT
READ IN-FILE AT END
MOVE 1 TO SW
WRITE OUO-REC FROM IN-REC
ADD 1 TO NO.OF REC
if the IN-FILE contains 1000 records what value will be
displayed after the
PERFORM is over? assume that N0.OF.REC has PIC 9(4)
a.1000
b.1001
c.1
d.none of the above


Answer

d.none of the above
since there is a syntax error

Is This Answer Correct ?    0 Yes 0 No

Question { 1307 }

Explain about REXX


Answer

POS : return the position of one string str1 into str2- start from by default position 1
INDEX : returns the character position of one string, needle, in another, haystack, or returns 0 if the string needle is not found or is a null string.
By default the search starts at the first character of haystack (start has the value 1).
You can override this by specifying a different start point, which must be a positive whole number.
LASTPOS :returns the position of the last occurrence of one string, needle, in another, haystack


pos----- string
index---character
Lastpos-last occurence of one string into another

Is This Answer Correct ?    0 Yes 0 No

Question { 1865 }

Explain about LMINIT - generate a data ID for a data set


Answer

1.The LMINIT service allows the dialog to associate a data ID for ISPF library or PS or PDS
2. The data ID is generated by LMINIT and can be used to identify the data set for processing by other library access services or the BROWSE or EDIT service
3.If LMINIT is issued with an enqueue (ENQ) of SHRW and LMOPEN is issued with the OUTPUT option, it is essential that an LMCLOSE is issued when the dialog has finished processing the data set,
since the DASD volume is reserved until LMCLOSE is invoked.
4. LMQUERY service to find out how the LMINIT parameters are set
5.The requirements for enqueuing (ENQ) the data within ISPF so that the dialog can use it in the desired manner.
a.SHR shows that the existing data can be shared; default for INPUT in LMOPEN service
b.EXCLU shows that exclusive use of the data is required; for example, when you want to change the data no one else can have access to it.
c.SHRW permits a shared write for the data. This option is used by ISPF Edit. It is used only for a partitioned data set.
In this way, more than one user can read from the data, but members can be rewritten when necessary through an enqueue or dequeue used by Edit.
Edit can now have the data ID open for INPUT and OUTPUT at the same time.
A data set that is allocated with an enqueue of SHRW can be opened for either INPUT or OUTPUT using the LMOPEN service.
d.MOD shows that more records are to be added to the end of a sequential data set. MOD is used with the OUTPUT option of the LMOPEN service.



>>-ISPEXEC--LMINIT--DATAID(data-id-var)------------------------->

>--+-| PROJECT options |-+--+----------------+------------------>
+-DATASET(dsname)-----+ '-VOLUME(serial)-'
'-DDNAME(ddname)------'

>--+--------------------+--+------------------+----------------->
'-PASSWORD(password)-' | .-SHR---. |
'-ENQ(-+-EXCLU-+-)-'
+-SHRW--+
'-MOD---'

>--+--------------+--------------------------------------------><

Is This Answer Correct ?    0 Yes 0 No

Question { 1919 }

Explain about LMOPEN -


Answer

1.The LMOPEN service opens the data set associated with a given data ID so the data set can be either read from, using LMGET, or written to, using LMPUT.
2.The LMINIT service must be completed before LMOPEN can be used.
3.For each LMOPEN invocation, you should invoke a matching LMCLOSE service.
4.The data ID associated with the data set to be opened. The data ID has been generated by the LMINIT service. The maximum length of this parameter is 8 characters.
5.Whether the data set is to be opened for reading or writing. INPUT is the default.
6.INPUT specifies that the dialog invoking the service uses the LMMFIND and LMGET services to read from the data set.
The enqueue value for the LMINIT service can be SHR, EXCLU, or SHRW.
7.OUTPUT specifies that the dialog invoking the service uses LMPUT and either LMMADD or LMMREP to write to the data set, or
uses LMMDEL or LMMREN to change the data set. The enqueue value for the LMINIT service can be EXCLU, SHRW, or MOD
8.


>>-ISPEXEC--LMOPEN--DATAID(data-id)--+----------------------+--->
| .-INPUT--. |
'-OPTION(-+-OUTPUT-+-)-'

>--+------------------+--+------------------+------------------->
'-LRECL(lrecl-var)-' '-RECFM(recfm-var)-'

>--+--------------+--------------------------------------------><
'-ORG(org-var)-'

Is This Answer Correct ?    0 Yes 0 No

Question { 1739 }

Explain about LMCOPY -


Answer

1. The LMCOPY service copies members of a partitioned data set, or copies an entire sequential data set.
2. Completion of the LMINIT service is required before you can invoke LMCOPY.
3. You must specify ENQ(MOD) with the LMINIT service if you want to use LMCOPY to append records to the "to-data-id".
4.FROMID and TODATAID can refer to the same data set but they cannot have the same data-id.
5.LMCOPY does not support the copying of unmovable data sets
6.if from-data-id represents an empty sequential data set, LMCOPY performs the copy but sets the return code to 4 as a warning.


>>-ISPEXEC--LMCOPY--FROMID(from-data-id)------------------------>

>--+---------------------------+--TODATAID(to-data-id)---------->
'-FROMMEM(from-member-name)-'

>--+-----------------------+------------------------------------>
'-TOMEM(to-member-name)-'

>--+---------+--+------+--+-------+--+------+------------------->
'-REPLACE-' '-PACK-' '-TRUNC-' '-LOCK-'

.-ALIAS---.
>--+------------------+--+---------+---------------------------><
'-SCLMSET(-+-Y-+-)-' '-NOALIAS-'
'-N-'

Is This Answer Correct ?    0 Yes 0 No

Question { 1929 }

Explain about LMMFIND - find a library member


Answer

1. finds a specified member of an ISPF library or partitioned data set associated with a given data ID.
2.The LMINIT and LMOPEN services must be completed before LMMFIND can be used.
3.Whether statistics for the member are to be returned to the dialog invoking the service.
If you specify NO, no statistics are returned. If you specify YES and the data ID represents a data set that has unformatted records (RECFM=U),
the statistics are returned in these dialog variables:
a.ZLC4DATE :Creation date in 4-character year format;
b.ZLCDATE :Creation date
c.ZLCNORC :current number of records
d.ZLINORC :begining number of records
e.ZLMOD :modification level
f.ZLMSEC :second value of last change time
g.ZLMTIME :Last change time;
h.ZLUSER :user id used to do change
i.ZLVERS :version number



>>-ISPEXEC--LMMFIND--DATAID(data-id)--MEMBER(member-name)------->

>--+------+--+------------------+--+------------------+--------->
'-LOCK-' '-LRECL(lrecl-var)-' '-RECFM(recfm-var)-'

>--+------------------+--+------------------+--+-------+-------><
'-GROUP(group-var)-' | .-NO--. | '-NOLLA-'
'-STATS(-+-YES-+-)-'

Is This Answer Correct ?    0 Yes 0 No

Question { 2059 }

Explain about LMMLIST�list a library's members


Answer

1.The LMMLIST service, when used with the LIST or SAVE option, creates a list of the first occurrence of all the members in an ISPF library,
a concatenated set of ISPF libraries, or an MVS� partitioned data set associated with the given data ID
2.You must complete the LMINIT and LMOPEN services before using LMMLIST. Use the LMMLIST FREE option to release the list storage space when it is not needed.
3.LIST|FREE|SAVE - These options determine the action performed by the LMMLIST service.
a.LIST : The first time that you invoke the LMMLIST service with the LIST option, it creates a member list for use by a dialog.
b.FREE : The FREE option specifies that the storage acquired to create the member list is to be freed.
C.SAVE : The SAVE option writes all member names in a list specified by the data ID to a data set.need use Group and Member for this.


>>-ISPEXEC--LMMLIST--DATAID(data-id)--+--------------------+---->
| .-LIST-. |
'-OPTION(-+-FREE-+-)-'
'-SAVE-'

>--+--------------------+--+------------------+----------------->
'-MEMBER(member-var)-' | .-NO--. |
'-STATS(-+-YES-+-)-'

>--+--------------+--+-------------------------+--+------+-----><
'-GROUP(group)-' '-PATTERN(member-pattern)-' '-LONG-'

Is This Answer Correct ?    0 Yes 0 No

Question { 1464 }

Explain about LMGET�read a logical record from a data set


Answer

1.The LMGET service reads one logical record from the data set associated with the given data ID.
2.Completion of the LMINIT and LMOPEN services for the data set is required before LMGET is invoked.
3.If the data to be processed is a sequential data set, the first LMGET reads the first logical record. Later invocations read successive logical records
4.If the data is an ISPF library or MVS� partitioned data set, previous completion of the LMMFIND service is required in addition to completion of LMINIT and LMOPEN.
The LMGET service reads from the last member referred to by the LMMFIND service in the data sets being processed. Thus, if LMMFIND is issued referencing member A,
LMGET reads from member A. If another LMMFIND is issued referencing member B, LMGET reads from member B, not member A.

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

>--DATALOC(dataloc-var)--DATALEN(datalen-var)------------------->

>--MAXLEN(max-length)------------------------------------------><

Is This Answer Correct ?    0 Yes 0 No

Prev    1    [2]   3    Next