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

How to retrieve data from file into JCL?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 1788
Location: Bloomington, IL

PostPosted: Wed Mar 17, 2010 12:07 am
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
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

Moderator Emeritus


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

PostPosted: Wed Mar 17, 2010 12:27 am
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Mar 17, 2010 12:34 am
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: 1249
Location: Richfield, MN, USA

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

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top