First of all sorry for late replying actually my query is like this. total up the header record for each state and create a type 0 record which will contain the total bank header record for the state there will be a type 0 record per state .a type 4 record,tape trailer record will be created for each state .this will use to indicate end of tape for a state.
i have written this card,which is working fine accorind to my requirement but only problem is that it is not working for the header record condition in IFTHEN=((WHEN=(30,1,CH,EQ,C'1')) which determine the header record.
hi,
I am trying to explaing once again..
sorry if i am not able to make u understand the question.
required rec to be change/use are like this
STATE PIC X(02) position 24(for which i am cheking
RPT-NBR PIC X(05) position 9(in which i am moving 100)
01 RECORD-TYPE PIC X(01). position 29 bank header record
88 MIT-HDR VALUE '0'.
88 BANK-HDR VALUE '1'.
88 BANK-DTL VALUE '2'.
88 BANK-TLR VALUE '3'.
88 XMIT-TLR VALUE '4'.
BANKID1 PIC S9(05) COMP-3 position 4
BANKID2 PIC S9(05) COMP-3 position 26
could is this be somewhat clear.
my problem is this i have to change other filed also.
but only porblem is with the condition that i am using IFTHEN=((WHEN=(30,1,CH,EQ,C'1'))
sometime it is showing syntax error
and some time it is showing
OUTFIL STATEMENT : SYNTAX ERROR
IFTHEN=((WHEN=(30,1,CH,EQ,C'1')),
*
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
Hi Piyush,
Please keep in mind that not everyone here speaks COBOL. . .
You will receive much more help (and more quickly) if you post some sample input records and the output you want from those records. Something like:
Code:
Input:
aaabbccccdddeeefff
111223333444555666
Output:
aaabbccccdddeeefff
111223333444555666xx
These show 2 input and 2 output records and the second output has the "xx" added due to some rule. . . If you post some representative data that demonstrates your requirement, it will be much easier (or even possible) to help you.
Your explanation mentions positon 29, but your sample code mentions 30? What are you tryiing to accomplish with the SECTIONS code? We need to see how you want the records processed. . .
if 29th position is 1 then
ouput file edited with some changes othewise output will be same.
also if 29th position is 1 and 24th position is not same is the previous record
then the rule is apply for change
Code:
position: 12345678901234567890123456789012345678901234567890
123 AB 1 2
120 TT 1 1
output file:
position: 12345678901234567890123456789012345678901234567890
123 AB 1 1
00000 100 TT000000
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Piyush,
Learn to use the "Code" tag provided here which preserves the alignment.
And there's a "Preview" button to make sure the post comes in intended format before you do a final "Submit"
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
Hello,
Quote:
sorry if i had taken too much of your time ..thing is i am new to mainframe also
Not to worry - we all had to learn when we began
Your topic has been moved to the JCL part of the forum.
Suggest you "practice" using the "Code" tag. This is most helpful for jcl, code of many languages, data, and informaton from a screen (Please do not use screen shots, but rather copy/paste/"Code" to show info from a terminal). I've "Code"d your recent posts, but you can do this yourself with very little practice. After you have build a post, use Preview to see how your post will appear to the forum, rather than how it appears in the Reply Editor. When you are satisfied with your post, Submit.
Someone will be here if there are questions or problems. If you make a major mistake and want to have it corrected, let us know and we'll correct or remove as you wish.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Piyush,
Did you get this working? If not still you can post here a simple explanantion of your original requirement with a few sample input records and the expected output using "Code" tag, covering all possible scenarios. You dont have to wait till "next time".
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
Hi Piyush,
Please repost sample input and expected output along with the "rules". It is not clear from the previous posts what the rules are and a bit more input and output data would help us help you. Make sure the rules are consistent (the code agreeing with the statements describing the process) and the data covers all conditions.
I've deleted several replies that only served to increase the length of the topic. Once we have a better understanding of the requirement, i'll clean out some more.