need to convert the following code to syncsort



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

need to convert the following code to syncsort

Postby ycflotildes » Mon Jul 28, 2008 1:57 pm

Hi,

Just found the below code from smart DFSORT Tricks manual. However, I cannot execute it since I am using syncsort. Can anyone convert the following code to use syncsort? Thanks!

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FB/n)
//SORTOUT DD DSN=... output file (FB/8)
//SYSIN DD *
OPTION COPY
INREC PARSE=(%=(ENDAT=C'COPY'),
%00=(STARTAFT=BLANKS,FIXLEN=8)),
BUILD=(%00)
//
ycflotildes
 
Posts: 5
Joined: Mon Jul 28, 2008 12:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: need to convert the following code to syncsort

Postby dick scherrer » Mon Jul 28, 2008 10:11 pm

Hello,

Which release of Syncsort is used on your system?

If you are not sure, run any Syncsort step and post the release info from the printed output.
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: need to convert the following code to syncsort

Postby ycflotildes » Tue Jul 29, 2008 7:21 am

Hi,

Is this what you're asking for?

SYNCSORT FOR Z/OS 1.2.2.2R

Thanks!
ycflotildes
 
Posts: 5
Joined: Mon Jul 28, 2008 12:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: need to convert the following code to syncsort

Postby dick scherrer » Tue Jul 29, 2008 7:53 am

Hello,

Yes, that is what i was looking for. . . Your system is not running the most current release of Syncsort (1.3).

PARSE is not supported in the release you are using.
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: need to convert the following code to syncsort

Postby ycflotildes » Tue Jul 29, 2008 8:06 am

Are there other ways to do it without using parse?
ycflotildes
 
Posts: 5
Joined: Mon Jul 28, 2008 12:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: need to convert the following code to syncsort

Postby dick scherrer » Tue Jul 29, 2008 8:37 am

Hello,

Please post some sample input and the output you want when that input is processed.
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: need to convert the following code to syncsort

Postby ycflotildes » Tue Jul 29, 2008 8:43 am

I ran a search and my search result looks something like this.

ASDF ASDFS COPY SDFSGWER
ASDF COPY SDFSGWSD
ASDF COPY SDFSGWAC
COPY SDFSGWSE
SDFSSDF COPY SDFSGWSD
SDF COPY SDFSGWAR

The copybook names appear in different positions. I want to find each copybook name after 'COPY ' and extract it to the output file so I end up with just the list of copybook names like this:
SDFSGWER
SDFSGWSD
SDFSGWAC
SDFSGWSE
SDFSGWSD
SDFSGWAR

How is this done with syncsort without using the parse function? Thanks!
ycflotildes
 
Posts: 5
Joined: Mon Jul 28, 2008 12:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: need to convert the following code to syncsort

Postby dick scherrer » Tue Jul 29, 2008 9:04 am

Hello,

Maybe someone will post a way to do this with the sort but without parse. . . I'm not aware of a way.

Keep in mind that this is a fairly easy bit of cobol code (not so very long ago, there was no parse function in a sort product, so people wrote the code).
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: need to convert the following code to syncsort

Postby ycflotildes » Tue Jul 29, 2008 9:20 am

do you know how can this be written in cobol code? thanks!
ycflotildes
 
Posts: 5
Joined: Mon Jul 28, 2008 12:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: need to convert the following code to syncsort

Postby dick scherrer » Tue Jul 29, 2008 11:55 am

Hello,

Set up a loop using reference modification and parse the data looking for "COPY ".

When "COPY " is found, increment the starting position by 6 (to get past the literal) and enter a second loop to move characters until a blank (or other terminator - say a period) is encountered.
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


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post