Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
INREC PARSING and dictionary items

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
migusd

New User


Joined: 08 Aug 2014
Posts: 18
Location: USA

PostPosted: Fri Jun 02, 2017 8:02 pm    Post subject: INREC PARSING and dictionary items
Reply with quote

hello guys,
I am having troubles to understand INREC PARSING using Dictionary fields created.
I have a fixed length file with the first part of the records are fixed.
The last part of the records contain variable length fields.
But I decided to use dictionary.
and because of this I am running into issues.
I believe the issue is INREC PARSE I am using, but I don't understand why.
can someone tell me what am I missing?

here is the example
Code:
 SYSIN :                                                                           
 INREC PARSE=(TIMR=(ABSPOS=1,FIXLEN=7),                                           
              LOQD=(ADDPOS=01,FIXLEN=7),                                           
              REQI=(ADDPOS=01,FIXLEN=6),                                           
              TDLI=(ADDPOS=01,ENDBEFR=PIP),                                       
              PRLI=(ADDPOS=01,ENDBEFR=BLK)),                                       
 BUILD=(1:PRLA,5:LIQD,12:TMAR,19:TDLP,22:REQU)                                     
 SORT FIELDS=(PRLA,A,LIQD,A,TMAR,A)                                               
 OMIT COND=(TDLP,EQ,C'OPN')                                                       
DATA DICTIONARY SYMBOLS SUBSTITUTED :                                             
INREC PARSE=(1,7,ZD=(ABSPOS=1,FIXLEN=7),9,7,CH=(ADDPOS=01,FIXLEN=7),17,6,CH=(ADD   
             *                                                                     
POS=01,FIXLEN=6),%00=(ADDPOS=01,ENDBEFR=C'|'),%01=(ADDPOS=01,ENDBEFR=C' ')),BUIL   
D=(1:1,4,5:5,7,12:12,7,19:19,3,22:22,6)                                           
SORT FIELDS=(1,4,CH,A,5,7,CH,A,12,7,ZD,A)                                         
OMIT COND=(19,3,CH,EQ,C'OPN')                                                     
WER813I  INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED                     
WER268A  INREC STATEMENT   : SYNTAX ERROR                                         


here are the dictionary items I am using
Code:

*-----------------------PARM USED IN BOTH-----------------------------*
*----------------TRLXSXXX JS0010 TMR USER REQUEST --------------------*
*----------------TRLXSXXX JS0020 VER STAT REQUEST --------------------*
*---------------------------------------------------------------------*
 PRLA,001,04,CH                            001 - 004                   
 LIQD,005,07,CH                            005 - 011                   
 TMAR,012,07,ZD                            012 - 018                   
 TDLP,019,03,CH                            019 - 021                   
 REQU,022,06,CH                            022 - 027                   

and
Code:

TIMR,1,7,ZD     
LOQD,9,7,CH     
REQI,17,6,CH     
TDLI,%00         
PRLI,%01         
PIP,'|'         
BLK,' '         


thanks in advance
Back to top
View user's profile Send private message

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2285
Location: @my desk

PostPosted: Fri Jun 02, 2017 8:11 pm    Post subject:
Reply with quote

Code:
 TIMR,1,7,ZD     
 LOQD,9,7,CH     
 REQI,17,6,CH 
I think your problem lies here. You might want to define these PARSE fields as %n OR %nn to fix your syntax error (similar to what you have already done for TDLI and PRLI).
Refer the Syncsort/MFX manual or the PARSE examples in this forum to get familiar with the PARSE syntax.

