Nasty bug on new function of V5R4

60 pts.
Tags:
CL
CLLE
DEFVAR
STG
V5R4
as of V5R4 - DCL supports the STG (storage) keyword, which lets you designate how a variable's storage is to be allocated. STG(*DEFINED) tells the compiler that a variable overlays all or part of another variable. You'll also need to use the DEFVAR (defined on variable) keyword to tell which variable this new variable is part of. DEFVAR takes two values--the name of the variable that is overlaid and the starting position for the overlay. The default starting position is one http://www.itjungle.com/fhg/fhg020806-story01.html I tried to use it and it happens that if the variable is defined only in CL it works OK, but if the variable is a parameter it does not work. No only it does not work, but it gives crazy results: here is the CL program: PGM &FILLIB DCL VAR(&FILLIB) TYPE(*CHAR) LEN(20) DCL VAR(&FIL) TYPE(*CHAR) STG(*DEFINED) LEN(10) + DEFVAR(&FILLIB 1) DCL VAR(&LIB) TYPE(*CHAR) STG(*DEFINED) LEN(10) + DEFVAR(&FILLIB 11) ? CPYF FROMFILE(&LIB/&FIL) TOFILE(&LIB/&FIL) MONMSG CPF0000 SNDUSRMSG MSG(&LIB *TCAT '/' *TCAT &FIL) MSGTYPE(*INFO) ENDPGM I am doing the following command: CALL PGM(TESTDS2) PARM('FIL4567890LIB4567890') and here is the surprise: on the CPYF command it displays both variables (&FIL and &LIB) just from position 11 of the passed parameter, but on the SNDUSRMSG it displays it in the proper way. Copy File (CPYF) Type choices, press Enter. From file . . . . . . . . . . . > LIB4567890 Library . . . . . . . . . . . > LIB4567890 To file . . . . . . . . . . . . > LIB4567890 Library . . . . . . . . . . . > LIB4567890 From member . . . . . . . . . . *FIRST To member or label . . . . . . . *FIRST Replace or add records . . . . . *NONE Create file . . . . . . . . . . *NO Print format . . . . . . . . . . *CHAR Display Program Messages LIB4567890/FIL4567890
ASKED: September 7, 2008  10:55 AM
UPDATED: September 14, 2008  5:33 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

The problem was fixed – PTF 5722SS1-SI27953

Thanks to IBM for fast and accurate response/

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • 770
    The problem was fixed - PTF 5722SS1-SI27953
    60 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following