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
 

 

Want it to be copied to file B with 10 LRECL in each line

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
arunswap

New User


Joined: 23 Mar 2006
Posts: 13

PostPosted: Mon Apr 17, 2006 10:28 am    Post subject: Want it to be copied to file B with 10 LRECL in each line
Reply with quote

I have a file A with LRECL 100.
I want it to be copied to file B with 10 LRECL in each line.
How do u do it in COBOL?
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Mon Apr 17, 2006 11:46 am    Post subject: Re: Want it to be copied to file B with 10 LRECL in each lin
Reply with quote

Code:
01 WS-IN-REC.
   05 WS-IN-1   PIC X(10).
   05 WS-IN-2   PIC X(10).
   05 WS-IN-3   PIC X(10).
   05 WS-IN-4   PIC X(10).
   05 WS-IN-5   PIC X(10).
   05 WS-IN-6   PIC X(10).
   05 WS-IN-7   PIC X(10).
   05 WS-IN-8   PIC X(10).
   05 WS-IN-9   PIC X(10).
   05 WS-IN-10   PIC X(10).

PERFORM PROCESS-PARA UNTIL END-OF-INFILE.

PROCESS-PARA
READ INPUT-FILE INTO WS-IN-REC.
WRITE OUT-REC FROM WS-IN-1.
WRITE OUT-REC FROM WS-IN-2.
WRITE OUT-REC FROM WS-IN-3.
WRITE OUT-REC FROM WS-IN-4.
WRITE OUT-REC FROM WS-IN-5.
WRITE OUT-REC FROM WS-IN-6.
WRITE OUT-REC FROM WS-IN-7.
WRITE OUT-REC FROM WS-IN-8.
WRITE OUT-REC FROM WS-IN-9.
WRITE OUT-REC FROM WS-IN-10.


Regards,
Priyesh.
Back to top
View user's profile Send private message
prakash271082

New User


Joined: 09 Sep 2005
Posts: 53

PostPosted: Mon Apr 17, 2006 11:53 am    Post subject:
Reply with quote

Hi,

These are all the basic things that everyone should be knowing. Please look in to any of the postings before hand else look in to manual before posting your queries henceforth.
Back to top
View user's profile Send private message
gyana

New User


Joined: 09 Feb 2006
Posts: 4

PostPosted: Mon Apr 17, 2006 12:07 pm    Post subject: taking backup of database.
Reply with quote

Hello friends,
I want to take backup of an area (IDMS database). I can do so by writing a program wherein i'll sweep the whole area and write it to a file and later upload the databse from the file. My questiuon is "Is there any utility thru which i can take the backup and upload the data of a particular area of a databse?"

Regards,
Gyana
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm


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