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: 32
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: 32
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: 1592
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Passing Parameters to Programs Invoke... PL/I & Assembler 5
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
Search our Forums:

Back to Top