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

Syncsort - Total of header record.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
piyushksah

New User


Joined: 15 Dec 2008
Posts: 10
Location: INDIA

PostPosted: Tue Jan 06, 2009 12:23 pm
Reply with quote

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.

detail of the input file is.
RECFM=VB
LRECL=421

Code:

  SORT FIELDS=COPY                                                   
  OUTFIL REMOVECC,                                                   
    IFTHEN=((WHEN=(30,1,CH,EQ,C'1')),                                 
    SECTIONS=(25,2,SKIP=0L,                                           
    TRAILER3=(1:X'00000C',4:X'000C',6:C'100  ',11:10X'00',21:25,2,   
             23:X'00000C',26:C'0',27:14X'00',41:C'0',                 
             42:COUNT=(TO=PD,LENGTH=2),44:368X'00')))   


it is showing some logical operator error. i have to make changes only when it is a header record could any one help me regarding this

thanks
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: Tue Jan 06, 2009 8:56 pm
Reply with quote

Hello,

Quote:
could any one help me regarding this

Quote:
Please show an example of the records in the input file (relevant fields only)
You need to post some example data as requested. . .
Back to top
View user's profile Send private message
piyushksah

New User


Joined: 15 Dec 2008
Posts: 10
Location: INDIA

PostPosted: Wed Jan 07, 2009 9:48 am
Reply with quote

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')),
*

IFTHEN=(WHEN=(30,1,CH,EQ,C'1',
SECTIONS=(25,2,SKIP=0L,
*
INCLUDE/OMIT INVALID LOGICAL OPERATOR


if this is clear at some extent then please help..
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 Jan 07, 2009 10:03 am
Reply with quote

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. . .
Back to top
View user's profile Send private message
piyushksah

New User


Joined: 15 Dec 2008
Posts: 10
Location: INDIA

PostPosted: Wed Jan 07, 2009 11:11 am
Reply with quote

input file:

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
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Jan 07, 2009 11:19 am
Reply with quote

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"
Back to top
View user's profile Send private message
piyushksah

New User


Joined: 15 Dec 2008
Posts: 10
Location: INDIA

PostPosted: Wed Jan 07, 2009 11:21 am
Reply with quote

Code:
SYSIN :                                                               
  SORT FIELDS=COPY                                                     
  OUTFIL REMOVECC,                                                     
    IFTHEN=((WHEN=(30,1,CH,EQ,C'1')),                                 
            *                                                         
    SECTIONS=(25,2,SKIP=0L,                                           
    TRAILER3=(1:X'00000C',4:X'000C',6:C'117  ',11:10X'00',21:25,2,     
             23:X'00000C',26:C'0',27:14X'00',41:C'0',                 
             42:COUNT=(TO=PD,LENGTH=2),44:368X'00')))                 
WER268A  OUTFIL STATEMENT  : SYNTAX ERROR                             
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE


Edited: Please use BBcode when You post some code, that's rather readable, Thanks...Anuj
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Jan 07, 2009 11:24 am
Reply with quote

Piyush,

The error message indicates that you use SyncSort and NOT DFSORT. Please be aware that SyncSort questions are discussed in the JCL forum.
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 Jan 07, 2009 11:42 am
Reply with quote

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 icon_smile.gif

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.

Good luck icon_smile.gif
Back to top
View user's profile Send private message
piyushksah

New User


Joined: 15 Dec 2008
Posts: 10
Location: INDIA

PostPosted: Wed Jan 07, 2009 3:23 pm
Reply with quote

hi all
Thanks for all your help,
netx time onwards i will try to post the proper explanation of my question.
thanks,
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Jan 07, 2009 4:49 pm
Reply with quote

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". icon_smile.gif
Back to top
View user's profile Send private message
piyushksah

New User


Joined: 15 Dec 2008
Posts: 10
Location: INDIA

PostPosted: Thu Jan 08, 2009 8:03 am
Reply with quote

The problem is yet not solved ,..
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: Thu Jan 08, 2009 9:03 am
Reply with quote

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.
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top