IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
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
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: 1448
Location: Chicago, IL

PostPosted: Mon Apr 17, 2006 11:46 am
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts WER247A SORTOUT HAS INCOMPATIBLE LRECL SYNCSORT 7
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top