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 - Format EDIT limit in SORT
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
nareshdacha

New User


Joined: 12 Jan 2010
Posts: 66
Location: US

PostPosted: Tue Sep 07, 2010 10:31 am    Post subject: Syncsort - Format EDIT limit in SORT
Reply with quote

Hi,
My input file is :
20100901021430|TESTING TESTING 123|1234567890123456
20100901031531|TESTING TESTING 234|-123456789012345
20100901031531|TESTING TESTING 234|-123456745345345
20100901041531|TESTING TESTING 345|1297977890123456

Output file:
20100901021430TESTING TESTING 123+1234567890123456
20100901031531TESTING TESTING 234-123456789012345
20100901031531TESTING TESTING 234-123456745345345
20100901041531TESTING TESTING 345+1297977890123456

Sort card:
SORT FIELD=COPY
INREC PARSE=(%00=(ENDBEFR=C'|',FIXLEN=14),
%01=(ENDBEFR=C'|',FIXLEN=100),
%02=(FIXLEN=17)),
BUILD=(%00,%01,%02)
OUTREC BUILD=(1,14,UFF,M11,LENGTH=14,
15,100,
115,17,SFF,EDIT=(STTTTTTTTTTTTTTTT),SIGNS=('+','-'))

1st field is 14 digits, number(14)
2nd field 100 characters(100)
3rd fled sign leading value(17)
This is working fine for 3rd fled sign leading value(17).

I have changed to length of the 3rd field to 18.

INREC PARSE=(%00=(ENDBEFR=C'|',FIXLEN=14),
%01=(ENDBEFR=C'|',FIXLEN=100),
%02=(FIXLEN=18)),
BUILD=(%00,%01,%02)
OUTREC BUILD=(1,14,UFF,M11,LENGTH=14,
15,100,
115,18,SFF,EDIT=(STTTTTTTTTTTTTTTTT),SIGNS=('+','-'))

In this case its not working... output is:
20100901021430TESTING TESTING 123+1234567890123456
20100901031531TESTING TESTING 234+123456789012345
20100901031531TESTING TESTING 234+123456745345345
20100901041531TESTING TESTING 345+1297977890123456

It provided the output as all the postitve values for 3rd field....
Is the 17 length(including sign) is the limit in SORT or am i missing anything here.... Please suggest....
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Sep 08, 2010 12:49 am    Post subject:
Reply with quote

When I run your job with DFSORT using 18 instead of 17, I do get the positive and negative values, like this:

Code:

20100901021430TESTING TESTING 123 ... +01234567890123456
20100901031531TESTING TESTING 234 ... -00123456789012345
20100901031531TESTING TESTING 234 ... -00123456745345345
20100901041531TESTING TESTING 345 ... +01297977890123456


So I can't tell what you're doing differently. Please post the //SYSOUT messages from both runs.

BTW, you don't need INREC and OUTREC to do this. You can just use an INREC statement like this:

Code:

   INREC PARSE=(%00=(ENDBEFR=C'|',FIXLEN=14),                 
                %01=(ENDBEFR=C'|',FIXLEN=100),               
                %02=(FIXLEN=18)),                             
   BUILD=(%00,UFF,M11,LENGTH=14,                             
          %01,                                               
          %02,SFF,EDIT=(STTTTTTTTTTTTTTTTT),SIGNS=('+','-')) 


Quote:
Is the 17 length(including sign) is the limit in SORT


No, it isn't.
Back to top
View user's profile Send private message
nareshdacha

New User


Joined: 12 Jan 2010
Posts: 66
Location: US

PostPosted: Wed Sep 08, 2010 3:32 pm    Post subject: Reply to: Format EDIT limit in SORT
Reply with quote

Thanks Frank for the suggestion...

Could you please check in the below scenario....


Input:

20100901021430|TESTING TESTING 123|12345678901234567
20100901031531|TESTING TESTING 234|-12345678901234567
20100901031531|TESTING TESTING 234|-12345674534534577
20100901041531|TESTING TESTING 345|12979778901234567

Am getting the below output:

20100901021430TESTING TESTING 123 +00123456789012345
20100901031531TESTING TESTING 234 +00123456789012345
20100901031531TESTING TESTING 234 -00123456745345345
20100901041531TESTING TESTING 345 +00129797789012345


