What would be the output of the variable result?

D RESULT S 5S O INZ(00011)
C EVAL RESULT = %TRIM(RESULT)

Please give me the correct answer for this
A.0001
b.compile time error
c.11
d.Runtime error

Answer Posted / swetha p rao

Answer is b

compile time error as data types doesnt match

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how do you know that records are locked?

1137


how many maximum spaces could be given in o specs?

631


i am using non join multiple format my 3 database file is like that pf97 R REC ENAME ETENNO ESTATUS K ENAME pf98 R REC1 ENAME ESAL K ENAME PF99 R REC3 ENAME CRDCARD EID K EID & MY NON JOIN LOGICAL FILE IS ALSO SAME EXCEPT RECORD NAMES BEFORE I TRIED WITH 2 FILES SO ITS SAYS ERROR I.E.(Key field attributes must be same as for previous formats. ) SO I CHANGED KEYFIELD ACCORDING TO PF SO ITS WORKING BUT AFTER ADDING 3 FILES ITS SAYING SAME ERROR . I DONT KNOW I NEW IN AS400 PLLZ HELP ME I HAVE ONE MORE QUE. CANT BE USE DIFFERENT KEYFIELD (NOT ACCORDING TO PF) IN NON JOIN LOGICAL FILE.

1035


what is meant by object lock requests,held locks and locks waiting to be applied(wrkobjlck) why should we apply for locks.Please explain sir.

5941


explain the difference between defining subfile and message-subfile?

1101






how can we run a batch job?

729


how many specifications are there in rpg/400? What are they?

1084


is it there an easy way to determine if an html section is available to issue a wrtsection upon?

561


what is a composite key?

1002


Difference Between Source Physical File & Physical File?

632


what are the different types of variables available in cl?

1000


what is the favicon.ico request that my site receives now and then?

627


What is file access opcodes?

750


I have created a command that display Source file and library. Now i want that when i enter library name and press f4 on Source file, pgm should display all the PF- SRC's in that Library. For F4 option i have used Choice program but since only limited paramters are passed in Choice pgm i am not able to paas library name and further can't call a pgm that will display list of Source files. Below is the Code snippet for CMD type object :- CMD PROMPT('Source Scan for HUB Standard') PARM KWD(SOURCE) TYPE(*CHAR) LEN(1) RSTD(*YES) + VALUES(N A) MIN(1) + CHOICE('N,A') PARM KWD(SRCFILE) TYPE(FILE) RSTD(*NO) + PROMPT('SOURCE FILE') FILE: QUAL TYPE(*NAME) LEN(10) RSTD(*NO) EXPR (*YES) + CHOICE(*PGM) + CHOICEPGM (XXXXXLIB/YYYPGM) QUAL TYPE(*NAME) LEN(10) DFT(*LIBL) + SPCVAL((*LIBL)) EXPR(*YES) PROMPT ('Library') Below is the Choice pgm:- PGM PARM(&PARM1 &PARM2) DCL VAR(&PARM1) TYPE(*CHAR) LEN (21) DCL VAR(&PARM2) TYPE(*CHAR) LEN (2000) IF COND(%SST(&PARM1 1 10) = 'CHOICE ' *AND + %SST(&PARM1 11 10) = 'SRCFILE ' *AND + (%SST(&PARM1 21 1) = 'C' *OR %SST (&PARM1 + 21 1) = 'P')) THEN (DO) /* (%SST(&PARM1 21 1) = 'C' *OR %SST (&PARM1 + */ CHGVAR VAR(&PARM2) VALUE('Name, F4 for List') ENDDO IF COND(%SST(&PARM1 1 10) = 'CHOICE ' *AND + %SST(&PARM1 11 10) = 'SRCFILE ' *AND + %SST(&PARM1 21 1) = 'P') THEN (DO) CHGVAR VAR(&PARM2) VALUE('Name, F4 for List') CALL PGM(GTSQL) PARM ('XXXXLIB') return ENDDO Thanks in Advance for looking into.

3030


what are the various types of device files?

988