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
 

 

Problem with Variable file reading

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

New User


Joined: 05 Mar 2005
Posts: 1

PostPosted: Mon Feb 26, 2007 2:05 pm    Post subject: Problem with Variable file reading
Reply with quote

I need help to read a varible record length file.
This is my problem:

I had a variable length PS file and data is as follows:

Code:

.?.0S922ERQR...............................?S922ERQP............................
.?...?S922ERQR....................[TAAC6201T95P1992252T00OBUILD/MOCK UP         
.?...jS922ERQP....................h15532249  SPRING-INTER S/1992167  V NIERHAUS
.?....S922ERQL.....................01TRUCK & BUS GROUP                     .   
.?....S922ERQL....................?02BLDG 34 DOCK 214                      .   
.?....S922ERQL....................?03660 S. BOULEVARD EAST                 .   
.?....S922ERQL....................?04PONTIAC, MI                           .   
.?....S922ERQL....................?0548341-3128                            .   
.?....S922ERQN.....................005NIF PROBLEMS, PLEASE CALL LYNN HAAS       
.?....S922ERQN....................-010NON 8-396-3870. THANK YOU.               
.?....S922ERQN....................?015N                                         
.?....S922ERQN.....................020NPER REQUEST OF AL LAMB, INCREASING       
.?....S922ERQN....................?025NQUANTITY TO 240 PCS (P.O. ETCRK)         
.?....S922ERQN....................?030NLSH 090892                               
.?...?S922ERQR.....................6AADDG00618A1990233600O4EZ57                 
.?...jS922ERQP....................?03523624  COVER UNIT-WHEE1990263  LDSANFORD 
.?....S922ERPN....................?005Y15" WIRE WHEEL COVER UNIT PACKAGES       
.?....S922ERQL....................?01CADILLAC MOTOR CAR DIVISION           .   
.?....S922ERQL....................802MERRITT WAREHOUSE                     .   
.?....S922ERQL.....................032555 CLARK STREET                     .   
.?....S922ERQL....................?04DETROIT, MICHIGAN 48210               .   
.?....S922ERQN....................b005NREWRITTEN FROM APPROVED S.R.#6201       
.?....S922ERQN....................Q010NSUGGESTED SOURCE: NORRIS TRIM           
.?...?S922ERQR.....................6AAJJ901608P1992182600OKSP                   
.?...jS922ERQP....................?16606209  ACT ASM - REAR 1992106  C BONGIORNO
.?....S922ERQL....................q01CADILLAC MOTOR CAR DIVISION           .   
.?....S922ERQL....................F02MERRITT WAREHOUSE                     .   
.?....S922ERQL....................4032555 CLARK STREET                     .   
.?....S922ERQL.....................04DETROIT, MICHIGAN 48210               . 



We need to separate the data into two files on following condition:

1. If the string 'S922ERQR' identified at location at location 7-14 and date
at location 48-54 is <1995001 then we need to write this record and successive records in one file called match till next match 'S922ERQR' found at location 7-14.

2. If the string 'S922ERQR' identified at location at location 7-14 and date
at location 48-54 is >= 1995001 then we need to write in one file called unmatch.

Problem:

I have written a COBOL program and tried to accomplish this and I faced following problems:

i. When I read a variable record into file record(it is also varible length) it is merged with the next record after end of the first record. So program logic is working fine but out record is merged with next record.
ii. Other way I tried is I copied all the records in to fixed block file. This time NULL values of the first file replaced with Spaces.

Is it possible to do this without writing Program??
How to keep the nulls instead of spaces while reading variable record file.

Please let me know.

Regards,
Vijay
Back to top
View user's profile Send private message

devidas-patil

New User


Joined: 08 Jan 2007
Posts: 54
Location: pune

PostPosted: Mon Feb 26, 2007 5:43 pm    Post subject:
Reply with quote

Hi Vijaya
you said you are using the flat file go through the basic of flat file i think whenver you are wrting record in the flat file it will write on the first line only.
until you use the perform statement.
do one thing if you not using perform please try using the perform
let me know if understand and solved the problem.
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


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