Syntax Error



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Syntax Error

Postby xboss » Tue Dec 21, 2010 3:01 am

INPUT FILE DESCRITPION: FB, LRECL=80
Record Format:
#F0001234567890123xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx?xxxxxxxxxxxxxxxxx1000212364578
Now using DFSORT utility I have to check,
IF first column 1 and 2 is not '#F' and column 54 is not '?' then records is invalid, dump these invalid records to member xxxxxx.xxxxx.xxxxxx(record1)
IF column 6 to 19 is not numeric, then record is invalid, dump these invalid records to member xxxxxx.xxxxx.xxxxxx(record2)
IF column 69 to 80 is not numeric, then record is invalid, dump these record to member xxxxxx.xxxxx.xxxxxx(record3)
Now rest are valid record, dump these valid records to member xxxxxx.xxxxx.xxxxxx(record4),

Here is my JCL,
//JOBCARD
//SORT   EXEC PGM=SORT
//SORTIN  DD DSN=INPUT.DATA.SET
//SORTOUT  DD SYSOUT=*
//RECORD01 DD DSN=xxxxxx.xxxxx.xxxxxx(record1),DISP=SHR
//RECORD02 DD DSN=xxxxxx.xxxxx.xxxxxx(record2),DISP=SHR
//RECORD03 DD DSN=xxxxxx.xxxxx.xxxxxx(record3),DISP=SHR
//RECORD04 DD DSN=xxxxxx.xxxxx.xxxxxx(record4),DISP=SHR
//SYSIN DD *
                   SORT FIELDS=COPY
                   OUTFIL INCLUDE COND=(1,1,FS,NQ,C'#',OR,2,1,FS,NQ,C'F',OR,54,1,FS,NQ,C'?'),FNAMES=RECORD01
                   OUTFIL INCLUDE COND=(6,13,FS,NQ,NUM),FNAMES=RECORD02
                   OUTFIL INCLUDE COND=(69,11,FS,NQ,NUM),FNAMES=RECORD03
                   OUTFIL SAVE, FNAMES=RECORD04
