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

How to write a file getting input from a symbolic parameter?


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

New User


Joined: 05 Dec 2007
Posts: 82
Location: chennai

PostPosted: Wed Jul 30, 2008 12:59 pm
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
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Jul 30, 2008 1:03 pm
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

New User


Joined: 05 Dec 2007
Posts: 82
Location: chennai

PostPosted: Wed Jul 30, 2008 1:10 pm
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: 2358
Location: Israel

PostPosted: Wed Jul 30, 2008 1:16 pm
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: 8797
Location: Welsh Wales

PostPosted: Wed Jul 30, 2008 1:21 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Jul 30, 2008 1:42 pm
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

New User


Joined: 05 Dec 2007
Posts: 82
Location: chennai

PostPosted: Wed Jul 30, 2008 2:05 pm
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: 42
Location: USA

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

See the links listed below from the DFSORT Forum:

ibmmainframes.com/viewtopic.php?t=32471

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

DFSORT Developer


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

PostPosted: Thu Jul 31, 2008 12:53 am
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:

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: 1702
Location: Australia

PostPosted: Thu Jul 31, 2008 3:58 am
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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jul 31, 2008 5:44 am
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
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top