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
 
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 line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
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

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