Comparing files using syncsort and Cobol



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Re: COmparing files using syncsort and Cobol

Postby NicC » Fri Mar 22, 2013 9:51 pm

Well, that is a syncsort question for which there is a seperate section in the forum. However, in DFSORT there is a DATASORT option that allows sort to ignore headers and trailers. I do not know if SYNCSORT has the same facility.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: COmparing files using syncsort and Cobol

Postby tony1131 » Fri Mar 22, 2013 10:16 pm

Also I have a number like this 00-0000. the file being sent to me that needs to matched will be in this format 000000. Any ideas on how to exclude the dash?
tony1131
 
Posts: 12
Joined: Thu Mar 21, 2013 9:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: COmparing files using syncsort and Cobol

Postby Akatsukami » Fri Mar 22, 2013 10:22 pm

NicC wrote:Well, that is a syncsort question for which there is a seperate section in the forum. However, in DFSORT there is a DATASORT option that allows sort to ignore headers and trailers. I do not know if SYNCSORT has the same facility.

I believe that Syncsort for z/OS 1.3.2 and above have support for DATASORT.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: COmparing files using syncsort and Cobol

Postby dick scherrer » Fri Mar 22, 2013 10:23 pm

Hello,

Do you want a Syncsort solution or a COBOL solution?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: COmparing files using syncsort and Cobol

Postby tony1131 » Fri Mar 22, 2013 10:55 pm

Sorry, the header and trailer are naturally staying at the top and bottom now without me doing anything, didn't think it would. I didn't specify the generation of the file before which was making my header and trailer look weird. As for the dash, this is where I am a little uncertain. I was told that when the file is sent out it can't contain the dash. In the COBOL I will not be creating a new file just simply changing a value in FILEA. So this might be a stupid question, but can you somehow specify to exlude that dash in the JCL for the sorted output. Or is it within the cobol program?
tony1131
 
Posts: 12
Joined: Thu Mar 21, 2013 9:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: COmparing files using syncsort and Cobol

Postby BillyBoyo » Fri Mar 22, 2013 11:04 pm

You have to answer the questions asked before asking more, else we'll waste a lot of time.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: COmparing files using syncsort and Cobol

Postby tony1131 » Fri Mar 22, 2013 11:09 pm

didn't notice that the thread went to the second page until after i asked another question, sorry. As for dick scherrer's question, thats what I'm not sure about. Whether I can exclude the dash in jcl that does the syncsort and creates my output file, or if it is done in cobol.
tony1131
 
Posts: 12
Joined: Thu Mar 21, 2013 9:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: COmparing files using syncsort and Cobol

Postby enrico-sorichetti » Fri Mar 22, 2013 11:12 pm

You did not reply properly to the question asked
do You want HELP/SUGGESTIONS on a syncsort(1) or a cobol(2) solution ?

reply (1) or (2) nothing more nothing less!

You started telling that You were assigned the task of doing a file comparison in COBOL
You were given the link to a sample to do it
and it was pointed out that for proper file comparison both file had to be sorted on the compare key

just take a decision on how You want to proceed .
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: COmparing files using syncsort and Cobol

Postby tony1131 » Fri Mar 22, 2013 11:21 pm

As I mentioned above, I am doing both, but don't know if it's syncsort or cobol that would get rid of the dash in my output. So I can't answer that properly. I am using the outputted syncsort file in the cobol to compare. Please understand that I am very new at this.

If it makes it easier, I'll say that I'd prefer to Syncsort it so the output file doesnt have the dash. I a
tony1131
 
Posts: 12
Joined: Thu Mar 21, 2013 9:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: COmparing files using syncsort and Cobol

Postby enrico-sorichetti » Fri Mar 22, 2013 11:26 pm

being new to all this should not prevent You from using Your brain when posting

it wasn' t me/us who posted ...
they want me to do it using Cobol as practice
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

PreviousNext

Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post