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
 
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 opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

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