/*
xboss
 
Posts: 79
Joined: Mon Nov 29, 2010 10:55 am
Has thanked: 0 time
Been thanked: 0 time

Re: Syntax Error

Postby Frank Yaeger » Tue Dec 21, 2010 3:34 am

Where to start?

NQ? I think you mean NE.

You need CH, not FS, for the character comparisons.

You need OUTFIL INCLUDE= rather than OUTFIL INCLUDE COND=

And you should not have a blank between SAVE, and FNAMES.

Also, you can't use different members of the same PDS for the OUTFIL data sets. You could use different members of the same PDSE, or different sequential data sets.

I suspect you want these control statements:

       SORT FIELDS=COPY
       OUTFIL INCLUDE=(1,2,CH,NE,C'#F',AND,54,1,CH,NE,C'?'),FNAMES=RECORD01
       OUTFIL INCLUDE=(6,14,FS,NE,NUM),FNAMES=RECORD02
       OUTFIL INCLUDE=(69,12,FS,NE,NUM),FNAMES=RECORD03
       OUTFIL SAVE,FNAMES=RECORD04
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: Syntax Error

Postby xboss » Tue Dec 21, 2010 3:59 am

Thanks, Frank. But I was strictly told to create 4 members on aaaaaa.aaaaaa.aaaaaa(reportx) where x = 1 to 4.
Is there any other ways than using OUTFIL?
xboss
 
Posts: 79
Joined: Mon Nov 29, 2010 10:55 am
Has thanked: 0 time
Been thanked: 0 time

Re: Syntax Error

Postby Frank Yaeger » Tue Dec 21, 2010 7:11 am

Were you specifically told to create 4 members of a PDS? If not, use a PDSE.

If you really need to create 4 members of the same PDS, then you'll need to do a separate pass for each one (you can do that in one ICETOOL step).

However, in either case, now that I look at your "rules", they're rather ambiguous. For example, where does a record go if it has 'XF' in 1-2, a non-numeric in 6-19 and a non-numeric in 69-80?

You need to do a better job of explaining the rules if you want me to show you how to do what you want to do. Also show an example of the records in your input file and expected output for each rule, and give the RECFM and LRECL of the input file.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: Syntax Error

Postby xboss » Tue Dec 21, 2010 9:30 am

OK, Let me give you a detail explanation,
Input record
#F0008809394404944079Daniel Akaka #1105#?0069.60#10001#10277120112
#F0008809789449044480Lamar Alexander #1410#?0037.87#10002#10277192723
#F0008805203476367222John Barrasso #1404#?0074.01#10003#10277211618
#FB0008800567139045069Baucus Baucus #1408#?0061.59#10004#10277112142

Input file Description
Organization . . . : PO Used pages . . . . : 18
Record format . . . : FB % Utilized . . . . : 10
Record length . . . : 80
Block size . . . . : 32720
Data set name type : LIBRARY


Output file Description
General Data Current Allocation
Organization . . . : PO Used pages . . . . : 12
Record format . . . : FB % Utilized . . . . : 6
Record length . . . : 80
Block size . . . . : 32720
Data set name type : LIBRARY

Requirement
Create 6 error reports that will be sent to the merchant and 1
valid data report (which has all the records without errors)

REPORT1 - Title: Sentinel Error Report
Records without '#F' starting in first column or '?' in column 54
Write to aaaaa.aaaaaa.aaaaaa.aaaaa(REPORT1)

REPORT2 - Title: PAN non-Numeric Error Report
Records with any non-numeric in column 6 through 21
Write to aaaaa.aaaaaa.aaaaaa.aaaaa(REPORT2)

REPORT3 - Title: Expiration Date non-Numeric Error Report
Records with any non-numeric in column 49 through 52
Write to aaaaa.aaaaaa.aaaaaa.aaaaa(REPORT3)

REPORT4 - Title: Sale Amount non-Numeric Error Report
Records with any non-numeric in column 55 through 58 (dollars)
Records with any non-numeric in column 60 through 61 (cents)
Write to aaaaa.aaaaaa.aaaaaa.aaaaa(REPORT4)



REPORT5 - Title: Merchant Transaction Number non-Numeric Error Report
Records with any non-numeric in column 63 through 67
Write to aaaaa.aaaaaa.aaaaaa.aaaaa(REPORT5)

REPORT6 - Title: Date & Time non-Numeric Error Report
Records with any non-numeric in column 69 through 79
Write to aaaaa.aaaaaa.aaaaaa.aaaaa(REPORT6)

REPORT7 - Title: Valid Data Report
Records without errors. These are the remaining records
These are the remaining records excluded from the error reports
Write to aaaaa.aaaaaa.aaaaaa.aaaaa(REPORT7)

My solution
//JOBCARD
//STEP01 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INPUT.FILE,DISP=OLD
//REPORT01 DD DSN=aaaaa.aaaaa.aaaaa.aaaaa(REPORT1),DISP=SHR
//REPORT02 DD DSN=aaaaa.aaaaa.aaaaa.aaaaa(REPORT2),DISP=SHR
//REPORT03 DD DSN=aaaaa.aaaaa.aaaaa.aaaaa(REPORT3),DISP=SHR
//REPORT04 DD DSN=aaaaa.aaaaa.aaaaa.aaaaa(REPORT4),DISP=SHR
//REPORT05 DD DSN=aaaaa.aaaaa.aaaaa.aaaaa(REPORT5),DISP=SHR
//REPORT06 DD DSN=aaaaa.aaaaa.aaaaa.aaaaa(REPORT6),DISP=SHR
//REPORT07 DD DSN=aaaaa.aaaaa.aaaaa.aaaaa(REPORT7),DISP=SHR
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL INCLUDE =(1,2,CH,NE,C'%B',OR,
54,1,CH,NE,C'?'),FNAMES=REPORT01
OUTFIL INCLUDE =(6,16,FS,NE,NUM),FNAMES=REPORT02
OUTFIL INCLUDE =(49,4,FS,NE,NUM),FNAMES=REPORT03
OUTFIL INCLUDE =(55,4,FS,NE,NUM,
OR,60,2,FS,NE,NUM),FNAMES=REPORT04
OUTFIL INCLUDE =(63,5,FS,NE,NUM),FNAMES=REPORT05
OUTFIL INCLUDE =(69,11,FS,NE,NUM),FNAMES=REPORT06
OUTFIL SAVE,FNAMES=REPORT07
/*
Error I am getting
ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                       
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, E
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R10 - 21:55
                SORT FIELDS=COPY                                     
                OUTFIL INCLUDE =(1,2,CH,NE,C'#F',OR,                 
                              $                                       
ICE007A 1 SYNTAX ERROR                                               
                                    54,1,CH,NE,C'?'),FNAMES=REPORT01 
                                    $                                 
ICE007A 0 SYNTAX ERROR                                               
                OUTFIL INCLUDE =(6,16,FS,NE,NUM),FNAMES=REPORT02     
                              $                                       
ICE007A 1 SYNTAX ERROR                                               
                OUTFIL INCLUDE =(49,4,FS,NE,NUM),FNAMES=REPORT03     
                              $                                       
ICE007A 1 SYNTAX ERROR                                               
                OUTFIL INCLUDE =(55,4,FS,NE,NUM,                     
ICE007A 1 SYNTAX ERROR                                                   
                                      OR,60,2,FS,NE,NUM),FNAMES=REPORT04
                                      $                                 
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY   
                OUTFIL INCLUDE =(63,5,FS,NE,NUM),FNAMES=REPORT05         
                              $                                         
ICE007A 1 SYNTAX ERROR                                                   
                OUTFIL INCLUDE =(69,11,FS,NE,NUM),FNAMES=REPORT06       
                              $                                         
ICE007A 1 SYNTAX ERROR                                                   
                OUTFIL SAVE,FNAMES=REPORT07                             
ICE751I 0 C5-K90025 C6-K90025 C7-K54603 C8-K62201 E7-K62201             
ICE052I 3 END OF DFSORT                                                 



HELP :cry: :cry: :cry: :cry:
xboss
 
Posts: 79
Joined: Mon Nov 29, 2010 10:55 am
Has thanked: 0 time
Been thanked: 0 time

Re: Syntax Error

Postby xboss » Tue Dec 21, 2010 9:54 am

Nevermind Frank, I got it.
It was silly syntax error as you can see above. Yes, I have used PDSE for the report.
Thank You very much for your help. I really appreciate. :D :D :D :D :D
xboss
 
Posts: 79
Joined: Mon Nov 29, 2010 10:55 am
Has thanked: 0 time
Been thanked: 0 time

Re: Syntax Error

Postby dick scherrer » Tue Dec 21, 2010 9:57 am

Hello,

Why all of the spaces before the ='s?

Suggest you look at a few prior topics or the documentation to correct your syntax errors.

Post back here when you have moved beyond this particular error.
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: Syntax Error

Postby dick scherrer » Tue Dec 21, 2010 9:58 am

Good to hear you found it :)

d
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: Syntax Error

Postby xboss » Tue Dec 21, 2010 10:05 am

Hold on... Frank,
I thought I got it, but my last member aaaaa.aaaaaa.aaaaaa.aaaaaa(report7) has nothing in it. Other reports looks good(from 1 to 6). Any suggestion.
xboss
 
Posts: 79
Joined: Mon Nov 29, 2010 10:55 am
Has thanked: 0 time
Been thanked: 0 time

Re: Syntax Error

Postby xboss » Tue Dec 21, 2010 10:13 am

To add on my above post,
My JCL structure is same, except i eradicate the space between INCLUDE and equal to sign"=" on my jcl which was giving me syntax error.
I wanted to put rest of the records that were left from report1,2,3,4,5,6 to 7. In other word, all valid records to report7.

Thnx
xboss
 
Posts: 79
Joined: Mon Nov 29, 2010 10:55 am
Has thanked: 0 time
Been thanked: 0 time

Next

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post