Required Output:

20100901021430|TESTING TESTING 123|+12345678901234567
20100901031531|TESTING TESTING 234|-12345678901234567
20100901031531|TESTING TESTING 234|-12345674534534577
20100901041531|TESTING TESTING 345|+12979778901234567



SORTCARD:


SORT FIELDS=COPY
INREC PARSE=(%00=(ENDBEFR=C'|',FIXLEN=14),
%01=(ENDBEFR=C'|',FIXLEN=20),
%02=(FIXLEN=18)),
BUILD=(%00,UFF,M11,LENGTH=14,
%01,
%02,SFF,EDIT=(STTTTTTTTTTTTTTTTT),SIGNS=('+','-'))


I need 3rd field length as 18 (sign + 17 digits)... Please suggest...
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Sep 08, 2010 10:44 pm    Post subject:
Reply with quote

I'm going to take an educated guess that your input is different than it appears in your example. You aren't using BBCode tags so it's difficult to see what your input really looks like, but I'm guessing that there are blanks between the | and third number, e.g. |bb12345678901234567. That would explain the output you get because FIXLEN=18 would NOT give you all of the digits if there are blanks before them.

Try using:

Code:

             %02=(FIXLEN=25)),     


That should give you all of the digits instead of truncating them. See if that gives you the output you want.

And please learn to use BBCode tags.
Back to top
View user's profile Send private message
nareshdacha

New User


Joined: 12 Jan 2010
Posts: 66
Location: US

PostPosted: Thu Sep 09, 2010 4:22 pm    Post subject: Reply to: Format EDIT limit in SORT
Reply with quote

Code:

20100901021430|TESTING TESTING 123|12345678901234567
20100901031531|TESTING TESTING 234|-12345678901234567
20100901031531|TESTING TESTING 234|-12345674534534577
20100901041531|TESTING TESTING 345|12979778901234567


There are no spaces in the 3rd field
"12345678901234567" (17 digits),
"-12345678901234567" (sign + 17 digits)

Frank, i can't use the length 25 because output of this SORT step will be given to next step which is a productionised. Hence i consdered the length as 18 (sign + 17 digits)...Please suggest...
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Sep 09, 2010 10:20 pm    Post subject:
Reply with quote

Using FIXLEN=25 has no effect on the length of the output field ... that's controlled by the EDIT mask which has sign + 17 digits.

Did you even try using FIXLEN=25?

If there are no spaces in the 3rd field, then I don't know how you're getting the results you're getting. That's certainly not what I get with DFSORT.

Quote:
Please suggest...


I can't because I don't know what it is you're NOT telling me about your data or job.

Please post your input and output records using code tags so I can see what it really looks like. Post the complete JES messages from your run.
If you like, you can send me the information offline (yaeger@us.ibm.com) as plain text (.txt) files. Until I know what you're doing that doesn't correspond to what I see in your posts, I can't help you.
Back to top
View user's profile Send private message
nareshdacha

New User


Joined: 12 Jan 2010
Posts: 66
Location: US

PostPosted: Fri Sep 10, 2010 4:05 pm    Post subject: Reply to: Format EDIT limit in SORT
Reply with quote

Hi Frank....
I tried with FIXLEN=25. Please input and output details below.
I have attached the job messages with this.

INPUT:

Code:


20100901021430|TESTING TESTING 123|12345678901234567
20100901031531|TESTING TESTING 234|-12345678901234567
20100901031531|TESTING TESTING 234|-12345674534534577
20100901041531|TESTING TESTING 345|12979778901234567


OUTPUT:

Code:


20100901021430TESTING TESTING 123 +00123456789012345
20100901031531TESTING TESTING 234 +00123456789012345
20100901031531TESTING TESTING 234 -00123456745345345
20100901041531TESTING TESTING 345 +00129797789012345


Code:

