Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to retrieve data from file into JCL?

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

New User


Joined: 17 Oct 2006
Posts: 32

PostPosted: Wed Mar 17, 2010 12:02 am    Post subject: How to retrieve data from file into JCL?
Reply with quote

Hi,

I have a file where I just have one record (With say Date of 8 bytes). I need this value as a JCL variable (say &DATE).

Is there any means where the value in the file can be sent to the JCL as variable?

Thanks,
Raghav
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1746
Location: Bloomington, IL

PostPosted: Wed Mar 17, 2010 12:07 am    Post subject:
Reply with quote

Read this fine thread.
Back to top
View user's profile Send private message
raghavendra_p_sarvade

New User


Joined: 17 Oct 2006
Posts: 32

PostPosted: Wed Mar 17, 2010 12:19 am    Post subject: Reply to: How to retrieve data from file into JCL?
Reply with quote

Hello!!

My requirement is that I have a file X which has 1 record in it.

********************* Top of Data ****************************
20100316
********************* Bottom of Data **************************

This file will be updated with the date everyday. I need this date value to be passed to the JCL Variable (&DATE).

Thanks,
Raghav
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Wed Mar 17, 2010 12:27 am    Post subject:
Reply with quote

Hello,

Did you read the topic in the link provided?

If not, do so now. It yes, post what you found that caused you to re-post the same question. . . icon_confused.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7932
Location: Bellevue, IA

PostPosted: Wed Mar 17, 2010 12:34 am    Post subject:
Reply with quote

Quote:
Is there any means where the value in the file can be sent to the JCL as variable?
Maybe -- or maybe not, depending upon exactly what you are wanting to do. Without more details, and your reading the previously posted link would be a good start, that's all the answer we can give you.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1239
Location: Richfield, MN, USA

PostPosted: Wed Mar 17, 2010 2:06 am    Post subject:
Reply with quote

What will your JCL do with this variable once it is "retrieved" from your file? Maybe the answer to that will point the way to a solution.
Back to top
View user's profile Send private message
santosh100678

New User


Joined: 21 Sep 2009
Posts: 55
Location: Kolkatta

PostPosted: Fri Mar 26, 2010 5:00 pm    Post subject:
Reply with quote

Hi,

Please tell me where you have to passed if you want to pass this date in query or file could you please give me the example
//J010 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//INFIL DD DSN=input date fiel ,DISP=SHR
//OUTFIL DD DSN=outputdate file,DISP=(,PASS,DELETE),
// UNIT=WORK,SPACE=(TRK,(5,5),RLSE),
// DCB=(LRECL=1020,RECFM=VB,BLKSIZE=2036)

//SYSIN DD *
REPRO INFILE(INFIL) OUTFILE(OUTFIL) -
FROMKEY('key value') COUNT(1)

//S010 EXEC PGM=SORT,COND=(0,NE)
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=workfilestepj010 input file,DISP=SHR
//SORTOUT DD DSN=create file final ,DISP=(,CATLG,DELETE),
// UNIT=WORK,SPACE=(TRK,(3000,750),RLSE),

//sysin dd *
SORT FIELDS=COPY

INCLUDE COND=(5,9,CH,EQ,C'key value',AND,29,2,CH,EQ,C'IA')

OUTREC FIELDS=(1:C'AND S.LAST_UPD_TS >= TIMESTAMP(',C'''',

C'20',47,2,C'-',41,2,C'-',44,2,C'-00.00.00'') - 12 HOURS',C';',

15X),VTOF


please post you clear requirement
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
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us