Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Parsing %%variables from a member

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Xavier Miret

New User


Joined: 17 Mar 2010
Posts: 2
Location: Barcelona

PostPosted: Thu Mar 18, 2010 3:49 pm    Post subject: Parsing %%variables from a member
Reply with quote

Hi,

I have some problems when trying to retrieve data from a member within a JCL. Brief:

We have both a member with variables names, and a JCL "template".

The member looks like this:

%%name=Xavi
%%surname=Miret
%%occupation=Programmer
%%hobbies=IT programming
...

And the JCL template includes the member as A LIBRARY as follows, and is planified by CTRL-M.

%%LIBSYM memberPDS %%MEMSYM member

Once I submit the job I don't have any problems working with the first three variables, but the fourth one (hobbies) never takes IT programming, but only "IT". It reads only until first found white space (so "programming" is never printed).

I am quite unexperienced in JCL specs. ¿ Is it possible to get the whole sentence "IT programming" from the member's variable ? I can't modify the member, I have only access to the way I retrieve the variables.


This might be a very silly question, but I have already checked for a while and haven't found anything about it, my colleagues keep telling me it is possible using some kind of weird quotes combination, but I am not able to find it - and they, of course, aren't able to remember it... -

Thanks,

Xavi
Back to top
View user's profile Send private message

gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Mar 18, 2010 4:21 pm    Post subject:
Reply with quote

Hi,

why can't you modify the member ?

or modify the JCL and where %%HOBBIES is used just follow it with programming

ie %%HOBBIES programming


Gerry
Back to top
View user's profile Send private message
Xavier Miret

New User


Joined: 17 Mar 2010
Posts: 2
Location: Barcelona

PostPosted: Thu Mar 18, 2010 5:58 pm    Post subject:
Reply with quote

Hi,

Mmm... now that you mention it... I could modify the member within the JCL once it has been submitted, but I can't modify it by hand.

That is because the member with the variables is generated dinamically. We know which variables will it contain, but we don't know which values are assigned to them until we are executing the JCL.

The whole process:

1. Application takes parameters from a web page introduced by a user (variable=value)
2. Application makes a member with those parameters.
%%variable1=value1
%%variable2=value2
...
3. Application decides which JCL template needs and generates a JOB to planify.
4. Application planifies the JOB.


I don't have access to most of the application code. I can only modify the JCL template. In which I decide which steps to execute, and where to place the variables.

But when I reference any variable with a value with white spaces, for example a description, it truncs its value to the first white space, so the JCL works with a truncated value.

Thx,

Xavi
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Mar 18, 2010 6:03 pm    Post subject:
Reply with quote

Hi,

ensure the member with the variables is generated correctly.



Gerry
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Mar 19, 2010 8:06 am    Post subject:
Reply with quote

Hi,

the member should be set up in this manner
Code:
%%SET %%HOBBIES=IT%%BLANK%%.programming



Gerry
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Need help how to pass the ESP variabl... Venkichaitu JCL & VSAM 12 Thu Nov 02, 2017 3:53 am
No new posts INREC PARSING and dictionary items migusd SYNCSORT 6 Fri Jun 02, 2017 8:02 pm
No new posts member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm
No new posts Browsing member from any PDS shiitiizz CLIST & REXX 7 Wed Mar 08, 2017 1:17 am
No new posts Bind plan as a member to another bind... rexx77 DB2 0 Thu Feb 16, 2017 2:02 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us