//STEP1 EXEC PGM=SORT
//SORTIN DD *
20100901021430|TESTING TESTING 123|12345678901234567
20100901031531|TESTING TESTING 234|-12345678901234567
20100901031531|TESTING TESTING 234|-12345674534534577
20100901041531|TESTING TESTING 345|12979778901234567
/*
//SORTOUT DD DSN=MAGT.SORT.OUTPUT,
// DISP=(,CATLG),
// SPACE=(CYL,(10,10))
//SYSOUT DD SYSOUT=*
//SYSIN DD *
  OPTION COPY                                               
  INREC PARSE=(%00=(ENDBEFR=C'|',FIXLEN=14),                     
             %01=(ENDBEFR=C'|',FIXLEN=20),                     
             %02=(ENDBEFR=C'|',FIXLEN=25)),                     
  BUILD=(%00,%01,%02)                                             
  OUTREC BUILD=(1,14,UFF,M11,LENGTH=14,                           
             15,20,                                             
            35,18,SFF,EDIT=(STTTTTTTTTTTTTTTTT),SIGNS=('+','-'))
/*
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri Sep 10, 2010 6:06 pm    Post subject: Re: Reply to: Format EDIT limit in SORT
Reply with quote

nareshdacha wrote:
I have attached the job messages with this.


No, you didn't.

As a sanity check, running the exact code as you've posted, I get this output as a result:

Code:

20100901021430TESTING TESTING 123 +12345678901234567
20100901031531TESTING TESTING 234 -12345678901234567
20100901031531TESTING TESTING 234 -12345674534534577
20100901041531TESTING TESTING 345 +12979778901234567
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: Fri Sep 10, 2010 7:14 pm    Post subject: Reply to: Format EDIT limit in SORT
Reply with quote

And the requested/required messages still not posted. . . icon_sad.gif

d
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Sep 10, 2010 10:02 pm    Post subject:
Reply with quote

Naresh,

I received your JCL and //SYSOUT messages offline.

When I run your job with DFSORT, I get the expected results as follows:

Code:

20100901021430TESTING TESTING 123 +12345678901234567   
20100901031531TESTING TESTING 234 -12345678901234567   
20100901031531TESTING TESTING 234 -12345674534534577   
20100901041531TESTING TESTING 345 +12979778901234567   


However, the WER messages indicate you're using Syncsort, not DFSORT. I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort. If Syncsort is producing the wrong results, I certainly can't help you with that.

In the future, please post in the Syncsort Forum, not the DFSORT 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: Fri Sep 10, 2010 10:50 pm    Post subject:
Reply with quote

Hello,

Now, you need to post the requested information from the sysout. . .

From what i can see, Syncsort is not giving the incorrect result - it is doing exactly as you coded. . .

It is not a product problem when one codes for a different product. . .

Suggest you look at the Syncsort documentation. . .
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Sep 10, 2010 11:08 pm    Post subject:
Reply with quote

Quote:
From what i can see, Syncsort is not giving the incorrect result - it is doing exactly as you coded. . .


Why do you say that? %02 should be set with the following values left-justified in 25 bytes:

Code:

12345678901234567
-12345678901234567
-12345674534534577
12979778901234567


The BUILD then places these values in the INREC record starting at position 35 (still left-justified in 25 bytes):

35,18,SFF,EDIT=(STTTTTTTTTTTTTTTTT),SIGNS=('+','-')) in OUTREC
uses SFF to extract the digits starting from position 35 for 18 bytes. Since the digits are left-justified, that would include all of the digits. They should then be edited to:

Code:

+12345678901234567
-12345678901234567
-12345674534534577
+12979778901234567


That's what DFSORT does.

The OP said he got the following instead:

Code:

+00123456789012345
+00123456789012345
-00123456745345345
+00129797789012345


Note that the OP did not use the exact job I suggested, but his version should give the same results.

Are you saying that these control statements are documented to work differently for Syncsort then for DFSORT? How?
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Sat Sep 11, 2010 12:58 am    Post subject: Re: Reply to: Format EDIT limit in SORT
Reply with quote

nareshdacha wrote:
Input:

20100901021430|TESTING TESTING 123|12345678901234567
20100901031531|TESTING TESTING 234|-12345678901234567
20100901031531|TESTING TESTING 234|-12345674534534577
20100901041531|TESTING TESTING 345|12979778901234567
.
.
.
Required Output:

20100901021430|TESTING TESTING 123|+12345678901234567
20100901031531|TESTING TESTING 234|-12345678901234567
20100901031531|TESTING TESTING 234|-12345674534534577
20100901041531|TESTING TESTING 345|+12979778901234567

Here is a SyncSort for z/OS 1.3 job that will produce the requested output:
Code:
//STEP1 EXEC PGM=SORT                                 
//SORTIN  DD *                                         
20100901021430|TESTING TESTING 123|12345678901234567 
20100901031531|TESTING TESTING 234|-12345678901234567
20100901031531|TESTING TESTING 234|-12345674534534577
20100901041531|TESTING TESTING 345|12979778901234567 
//SORTOUT DD SYSOUT=*                                 
//SYSOUT  DD SYSOUT=*                                 
//SYSIN   DD *                                         
  SORT FIELDS=COPY                                   
  OUTREC BUILD=(1,35,                                 
               36,18,SFF,M25,LENGTH=18,SIGNS=(+,-,,))     
/*                                                   
Back to top
View user's profile Send private message
nareshdacha

New User


Joined: 12 Jan 2010
Posts: 66
Location: US

PostPosted: Mon Sep 13, 2010 3:56 pm    Post subject: Reply to: Syncsort - Format EDIT limit in SORT
Reply with quote

Thanks Frank, Dick and Alissa for your suggestions ........
Am sorry that i was posted this question in DFSORT.......

My input file is a pipe (|) delimited file and i know the maximum length of the each field. Every record doesn't have the maximum value.
1st field length =14
2nd field length=20
3rd field length=18 (sign + 17digits)

For example, my input will be like this.

Code:
   

20100901021430|TEST|12345678901234567 
20100901031531|TESTING|-12345678901234567
20100901031531|TESTING123|-12345674534534577
20100901041531|TESTING TESTING 345|12979778901234567 
20100901031531|TESTING123|-3456
20100901041531|TESTING TESTING 345|179
20100901031531|TESTING|-123456



Since i dont know the exact length of the field of the record i cannot use OUTREC in this scenario. Hence i used INREC PARSE to split the file based on the pipe symbol.


Please suggest how to proceed further....
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Mon Sep 13, 2010 8:45 pm    Post subject:
Reply with quote

Code:
//SORT     EXEC PGM=SORT                                     
//SYSOUT   DD SYSOUT=*                                       
//SORTIN   DD *                                             
20100901021430|TEST|12345678901234567                       
20100901031531|TESTING|-12345678901234567                   
20100901031531|TESTING123|-12345674534534577                 
20100901041531|TESTING TESTING 345|12979778901234567         
20100901031531|TESTING123|-3456                             
20100901041531|TESTING TESTING 345|179                       
20100901031531|TESTING|-123456                               
//SORTOUT  DD SYSOUT=*                                       
//SYSIN    DD *                                             
  SORT FIELDS=COPY                                           
  INREC IFTHEN=(WHEN=INIT,PARSE=(%1=(ENDBEFR=C'|',FIXLEN=14),
   %2=(ENDBEFR=C'|',FIXLEN=20),                             
   %3=(ENDBEFR=C'|',FIXLEN=18)),                             
   BUILD=(%1,%2,%3,SFF,M25,SIGNS=(+,-,,))),                 
   IFTHEN=(WHEN=INIT,BUILD=(1,34,36,18,JFY=(SHIFT=LEFT)))   

The following output will be produced from the sort step above:
Code:
20100901021430TEST                +12345678901234567
20100901031531TESTING             -12345678901234567
20100901031531TESTING123          -12345674534534577
20100901041531TESTING TESTING 345 +12979778901234567
20100901031531TESTING123          -3456             
20100901041531TESTING TESTING 345 +179             
20100901031531TESTING             -123456           
Back to top
View user's profile Send private message
nareshdacha

New User


Joined: 12 Jan 2010
Posts: 66
Location: US

PostPosted: Tue Sep 14, 2010 7:35 pm    Post subject: Reply to: Syncsort - Format EDIT limit in SORT
Reply with quote

Thanks Alissa.. Its working............

I have tried like below (without IFTHEN second time).when i try to use JFY OR SQZ options for shiftig the digits left side its throwing the error..

Code:


//STEP2    EXEC  PGM=SORT                                     
//SORTIN   DD  *                                               
20100901021430|TEST|12345678901234567|TEST1|A                 
20100901031531|TESTING|-12345678901234567|TEST|B               
20100901031531|TESTING123|-12345674534534577|TEST2|C           
20100901041531|TESTING TESTING 345|12979778901234567|TEST|D   
20100901031531|TESTING123|-3456|TEST3|E                       
20100901041531|TESTING TESTING 345|179|TEST|F                 
20100901031531|TESTING|-123456|TEST4|G                         
//SORTOUT  DD  DSN=A516549.VISA.FSLCV003.NEW.OUT,             
//             DISP=(NEW,CATLG),DCB=(RECFM=FB,LRECL=80),       
//             SPACE=(CYL,(10,10))                             
//SYSPRINT DD  SYSOUT=*                                       
//SYSOUT   DD  SYSOUT=*                                       
//SYSIN    DD  *                                               
SORT FIELDS=COPY                                             
INREC IFTHEN=(WHEN=INIT,PARSE=(%1=(ENDBEFR=C'|',FIXLEN=14),
          %2=(ENDBEFR=C'|',FIXLEN=20),                                 
    %3=(ENDBEFR=C'|',FIXLEN=18), %4=(ENDBEFR=C'|',FIXLEN=05),                                 
   %5=(ENDBEFR=C'|',FIXLEN=01)),                                 
BUILD=(%1,%2,%3,SFF,M25,JFY=(SHIFT=LEFT),SIGNS=(+,-,,),%4,%5))




Message in the output:

Code:


SYSIN :                                                                       
  SORT FIELDS=COPY                                                     
   INREC IFTHEN=(WHEN=INIT,
    PARSE=(%1=(ENDBEFR=C'|',FIXLEN=14),         
    %2=(ENDBEFR=C'|',FIXLEN=20),                                       
    %3=(ENDBEFR=C'|',FIXLEN=18),                                       
    %4=(ENDBEFR=C'|',FIXLEN=05),                                       
    %5=(ENDBEFR=C'|',FIXLEN=01)),                                       
BUILD=(%1,%2,%3,SFF,M25,JFY=(SHIFT=LEFT),SIGNS=(+,-,,),
%4,%5))     
                        *                                                 
WER268A  INREC STATEMENT   : SYNTAX RROR                                     
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
                                 


Am i missing anything here......
Back to top
View user's profile Send private message
nareshdacha

New User


Joined: 12 Jan 2010
Posts: 66
Location: US

PostPosted: Tue Sep 14, 2010 7:37 pm    Post subject: Reply to: Syncsort - Format EDIT limit in SORT
Reply with quote

Sorry.. Those are messages in the SYSOUT
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Tue Sep 14, 2010 8:50 pm    Post subject: Re: Reply to: Syncsort - Format EDIT limit in SORT
Reply with quote

nareshdacha wrote:
Thanks Alissa.. Its working............

I have tried like below (without IFTHEN second time).when i try to use JFY OR SQZ options for shiftig the digits left side its throwing the error..
Code:
     
WER268A  INREC STATEMENT   : SYNTAX RROR   


Am i missing anything here......

Yes, you need to put back the second IFTHEN statement. See below:
Code:
//STEP2  EXEC PGM=SORT                                     
//SORTIN   DD *                                             
20100901021430|TEST|12345678901234567|TEST1|A               
20100901031531|TESTING|-12345678901234567|TEST|B           
20100901031531|TESTING123|-12345674534534577|TEST2|C       
20100901041531|TESTING TESTING 345|12979778901234567|TEST|D
20100901031531|TESTING123|-3456|TEST3|E                     
20100901041531|TESTING TESTING 345|179|TEST|F               
20100901031531|TESTING|-123456|TEST4|G                     
//SORTOUT  DD SYSOUT=*                                     
//SYSOUT   DD SYSOUT=*                                           
//SYSIN    DD *                                             
 SORT FIELDS=COPY                                           
 INREC IFTHEN=(WHEN=INIT,PARSE=(%1=(ENDBEFR=C'|',FIXLEN=14),
    %2=(ENDBEFR=C'|',FIXLEN=20),                           
    %3=(ENDBEFR=C'|',FIXLEN=18),                           
    %4=(ENDBEFR=C'|',FIXLEN=05),                           
    %5=(ENDBEFR=C'|',FIXLEN=01)),                           
 BUILD=(%1,%2,%3,SFF,M25,SIGNS=(+,-,,),%4,%5)),             
 IFTHEN=(WHEN=INIT,BUILD=(1,34,35,19,JFY=(SHIFT=LEFT),54,6))
/*

Here is the output produced:
Code:
20100901021430TEST                +12345678901234567 TEST1A
20100901031531TESTING             -12345678901234567 TEST B
20100901031531TESTING123          -12345674534534577 TEST2C
20100901041531TESTING TESTING 345 +12979778901234567 TEST D
20100901031531TESTING123          -3456              TEST3E
20100901041531TESTING TESTING 345 +179               TEST F
20100901031531TESTING             -123456            TEST4G
Back to top
View user's profile Send private message
nareshdacha

New User


Joined: 12 Jan 2010
Posts: 66
Location: US

PostPosted: Wed Sep 15, 2010 8:35 am    Post subject: Reply to: Syncsort - Format EDIT limit in SORT
Reply with quote

Alissa....
Without IFTHEN for second time it will work. Please see the below code...
In my actual scenario there are 37 fields so i need to check the position and length for each field. Hence i used directly BUILD section as below.

Code:

//STEP2  EXEC PGM=SORT                                     
//SORTIN   DD *                                             
20100901021430|TEST|12345678901234567|TEST1|A               
20100901031531|TESTING|-12345678901234567|TEST|B           
20100901031531|TESTING123|-12345674534534577|TEST2|C       
20100901041531|TESTING TESTING 345|12979778901234567|TEST|D
20100901031531|TESTING123|-3456|TEST3|E                     
20100901041531|TESTING TESTING 345|179|TEST|F               
20100901031531|TESTING|-123456|TEST4|G                     
//SORTOUT  DD SYSOUT=*                                     
//SYSOUT   DD SYSOUT=*                                           
//SYSIN    DD *                                             
 SORT FIELDS=COPY                                           
 INREC IFTHEN=(WHEN=INIT,PARSE=(%1=(ENDBEFR=C'|',FIXLEN=14),
    %2=(ENDBEFR=C'|',FIXLEN=20),                           
    %3=(ENDBEFR=C'|',FIXLEN=18),                           
    %4=(ENDBEFR=C'|',FIXLEN=05),                           
    %5=(ENDBEFR=C'|',FIXLEN=01)),                           
 BUILD=(%1,%2,%3,SFF,M25,SIGNS=(+,-,,),%4,%5))
/*


Output:
Code:

20100901021430TEST                 +12345678901234567TEST1A
20100901031531TESTING              -12345678901234567TEST B
20100901031531TESTING123           -12345674534534577TEST2C
20100901041531TESTING TESTING 345  +12979778901234567TEST D
20100901031531TESTING123                        -3456TEST3E
20100901041531TESTING TESTING 345                +179TEST F
20100901031531TESTING                         -123456TEST4G


But when i try use JFY=(SHIFT=LEFT) in the BUILD section(specified below) its throwing syntax error. I have tried SQZ and JFY. For both options its throwing syntax error.

Code:

 BUILD=(%1,%2,%3,SFF,M25,JFY=(SHIFT=LEFT),SIGNS=(+,-,,),%4,%5))

Here i want to do left alignment for 3rd field. Please suggest.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Wed Sep 15, 2010 8:45 pm    Post subject: Re: Reply to: Syncsort - Format EDIT limit in SORT
Reply with quote

nareshdacha wrote:
Without IFTHEN for second time it will work.
Yes, I know.
nareshdacha wrote:

But when i try use JFY=(SHIFT=LEFT) in the BUILD section(specified below) its throwing syntax error. I have tried SQZ and JFY. For both options its throwing syntax error... Here i want to do left alignment for 3rd field. Please suggest.
So put back the second IFTHEN statement. What is the problem here?
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
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 3 Fri Dec 02, 2016 9:47 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am


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