Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Syncsort - Total of header record.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Syncsort - Total of header record.
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

Site Director


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

PostPosted: Tue Jan 06, 2009 8:56 pm    Post subject:
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    Post subject: Reply to: Total of header record.
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

Site Director


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

PostPosted: Wed Jan 07, 2009 10:03 am    Post subject:
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    Post subject:
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: 2276
Location: @my desk

PostPosted: Wed Jan 07, 2009 11:19 am    Post subject:
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    Post subject:
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: 2276
Location: @my desk

PostPosted: Wed Jan 07, 2009 11:24 am    Post subject:
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

Site Director


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

PostPosted: Wed Jan 07, 2009 11:42 am    Post subject:
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    Post subject:
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: 2276
Location: @my desk

PostPosted: Wed Jan 07, 2009 4:49 pm    Post subject:
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    Post subject:
Reply with quote

The problem is yet not solved ,..
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Thu Jan 08, 2009 9:03 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts DSNACCOX (can it be run on 1 db/ts, t... SRICOBSAS DB2 3 Sat May 06, 2017 12:59 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us