SYNCSORT Help



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

SYNCSORT Help

Postby reddy70 » Fri Sep 20, 2013 3:11 am

I am having issues in converting a packed decimal Julian Date to Gregorian Date.
The first field at pos 20 is packed decimal and in Julian format ..I want to display this as Gregorian format in the outfile .. please see the below details .. and please help me out how to do this in one step .. there are other fields also in the report we are generating..

OUTREC FIELDS=(01:20,6,PD,EDIT=(TTTT/TTTTT),
11:17,4,PD,EDIT=(TT:TT:TTT),
21:97,10,
33:25,4,BI,EDIT=(TTTTTTTT),
43:227,44,
89:301,44)

OUTFIL FILES=OUT,
01:' JULIAN ',
11:' TIME ',
21:'NODE NAME',
33:'CONDCODE ',
46:'FROM FILE NAME',
93:'TO FILE NAME',
/,
01:'--------',
11:'---------',
21:'----------',
33:'--------',
43:'--------------------------------------------',
89:'--------------------------------------------')

OUTPUT File is Like This:
JULIAN TIME
-------- ---------
2013/260 00:09:294
2013/260 00:13:011
2013/260 13:11:547
2013/260 13:12:094
reddy70
 
Posts: 4
Joined: Thu Sep 19, 2013 8:23 am
Has thanked: 1 time
Been thanked: 0 time

Re: SYNCSORT Help

 

Re: SYNCSORT Help

Postby BillyBoyo » Fri Sep 20, 2013 4:12 am

What version of SyncSort are you on?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: SYNCSORT Help

Postby reddy70 » Fri Sep 20, 2013 5:11 am

SYNCSORT FOR Z/OS 1.4.0.1R
reddy70
 
Posts: 4
Joined: Thu Sep 19, 2013 8:23 am
Has thanked: 1 time
Been thanked: 0 time

Re: SYNCSORT Help

Postby BillyBoyo » Fri Sep 20, 2013 1:49 pm

Have you looked at DT and DTNS in your documentation?

Please don't post the same question again. The duplicate has been deleted.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: SYNCSORT Help

Postby reddy70 » Fri Sep 20, 2013 5:37 pm

