Swith to lowercase in ISPF skeleton



IBM's Command List programming language & Restructured Extended Executor

Swith to lowercase in ISPF skeleton

Postby stanvanoers » Thu Jul 11, 2024 4:54 pm

Hello,
Is it possible to change to lowercase in a Skeleton.

Example
P is a variable defined in a Panel, lets say XXXX
For OMVS segment I define in SKELETON
omvs(home('/var/ansible/home/&P'))

Result is omvs(home('/var/ansible/home/XXXX')) but I want to have omvs(home('/var/ansible/home/xxxx'))
Anybody any idea how to solve
With kind regards
Stan van oers
stanvanoers
 
Posts: 3
Joined: Thu Oct 28, 2021 8:16 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Swith to lowercase in ISPF skeleton

Postby sergeyken » Thu Jul 11, 2024 6:22 pm

I used skeletons about 10+ years ago.

AFAIR there is the option of using REXX inside of the skeleton.

Control statements

. . . . . .
)REXX
. . . use TRANSLATE function to convert &P to uppercase/lowercase . . . . .
)ENDREXX
. . . . .
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 438
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: Swith to lowercase in ISPF skeleton

Postby willy jensen » Thu Jul 11, 2024 7:33 pm

No problems with lowercase characters, though the skeleton commands themselves must be in uppercase.
That panel variable P should then be defined as CAPS(NO). Or use a instream converter REXX as shown above.
By the way, the syntax is:
)REXX P
transform P
)ENDREXX
willy jensen
 
Posts: 467
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 70 times

Re: Swith to lowercase in ISPF skeleton

Postby Pedro » Fri Jul 12, 2024 8:04 am

re: That panel variable P should then be defined as CAPS(NO)

I think Willy is on to something. The user would normally type without setting the case, but the default panel attribute is to translate to uppercase. You might solve your problem by explicitly specifying CAPS(NO) in the panel definition.

Design wise, I think you should honor the case if the user explicitly specifies mixed case, like 'xxXx'.

a tangent: When I was a developer at IBM, we received a requirement to allow mixed case in IMS operator commands. We had a prolonged discussion about what that meant. fyi. It is clear that it was not uppercase, but people thought mixed case only meant to allow lowercase. The customer wanted to allow any mixture of lowercase and uppercase.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: Swith to lowercase in ISPF skeleton

Postby willy jensen » Fri Jul 12, 2024 12:34 pm

Pedros reply got me thinking that just blindly converting to lowercase might not be such a good idea. OMVS filenames are mixed case, so the user might actually want to have a mixture of upper- and lowercase in the name.
willy jensen
 
Posts: 467
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 70 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post