Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
How to write a file getting input from a symbolic parameter?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
lanand_hps

Active User


Joined: 05 Dec 2007
Posts: 59
Location: chennai

PostPosted: Wed Jul 30, 2008 12:59 pm    Post subject: How to write a file getting input from a symbolic parameter?
Reply with quote

Hi,
I have 2 requirements.


1) My first requirement is to write a value of symbolic parameter into a file.
// SET TIMESTMP='2008-07-25-08.16.11.655180'
i need to write a file with this timestamp value. How do we do it?

2) Can we use symbolic parameter in a control card with SQL statement?
I've a query like
DELETE FROM TABLE_A
WHERE TIMESTAMP = &TIMESTMP (from jcl)
I read few forums which explains that this is not possible.

Please post your suggestions.
Back to top
View user's profile Send private message
References
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 1930
Location: Israel

PostPosted: Wed Jul 30, 2008 1:03 pm    Post subject:
Reply with quote

1. You can move the symbolic using PARM to REXX/COBOL or any programming language as parameter, and SAY/DISPLAY/WRITE it.
2. No. You can not use symbolic parameters in input data.

O.
Back to top
View user's profile Send private message
lanand_hps

Active User


Joined: 05 Dec 2007
Posts: 59
Location: chennai

PostPosted: Wed Jul 30, 2008 1:10 pm    Post subject:
Reply with quote

Can we not write a file using sort getting values from JCL? Seems strange.

// SET TIMESTMP='2008-07-25-08.16.11.655180'
//STEP01 EXEC PGM=SORT
//SORTIN DD * (i want to use symbolic here to get the above value)
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS =COPY
/*

No way that we can do this?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 1930
Location: Israel

PostPosted: Wed Jul 30, 2008 1:16 pm    Post subject:
Reply with quote

Well, if you don't believe me, you are more then welcome to consult the fine manual (see bullet #5).

O.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 3509
Location: Brussels once more ...

PostPosted: Wed Jul 30, 2008 1:21 pm    Post subject:
Reply with quote

Or even try it for yourself to see what z/OS has to say.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 3081
Location: italy

PostPosted: Wed Jul 30, 2008 1:42 pm    Post subject: Reply to: How to write a file getting input from a symbolic
Reply with quote

check the usage of EZACFSM1 on how to carry on substitutions of parameters
Back to top
View user's profile Send private message
lanand_hps

Active User


Joined: 05 Dec 2007
Posts: 59
Location: chennai

PostPosted: Wed Jul 30, 2008 2:05 pm    Post subject:
Reply with quote

Thanks everyone..
I didnot mean to question the points.. just wanted to put my thought in a different way..

Thanks guys..
Back to top
View user's profile Send private message
Suresh Shankarakrishnan

New User


Joined: 11 Jul 2008
Posts: 22
Location: USA

PostPosted: Wed Jul 30, 2008 11:43 pm    Post subject:
Reply with quote

See the links listed below from the DFSORT Forum:

http://ibmmainframes.com/viewtopic.php?t=32471

http://ibmmainframes.com/viewtopic.php?t=32443
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 4579
Location: San Jose, CA

PostPosted: Thu Jul 31, 2008 12:53 am    Post subject:
Reply with quote

DFSORT can use System symbols like &YR4, but it cannot use SET symbols. For example, you could do this:

Code:

...
//SYMNAMES DD *
CUR_YEAR,S'&YR4'
//SYSIN DD *
   OPTION COPY
   INREC BUILD=(CUR_YEAR)
/*


For more information on the use of system symbols with DFSORT, see:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/7.4.2?DT=20060615185603
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 653

PostPosted: Thu Jul 31, 2008 3:58 am    Post subject:
Reply with quote

Hi,

why not just build a file with the information required and then concatenate this file in whatever DDNAME this information is required in.


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

Global Moderator


Joined: 23 Nov 2006
Posts: 8638
Location: 221 B Baker St

PostPosted: Thu Jul 31, 2008 5:44 am    Post subject:
Reply with quote

Hi Gerry,

Quote:
why not just build a file with the information required and then concatenate
Because that could reduce resource consumption and the more resources a job uses, the more important/valuable that job must be icon_wink.gif

Or (as i've shamelessly mentioned in other topics) someone is related to the person who sells/leases the hardware.

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