Variable Positioning of a Field in a display file

pts.
Tags:
Application development
Is it possible to set the postion of a field in a display file as per the condition without using two record formats? Like, if a said condition is true, the field will be displayed at (10,10), otherwise it will be at (15,10).

Answer Wiki

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

Rajsekhar,
Unlike HTML, DDS cannot handle two fields with same name. use two different CONDITIONED fields and populate them with the same value. Here is a working example. Simply compile both members and try it. Of course, you will replace the F5 with your own criteria to trigger the position of the fields.
DDS –
==========================================================
A CF03(03 ‘Exit’)
A CF05(05 ‘Refresh’)
A*****************************************************************
A R REC1
A 1 6’CONDITIANLLY POSITION FIELD’
A DSPATR(HI)
A 3 2’FIELD1:’
A 31 FLD1 20 3 11
A N31 FLD2 20 3 51
A 15 3’F3=EXIT F5=TOGGLE’
======================================================
RPG –
=======================================================
FVARPOSD CF E Workstn
*——————————————————–
D Value s 20 Inz(‘Hello There!’)
*——————————————————–
C Movel value fld1
C Movel value fld2
C exfmt rec1

C Dow *in03 = *off

C If *in05 = *on
C if *in31 = *on
C eval *in31 = *off
C else
C eval *in31 = *on
C endif
C endif
C exfmt rec1
c enddo
C Eval *inlr = *on
===================================================
Jay

Discuss This Question:  

 
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

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