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
 

 

Changing the control of a program from onevariableto another

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
akumaras

New User


Joined: 06 Jul 2012
Posts: 10
Location: india

PostPosted: Wed Jan 30, 2013 2:00 pm    Post subject: Changing the control of a program from onevariableto another
Reply with quote

Hi,

I have two input files with two variables A & B so my requirement is when ever it is A then that needs to be converted to B and then read the values of B and while writing it should write the same value to A.

So is it possible to change the control to B so that it can read the complete record of B and write the same to A?

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

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Jan 30, 2013 2:08 pm    Post subject: Reply to: Changing the control of a program from onevariable
Reply with quote

clear as mud

if You want good answers, learn to ask CLEAR questions icon_cool.gif
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Wed Jan 30, 2013 2:17 pm    Post subject:
Reply with quote

Looks like Encrypt Decrypt algorithm icon_biggrin.gif

I would just wanted to add on to what Enrico said

Please explain your requirement better with some values within codetag
Back to top
View user's profile Send private message
akumaras

New User


Joined: 06 Jul 2012
Posts: 10
Location: india

PostPosted: Wed Jan 30, 2013 3:33 pm    Post subject: Reply to: Changing the control of a program from onevariable
Reply with quote

Sorry guys for not giving the complete info...Please find the requirement below

IF VEND = 12345
MOVE 88888 TO VEND
PERFORM READ FILE2
ELSE
MOVE VEND TO VEND1
READ FILE2
The problem i am facing is when passing the 88888 to vend,program is trying to read the values for vend 12345 only. So my requirement is after moving 88888 to vend then program needs to read the values of 88888 vend only. And while writing it should write the same values to vend 12345.Please help me in this and let me know if i am not clear on this.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Wed Jan 30, 2013 4:33 pm    Post subject:
Reply with quote

Why not have a temp variable?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Wed Jan 30, 2013 4:49 pm    Post subject: Reply to: Changing the control of a program from onevariable
Reply with quote

Are you doing a keyed read, but not changing the value in the key which is equivalent to the value in VEND?
Back to top
View user's profile Send private message
akumaras

New User


Joined: 06 Jul 2012
Posts: 10
Location: india

PostPosted: Wed Jan 30, 2013 5:17 pm    Post subject: Re: Reply to: Changing the control of a program from onevari
Reply with quote

Its a keyed read only and vend is a part of key. So the key will be changed when vend is changed
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Wed Jan 30, 2013 6:17 pm    Post subject: Reply to: Changing the control of a program from onevariable
Reply with quote

So you need to add your new key and, if that is what you want, delete your old one.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts A sample of exit program for exit XMN... lind sh CICS 2 Mon Oct 03, 2016 5:07 pm
No new posts Need points to tune IMS Checkpoint Pr... satish.ms10 IMS DB/DC 2 Fri Sep 30, 2016 4:12 pm
No new posts ISPF program to set SCRNAME prino TSO/ISPF 5 Fri Sep 30, 2016 2:18 pm


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