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

Parsing %%variables from a member


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 1702
Location: Australia

PostPosted: Thu Mar 18, 2010 4:21 pm
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
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: 1702
Location: Australia

PostPosted: Thu Mar 18, 2010 6:03 pm
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: 1702
Location: Australia

PostPosted: Fri Mar 19, 2010 8:06 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Parsing Large JSON file using COBOL COBOL Programming 4
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
No new posts parsing variable length/position data... DFSORT/ICETOOL 5
No new posts Searching for a member but don't know... TSO/ISPF 6
No new posts Looking For a PDS Member Without Open... PL/I & Assembler 10
Search our Forums:

Back to Top