MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Need to find and place records in a flat file

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
srinu14165
Beginner


Joined: 25 Aug 2006
Posts: 10
Topics: 5

PostPosted: Wed Dec 20, 2006 4:01 pm    Post subject: Need to find and place records in a flat file Reply with quote

I have a flat file which is of 111 Lrecl.

starting from 32nd record and length 50 bytes. the records are as below.
MARLBORO MENTH SFT KG 210
WINSTON FF 100 BOX 26657
80855 USA GOLD FF LT ULT
k140 churchill sft box typ
PINBALL SS 50" CUBE 10045 MENTH

I need to find all 5 digit numerals like 26657 and 80855 in the records and also characters starting with k and ending with 3 digit numeral place them starting from position 178 in the same record.

and if there are no numerals and char's with K and 3 digit numeral in the records, the 178th position should be left blank.


My expected output is as below.

MARLBORO MENTH SFT KG 210 blank
WINSTON FF 100 BOX 26657 26657
80855 USA GOLD FF LT ULT 80855
k140 churchill sft box typ k140


Can anybody help me how to achieve this, I can use easytriev and syncsort.

Thanks
Sri
Back to top
View user's profile Send private message
srinu14165
Beginner


Joined: 25 Aug 2006
Posts: 10
Topics: 5

PostPosted: Wed Dec 20, 2006 4:06 pm    Post subject: Reply with quote

Sorry this is my expected output

32nd postion 178th position
MARLBORO MENTH SFT KG 210 blank
WINSTON FF 100 BOX 26657 26657
80855 USA GOLD FF LT ULT 0855
k140 churchill sft box typ k140
Back to top
View user's profile Send private message
srinu14165
Beginner


Joined: 25 Aug 2006
Posts: 10
Topics: 5

PostPosted: Wed Dec 20, 2006 4:10 pm    Post subject: Reply with quote

again I apologise typed the Lrecl for the input file is 551

Sorry for the inconvenience

Thanks
Sri
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group