Yes .. but i want to unpack the PD and convert into Gregorian in the same step .. Can it be possible?
(01:20,6,PD,EDIT=(TTTT/TTTTT), This is giving me date 2013/260 . we want this date to display in mm/dd/yyyy format.
reddy70
 
Posts: 4
Joined: Thu Sep 19, 2013 8:23 am
Has thanked: 1 time
Been thanked: 0 time

Re: SYNCSORT Help

Postby BillyBoyo » Fri Sep 20, 2013 6:28 pm

 INREC IFTHEN=(WHEN=INIT,
               BUILD=(20,6,PD,TO=ZD,LENGTH=7,3X,
                      20,6,PD,EDIT=(TTTT/TTTTT),
                      17,4,PD,EDIT=(TT:TT:TTT),
                      97,10,
                      25,4,BI,EDIT=(TTTTTTTT),
                      227,44,
                      301,44),
       IFTHEN=(WHEN=INIT,
               OVERLAY=(1,7,Y4T,DT=(MD4/))


Try something like this. Untested, so fix it up yourself.

Unless you need to use OUTREC, use INREC.

Don't use FIELDS on INREC, OUTREC or OUTFIL (or OUTREC on OUTFIL). They are there for backwards compatibility only. Use BUILD instead.

You make things harder for yourself by specifying the columns on BUILD if all your fields are contiguous.

These users thanked the author BillyBoyo for the post (total 2):
reddy70 (Fri Sep 20, 2013 7:26 pm) • tivrfoa (Fri Sep 20, 2013 6:59 pm)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: SYNCSORT Help

Postby tivrfoa » Fri Sep 20, 2013 7:23 pm

BillyBoyo wrote:Don't use FIELDS on INREC, OUTREC or OUTFIL (or OUTREC on OUTFIL). They are there for backwards compatibility only. Use BUILD instead.

Thanks for mentioning this. Now I'm wondering if there's any difference in performance (I'll seach and make a test), or if it's just to use new capabilities.
I found this http://ibmmainframes.com/about16425.html where Frank mentioned that BUILD is just an alias for FIELDS, but the post is from 2006.
But in this post from 2010 http://ibmmainframes.com/about52530.html he mentioned that BUILD is preferred.
tivrfoa
 
Posts: 83
Joined: Wed Aug 22, 2012 6:35 pm
Has thanked: 58 times
Been thanked: 0 time

Re: SYNCSORT Help

Postby reddy70 » Fri Sep 20, 2013 8:12 pm

Thank you Billybo .. I really appreciate your help .. I tried this.. we are using the headers also .. I am getting errors

WER268A INREC STATEMENT : SYNTAX ERROR
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT

-------------------------------------


INREC IFTHEN=(WHEN=INIT,
              BUILD=(20,6,PD,TO=ZD,LENGTH=7,3X,
                     20,6,PD,EDIT=(TTTT/TTTTT),
                     17,4,PD,EDIT=(TT:TT:TTT),
                     97,10,
                     25,4,BI,EDIT=(TTTTTTTT),
                     227,44,
                     301,44,
                     157,8,BI,EDIT=(III,III,III),
                     165,4,BI,EDIT=(I,III,III,III),
      IFTHEN=(WHEN=INIT,
              OVERLAY=(1,7,Y4T,DT=MD4/))
HEADER2=(01:'ZY0000I0-N44',
         53:'xxxxxxxxxxxxxxxxxxxxxx',
        121:'PAGE:',
        127:&PAGE,
         /,
         56:xxxxxxxxxxxxxxxxx',
        113:'RUN DATE:',
        125:&DATE,
/,
01:' DATE ',
11:' TIME ',
21:'NODE NAME',
33:'CONDCODE ',
46:'FROM FILE NAME',
93:'TO FILE NAME',
35:'I/O BYTES',
47:'RECORD COUNT',
/,
01:'--------',
11:'---------',
21:'----------',
33:'--------',
43:'--------------------------------------------',

 89:'--------------------------------------------',
134:'-----------',
145:'--------------')


Code'd
reddy70
 
Posts: 4
Joined: Thu Sep 19, 2013 8:23 am
Has thanked: 1 time
Been thanked: 0 time

Re: SYNCSORT Help

Postby BillyBoyo » Fri Sep 20, 2013 8:18 pm

Good searching. I don't think there will be the slightest difference in performance. If Frank Yaeger said BUILD is an alias, it will mean that the identical code is processed as with FIELDS on INREC/OUTREC/OUTFIL.

SORT/MERGE FIELDS=

REFORMAT FIELDS=

Here FIELDS mean different things and are different to the FIELDS we are talking about. By not using FIELDS where there is an option not to, it just removes potential confusion.

OUTREC .... outrec stuff

OUTFIL OUTREC=

Again, removes confusion to use BUILD in place of OUTREC on OUTFIL.

Internally I imagine the processing is the same. It's just a question of clarity.

These users thanked the author BillyBoyo for the post:
tivrfoa (Sat Sep 21, 2013 4:09 am)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: SYNCSORT Help

Postby BillyBoyo » Fri Sep 20, 2013 8:22 pm

If that is your entire set of Control Cards, you need to specify a SORT, MERGE or OPTION COPY.

You can use SORT FIELDS=COPY, I prefer OPTION COPY, they do the same thing.

No SORT Control Cards should start in Column one.

HEADERn/TRAILERn are part of OUTFIL, so you need an OUTFIL.

I'm reminded by your error messages that this is SyncSort. What Frank Yaeger says applies to DFSORT. For SyncSort, it is up to how they implemented FIELDS/OUTREC/BUILD. I'd suspect in a similar manner, but have no clue.

These users thanked the author BillyBoyo for the post:
tivrfoa (Sat Sep 21, 2013 4:10 am)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post