Quote:
DATA DICTIONARY SYMBOLS SUBSTITUTED :
INREC PARSE=(1,7,ZD=(ABSPOS=1,FIXLEN=7)
The asterisk shows exactly where your problem is.
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 171
Location: Maryland

PostPosted: Fri Jun 02, 2017 8:17 pm    Post subject:
Reply with quote

The syntax of your PARSE parameter (after substitution of dictionary values) is wrong/incorrect/not allowed.

PARSE= is not allowed without first character as '%'. Period.
What is not clear in this sample, or SYNCSORT error message?

Everything is clearly explained. RTFM.
Back to top
View user's profile Send private message
migusd

New User


Joined: 08 Aug 2014
Posts: 18
Location: USA

PostPosted: Fri Jun 02, 2017 8:43 pm    Post subject: Reply to: INREC PARSING and dictionary items
Reply with quote

Hi Arun,
I did that as a test before, but the failing field is moving.
let me tell you that the %03 field is missing most times. So we have two field separators '|' together indicating a missing field. Is that something to be of a concern?
here he the new test...
Code:

SYSIN :                                                                           
 INREC PARSE=(TIMR=(ABSPOS=1,FIXLEN=7),                                           
              LOQD=(ADDPOS=01,FIXLEN=7),                                         
              REQI=(ADDPOS=01,FIXLEN=6),                                         
              TDLI=(ADDPOS=01,ENDBEFR=PIP),                                       
              PRLI=(ADDPOS=01,ENDBEFR=BLK)),                                     
 BUILD=(1:PRLA,5:LIQD,12:TMAR,19:TDLP,22:REQU)                                   
 SORT FIELDS=(PRLA,A,LIQD,A,TMAR,A)                                               
 OMIT COND=(TDLP,EQ,C'OPN')                                                       
DATA DICTIONARY SYMBOLS SUBSTITUTED :                                             
INREC PARSE=(%00=(ABSPOS=1,FIXLEN=7),%01=(ADDPOS=01,FIXLEN=7),%02=(ADDPOS=01,FIX 
LEN=6),%03=(ADDPOS=01,ENDBEFR=C'|'),%04=(ADDPOS=01,ENDBEFR=C' ')),BUILD=(1:1,4,5 
                                   *                                             
:5,7,12:12,7,19:19,3,22:22,6)                                                     
SORT FIELDS=(1,4,CH,A,5,7,CH,A,12,7,ZD,A)                                         
OMIT COND=(19,3,CH,EQ,C'OPN')                                                     
WER813I  INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED                   
WER268A  INREC STATEMENT   : SYNTAX ERROR                                         


Code:

TIMR,%00     
LOQD,%01     
REQI,%02     
TDLI,%03     
PRLI,%04     
PIP,'|'     
BLK,' '     
Back to top
View user's profile Send private message
migusd

New User


Joined: 08 Aug 2014
Posts: 18
Location: USA

PostPosted: Fri Jun 02, 2017 8:45 pm    Post subject: Reply to: INREC PARSING and dictionary items
Reply with quote

Thanks for your explanation, Sergey.
Sometimes people with obtuse minds like me, fail to understand manuals... or missing the point.
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 171
Location: Maryland

PostPosted: Fri Jun 02, 2017 9:15 pm    Post subject: Re: Reply to: INREC PARSING and dictionary items
Reply with quote

migusd wrote:
Hi Arun,
I did that as a test before, but the failing field is moving.
let me tell you that the %03 field is missing most times. So we have two field separators '|' together indicating a missing field. Is that something to be of a concern?
here he the new test...


FIXLEN= subparameter is mandatory for PARSE... (except dummy case %=...)
If you want to get varying size value, in the following statements/parameters you can use subparameter SQZ=, or JFY=, or other ways of "truncation".

RTFM
Back to top
View user's profile Send private message
migusd

New User


Joined: 08 Aug 2014
Posts: 18
Location: USA

PostPosted: Fri Jun 02, 2017 9:22 pm    Post subject:
Reply with quote

that was the issue, Sergey!
Thanks guys,
you are awesome!
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 -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts What does this INREC do? Lino Pontes DFSORT/ICETOOL 5 Fri Apr 08, 2016 12:17 am
No new posts Parsing and Listing a Subset of Recor... Charles Wolters IBM Tools 3 Fri Feb 05, 2016 10:39 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us