Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Need help in parsing record in VBA file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1201
Location: Bangalore,India

PostPosted: Fri Oct 11, 2019 2:31 pm    Post subject: Need help in parsing record in VBA file
Reply with quote

Hello All,

My Input is VBA file with record length 85 .

Input1:
Code:


total record length 75
abcf
asjkkkk
sdjjjjk
    / CLMPER LAST CHANGED BY EG
total record length 76
abcf
asjkkkk
sdjjjjk
   / CLTPER LAST CHANGED BY FGERG



I am looking for below output
Code:
CLMPER
CLTPER


So basically I am looking for all the ID prefix by / and suffix by C' LAST CHANGED BY '

I tried sort as below
Code:


//JS030    EXEC PGM=ICEMAN,                               
//             REGION=0M                                   
//SYSOUT    DD SYSOUT=*                                   
//SYSPRINT  DD SYSOUT=*                                   
//SYMNAMES  DD *                                           
FLD2,%00                                                   
EQUAL,'/ '                                                 
VARB,' LAST CHANGED BY '                                   
//SORTIN    DD DSN=inputfile,DISP=SHR
//SORTOUT   DD DSN=Outputfile,
//             DISP=(NEW,CATLG,DLET),
//             UNIT=(SYSDA,9),
//             SPACE=(TRK(1,1),RLSE)
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=80)       


//SYSIN     DD *                                           
  SORT FIELDS=COPY                                         
  INCLUDE COND=(5,81,SS,EQ,C' LAST CHANGED BY ')           
  INREC PARSE=(%=(STARTAT=EQUAL),                         
               %00=(ENDBEFR=VARB,FIXLEN=8)),               
               BUILD=(%00,80:X)                           
/*                                                       


Its failing with Invalid data attribute sortout recfm and blksize.

Please advise
Back to top
View user's profile Send private message

guptae

Moderator


Joined: 14 Oct 2005
Posts: 1201
Location: Bangalore,India

PostPosted: Fri Oct 11, 2019 3:10 pm    Post subject:
Reply with quote

Able to achieve above using

Code:
SORT FIELDS=COPY                                       
OPTION VLSCMP                                     <====  added   
INCLUDE COND=(5,81,SS,EQ,C' LAST CHANGED BY ')         
OUTFIL VTOF,PARSE=(%=(STARTAT=EQUAL),                  <==== added
             %00=(ENDBEFR=VARB,FIXLEN=8)),             
             BUILD=(%00,80:X)                         


Thanks
Back to top
View user's profile Send private message
Joerg.Findeisen

New User


Joined: 15 Aug 2015
Posts: 35
Location: Germany

PostPosted: Fri Oct 11, 2019 10:06 pm    Post subject:
Reply with quote

It was basically failing because you had mixed SORTIN VBA and SORTOUT FB w/o specifying VTOF. icon_rolleyes.gif
Back to top
View user's profile Send private message
sergeyken

Active Member


Joined: 29 Apr 2008
Posts: 564
Location: Maryland

PostPosted: Tue Oct 15, 2019 5:36 pm    Post subject:
Reply with quote

Joerg.Findeisen wrote:
It was basically failing because you had mixed SORTIN VBA and SORTOUT FB w/o specifying VTOF. icon_rolleyes.gif

The parameter
Code:
 … COND=(5,81,SS,EQ,C' LAST CHANGED BY ')
would fail on any varying length record shorter that 81 bytes, unless either option VLSCMP, or PARM="VLTESTI=2' was used.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2268
Location: NY,USA

PostPosted: Tue Oct 15, 2019 8:19 pm    Post subject:
Reply with quote

And refer to Ask Professor Sort for more such tricks.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Parsing single liner XML into readabl... rohanthengal COBOL Programming 1 Fri Oct 18, 2019 8:41 pm
No new posts How to place name of the file where t... danielgp89 DFSORT/ICETOOL 14 Thu Oct 17, 2019 12:55 am
No new posts What 'EF' in the CAFC command REGION,... vrkratheesh CICS 2 Wed Sep 18, 2019 4:52 pm
No new posts Can we pass the value of Symbolic par... Poha Eater JCL & VSAM 5 Thu Sep 05, 2019 2:21 pm
No new posts Search the strings present in ps file... Bhuvana Narasimhan All Other Mainframe Topics 8 Thu Aug 22, 2019 8:20 pm

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