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
 

 

MAXCC 2000 WHILE COPYING FROm VB FILE TO VB FILE

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
Jonai

New User


Joined: 03 Jun 2008
Posts: 11
Location: Hyderabad

PostPosted: Wed Mar 18, 2009 12:52 pm    Post subject: MAXCC 2000 WHILE COPYING FROm VB FILE TO VB FILE
Reply with quote

Hi all,
Iam getting the following status while trying to copy from Vb file.

ONCODE'=8094 PROTECTION EXCEPTION

Sample code is like this.
FILES: PROCEDURE OPTIONS(MAIN);

DCL PTR1 POINTER;
DCL INFILE FILE RECORD INPUT;
DCL OUTFILE FILE RECORD OUTPUT;
DCL 1 INSTRING BASED (PTR1),
2 CERTNO CHAR(9),
2 COUNT FIXED DECIMAL (1,1),
2 VARPART(1:7 REFER (COUNT)) CHAR(10);


DCL EOF BIT(1) INITIAL('0'B);

PUT SKIP LIST('OPENING FILES');
OPEN FILE(INFILE) INPUT TITLE('TESTIN');
OPEN FILE(OUTFILE) OUTPUT TITLE('TESTOUT');
READ FILE(INFILE) INTO(INSTRING);
ON ENDFILE(INFILE) EOF='1'B;
PUT SKIP LIST('COUNT', COUNT);
DO WHILE(¬EOF='1'B);
CALL LOOP;
END;
CLOSE FILE(INFILE);
CLOSE FILE(OUTFILE);
RETURN;
LOOP:PROCEDURE;
WRITE FILE(OUTFILE) FROM(INSTRING);
READ FILE(INFILE) INTO(INSTRING);
END LOOP;
END FILES;

Variable count is occupying 1 byte in inputfile.....so i kept dec(1,1) to allocate 1 byte( assumed p(1/2)+1/2 bytes....correct me if iam wrong)

Can you plz help me out in resolving this.


Thanks,
Jonai.
Back to top
View user's profile Send private message

senthilnathanj

New User


Joined: 31 Jul 2007
Posts: 47
Location: chennai

PostPosted: Wed Mar 18, 2009 7:02 pm    Post subject:
Reply with quote

Hi,

Code:
FILES: PROCEDURE OPTIONS(MAIN);

DCL PTR1 POINTER;
DCL INFILE FILE RECORD INPUT ENV(VB);
DCL OUTFILE FILE RECORD OUTPUT ENV(VB);
DCL 1 INSTRING BASED (PTR1),
2 CERTNO CHAR(9),
2 COUNT FIXED DECIMAL (1,1),
2 VARPART(1:7 REFER (COUNT)) CHAR(10);


DCL EOF BIT(1) INITIAL('0'B);
ALLOCATE PTR1;
PUT SKIP LIST('OPENING FILES');
OPEN FILE(INFILE) INPUT TITLE('TESTIN');
OPEN FILE(OUTFILE) OUTPUT TITLE('TESTOUT');
READ FILE(INFILE) SET (PTR1);
ON ENDFILE(INFILE) EOF='1'B;
PUT SKIP LIST('COUNT', COUNT);
DO WHILE(¬EOF);
CALL LOOP;
END;
CLOSE FILE(INFILE);
CLOSE FILE(OUTFILE);
RETURN;
LOOP:PROCEDURE;
WRITE FILE(OUTFILE) FROM(INSTRING);
READ FILE(INFILE) SET (INSTRING);
END LOOP;
END FILES;


above code is working fine...
i'm using the input and output file both as VB format.
let me know if i you have any concerns...
Back to top
View user's profile Send private message
Jonai

New User


Joined: 03 Jun 2008
Posts: 11
Location: Hyderabad

PostPosted: Fri Mar 20, 2009 9:54 am    Post subject: Reply to: MAXCC 2000 WHILE COPYING FROm VB FILE TO VB FILE
Reply with quote

Thanks for the reply senthilnathanj,

Eventhough i am using both VB files, iam getting the problem mentioned.May be files or records problem...I'll look into it.


Regards,
Jonai.
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 995
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Fri Mar 20, 2009 8:51 pm    Post subject:
Reply with quote

Have you considered the difference between your code

Code:
DO WHILE(¬EOF='1'B);


and that quoted by senthilnathanj
Code:
DO WHILE(¬EOF);


The meaning of ¬EOF is '0'B, so your code effectively is
Code:
Do while('0'B = '1'B);   


That would suggest you never CALL LOOP; ??

Garry.
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm


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