Dear all,
I have already written a program in JCL that is manipulating with two fields specified in the INCLUDE statement.
This is for one time usage. Now it needs to be automated, that is one or more times it needs to be executed.
The data will be coming in one dataset with those two fields alone. Now I want to read those two fields from the dataset and need to substitute in the existing program.
please help me in this. It will be very helpful for me if anyone do this.
Thanks in advance.
Reading data from a text file and manipulate in JCL
-
- Posts: 2
- Joined: Thu Aug 09, 2007 1:36 am
- Skillset: COBOL, JCL, DB2
- Referer: Internet
-
- Posts: 81
- Joined: Sat Jun 09, 2007 4:24 am
- Skillset: Some?
- Referer: mcmillan
- Location: Tucson AZ
Re: Reading data from a text file and manipulate in JCL
I have already written a program in JCL that is manipulating with two fields specified in the INCLUDE statement.
This is for one time usage. Now it needs to be automated, that is one or more times it needs to be executed.
The data will be coming in one dataset with those two fields alone. Now I want to read those two fields from the dataset and need to substitute in the existing program.
please help me in this. It will be very helpful for me if anyone do this.
You have written a program in "JCL"? OK(?)
"INCLUDE statement"?
Automated, like in "scheduler"?
"Those two fields"? Like in the "INCLUDE statement"?
You want to "read" those two fields? With what? JCL?
Existing program, written in "JCL"? Huh?
You must be more clear on your requirements, they make sense to you, but they do not explain what your requirements are to most of us.....
-
- Posts: 2
- Joined: Thu Aug 09, 2007 1:36 am
- Skillset: COBOL, JCL, DB2
- Referer: Internet
Reading data from a text file and manipulate in JCL
Hi,
I have a JCL program and the program processes with two fields namely "XX" and "YYYYY" in the given program.
Ex: INCLUDE COND=(01,02,CH,EQ,C'XX',AND,
03,05,CH,EQ,C'YYYYY')
Nowadays, I am directly substituting the values in the program on the appropriate place say 20 for XX and 34567 for YYYYY
and run the job.
In future, this task needs to be automated by the following requirement.
a)The values of XX and YYYYY will be coming in one data set.
b)When I run this job, it will automatically reads the data set and substitutes the appropriate values in XX and YYYYY and run for every record until reaches end of the record.
Please assist me in coding.
Thanks in advance.
I have a JCL program and the program processes with two fields namely "XX" and "YYYYY" in the given program.
Ex: INCLUDE COND=(01,02,CH,EQ,C'XX',AND,
03,05,CH,EQ,C'YYYYY')
Nowadays, I am directly substituting the values in the program on the appropriate place say 20 for XX and 34567 for YYYYY
and run the job.
In future, this task needs to be automated by the following requirement.
a)The values of XX and YYYYY will be coming in one data set.
b)When I run this job, it will automatically reads the data set and substitutes the appropriate values in XX and YYYYY and run for every record until reaches end of the record.
Please assist me in coding.
Thanks in advance.
- dick scherrer
- Global moderator
- Posts: 6268
- Joined: Sat Jun 09, 2007 8:58 am
Re: Reading data from a text file and manipulate in JCL
Hello,
Please post the jcl you have written.
Then post your "control" data (the 2 fields) and some sample data they should operate on.
Lastly, post what the expected outcome will be.
It will also be helpful if you mention the recfm and lrecl of the files.
Please post the jcl you have written.
Then post your "control" data (the 2 fields) and some sample data they should operate on.
Lastly, post what the expected outcome will be.
It will also be helpful if you mention the recfm and lrecl of the files.
Hope this helps,
d.sch.
d.sch.
- dick scherrer
- Global moderator
- Posts: 6268
- Joined: Sat Jun 09, 2007 8:58 am
Re: Reading data from a text file and manipulate in JCL
Hello,
The following quote is from the second post concerning this topic. I am deleting the second topic.
When adding information to your existing topic, simply "reply" to it as opposed to starting an entire new topic.
The following quote is from the second post concerning this topic. I am deleting the second topic.
Hi,
I have a JCL program and the program processes with two fields namely "XX" and "YYYYY" in the given program.
Ex: INCLUDE COND=(01,02,CH,EQ,C'XX',AND,
03,05,CH,EQ,C'YYYYY')
Nowadays, I am directly substituting the values in the program on the appropriate place say 20 for XX and 34567 for YYYYY
and run the job.
In future, this task needs to be automated by the following requirement.
a)The values of XX and YYYYY will be coming in one data set.
b)When I run this job, it will automatically reads the data set and substitutes the appropriate values in XX and YYYYY and run for every record until reaches end of the record.
Please assist me in coding.
Thanks in advance.
When adding information to your existing topic, simply "reply" to it as opposed to starting an entire new topic.
Hope this helps,
d.sch.
d.sch.
- Frank Yaeger
- Global moderator
- Posts: 1079
- Joined: Sat Jun 09, 2007 8:44 pm
- Skillset: DFSORT, ICETOOL, ICEGENER
- Referer: Search
- Contact:
Re: Reading data from a text file and manipulate in JCL
nvasanth_16,
You can use DFSORT Symbols to do that kind of thing. Here's an example:
SORTOUT would have:
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
http://www.ibm.com/servers/storage/supp ... tmpub.html
You can use DFSORT Symbols to do that kind of thing. Here's an example:
Code: Select all
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD * input file1
AABBBB
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN DD *
OPTION COPY
* Create DFSORT Symbols as follows:
* SYM1,'xx'
* SYM2,'yyyy'
* where xx is the value in positions 1-2 of the input record
* and yyyy is the value in position 3-6 of the input record
OUTFIL BUILD=(C'SYM1,''',1,2,C'''',80:X,/,
C'SYM2,''',3,4,C'''')
/*
//S2 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD * input file2
AABBBB RECORD 01
AACCCC RECORD 02
AABBBB RECORD 03
BBAAAA RECORD 04
/*
//SORTOUT DD SYSOUT=* output file
//SYSIN DD *
OPTION COPY
* Use SYM1 and SYM2 in the DFSORT INCLUDE statement.
INCLUDE COND=(1,2,CH,EQ,SYM1,AND,
3,5,CH,EQ,SYM2)
/*
SORTOUT would have:
Code: Select all
AABBBB RECORD 01
AABBBB RECORD 03
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
http://www.ibm.com/servers/storage/supp ... tmpub.html
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort