IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Trim values of parameters in JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mahsa Rouzkhatouni

New User


Joined: 27 Feb 2021
Posts: 28
Location: Germany

PostPosted: Sat Mar 27, 2021 1:51 pm
Reply with quote

Hi everybody,

Is it possible to limit the number of characters that each variable returns in JCL?

To be more clear, I want to define a dataset name that has 6 variable qualifiers which will be substituted with the values. But the number of characters exceed 44 resulting in RC=8.

Code:
 DSN=UNLD.&DB..&TS..D&JDATE..T&TIME..P&PA.


Is there any way to only get the last 2 characters of for example &PA which is partition number?

Thanks in advance,
Mahsa Rouzkhatouni
Back to top
View user's profile Send private message
Mahsa Rouzkhatouni

New User


Joined: 27 Feb 2021
Posts: 28
Location: Germany

PostPosted: Sat Mar 27, 2021 2:31 pm
Reply with quote

Quote:
only get the last 2 characters of &PA


Nevermind, I found out. I have to write it this way :

Code:
 DSN=UNLD.&DB..&TS..D&JDATE..T&TIME..P&PA(3,2).
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1590
Location: Andromeda Galaxy

PostPosted: Sat Mar 27, 2021 3:19 pm
Reply with quote

Glad you figured it out yourself

Rather 3,2 I would recommend to use (-2:2) as it is backward counting would be ideal
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Combining Multiple Row Values into Si... DB2 3
No new posts Alter User LOGON Script Parameters CLIST & REXX 11
No new posts a copybook getting improper values in... COBOL Programming 7
No new posts JDBC Driver -Default Values DB2 1
No new posts Modify the shareoptions of VSAM in De... CLIST & REXX 30
Search our Forums:

Back to Top