I have an input file where i need the values of only certain fields to be updated by fetching the system date,remaining should be the same.
INPUT FILE:
%XMITIP (abc@gmail.COM xyz@gmail.COM) +
from someone@gmail.com +
replyto someone@gmail.com +
SUBJECT 'REPORTS' +
FILE ( 'DDPCN.INPUT.CA.REPORT' +
'DDPCN.INPUT.HI.REPORT' )
FILENAME (CA3QTR13A111.TXT +
HI3QTR13A111.TXT +
MSGDD MSG
format txt/text/9///no
here in CA3QTR13A111
1) 13 is the year ie :(2013)
this value should change for every year..this value shoud be fetched from system date.
2) 3 is the Quarter. the logic for quarter is :
IF MONTH IS = ' 1' ' 2' ' 3'
THEN OUTPUT SHOULD BE -----4
IF MONTH IS = ' 4' ' 5' ' 6'
THEN OUTPUT SHOULD BE -----1
IF MONTH IS =' 7' ' 8' ' 9'
THEN OUTPUT SHOULD BE -----2
IF MONTH IS ='10' '11' '12'
THEN OUTPUT SHOULD BE -----3
this should get updated in the output file accourdingly
OUTPUT FILE :
IF THE YEAR IS--- 2013 and month is 2--then output should be
%XMITIP (abc@gmail.COM xyz@gmail.COM) +
from someone@gmail.com +
replyto someone@gmail.com +
SUBJECT 'REPORTS' +
FILE ( 'DDPCN.INPUT.CA.REPORT' +
'DDPCN.INPUT.HI.REPORT' )
FILENAME (CA4QTR13A111.TXT +
HI4QTR13A111.TXT +
MSGDD MSG
format txt/text/9///no
IF THE YEAR IS--- 2014-and month is 8 -then output should be
%XMITIP (abc@gmail.COM xyz@gmail.COM) +
from someone@gmail.com +
replyto someone@gmail.com +
SUBJECT 'REPORTS' +
FILE ( 'DDPCN.INPUT.CA.REPORT' +
'DDPCN.INPUT.HI.REPORT' )
FILENAME (CA2QTR14A111.TXT +
HI2QTR13A111.TXT +
MSGDD MSG
format txt/text/9///no
[/img][/list][/list][/code]
jcl code to change certain values in the o/p file.
Moderators: Frank Yaeger, DikDude, Moderator Group
Hopefully, you realize that JCL cannot do this . . .
JCL Can control the execution of some program to do this. The program might be your sort product, some other utility, or code you have written to do this.
Your e-mail info appears to have unmatched parenthesis.
As all of the "input" is a literal (except the date related info), why not build the entire e-mail control text rather than read it?
JCL Can control the execution of some program to do this. The program might be your sort product, some other utility, or code you have written to do this.
Your e-mail info appears to have unmatched parenthesis.
As all of the "input" is a literal (except the date related info), why not build the entire e-mail control text rather than read it?
Have a good one
As DikDude mentioned it can't be done thru JCL, but can be done using Sort.
Step 1. INREC - in inrec overlay the date (after the data texts) to the particular lines where you wanted to update few positions.
Step 2. OUTREC - in outrec, overlay the need position's charaters by validating the system date value (using ifthen when).
Hope this may help, if you don't get the needed result or finding difficulties somewhere please revert back with your code/result so far you have tried.
Thanks!
Step 1. INREC - in inrec overlay the date (after the data texts) to the particular lines where you wanted to update few positions.
Step 2. OUTREC - in outrec, overlay the need position's charaters by validating the system date value (using ifthen when).
Hope this may help, if you don't get the needed result or finding difficulties somewhere please revert back with your code/result so far you have tried.
Thanks!
Guru:-)
You're never fully dressed without a smile
You're never fully dressed without a smile
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page