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
 

 

Easytrive File manipulation

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
vin12pr
Warnings : 1

New User


Joined: 14 Jun 2006
Posts: 56

PostPosted: Thu Sep 06, 2007 4:38 pm    Post subject: Easytrive File manipulation
Reply with quote

Hi All,

I have a problem with one of my Eztreive programs.

Functionality of my Program:

The program receives a input which is of length 1764 .... My program reads the input record and updats the sort indicator with either A or B in the 242th position of the input record and then writes the same in to output file.The copy layout is same for both the input and output.

I am not understanding as to what happening in the middle the ouput contains some extra Junk data which is ultiamtely affecting the output.There is a lot of difference between input and output even though i am updating onlyone field in the input before writing it to the output.


What might be happening in between..Any idea?

Thanks in advance,
Vin12pr
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu Sep 06, 2007 4:42 pm    Post subject:
Reply with quote

Can you post a small example of the file descriptions and the program logic?
Back to top
View user's profile Send private message
vin12pr
Warnings : 1

New User


Joined: 14 Jun 2006
Posts: 56

PostPosted: Thu Sep 06, 2007 5:24 pm    Post subject: Reply to: Easytrive File manipulation
Reply with quote

FILE CM200IN VB(1768 27998)
*---------------------------------------
*FIELD COLS SIZE TYPE
*---------------------------------------
INREC 1 1764 A

WS-AGENT-ST 134 2 N
WS-AGENT-DS 136 2 N
WS-AGENT-AG 139 2 N
SORT-IND 242 1 A
AGT-ST-DS 243 3 P
AGENT-NBR 246 2 N
PNR-NAME 1267 40 A
*
FILE ELITELST VS
*-----------------------------------------
*FIELD COLS SIZE TYPE
*-----------------------------------------
ELITE-KEY 1 8 A
WS-ELT-AGENT-ST 1 2 N
DASH1 3 1 A
WS-ELT-AGENT-DS 4 2 N
DASH2 6 1 A
WS-ELT-AGENT-AG 7 2 N
*
FILE CM200OUT VB(1768 27998)
OUTREC 1 1764 A

*
AGT-KEY W 8 A
AGT-ST AGT-KEY 2 A
AGT-DASH1 AGT-KEY +2 1 A
AGT-DT AGT-KEY +3 2 A
AGT-DASH2 AGT-KEY +5 1 A
AGT-AGN AGT-KEY +6 2 A
*
WS-AGENT-REFORMAT W 06 A
WS-AGENT-STATE WS-AGENT-REFORMAT 02 N
WS-AGENT-DISTRICT WS-AGENT-REFORMAT +2 02 N
WS-AGENT-NUMBER WS-AGENT-REFORMAT +4 02 N
WS-AGENT-NUMERIC WS-AGENT-REFORMAT 04 N
*

JOB INPUT CM200IN
*
* MOVE SPACES TO OUTREC
* MOVE INREC TO OUTREC
* DISPLAY PNR-POL 'TEST FIELDA1267-', PNR-NAME
* DISPLAY PNR-POL-O 'TEST FIELDB1267-', PNR-NAME-O
AGT-ST = WS-AGENT-ST
AGT-DASH1 = '-'
AGT-DT = WS-AGENT-DS
AGT-DASH2 = '-'
AGT-AGN = WS-AGENT-AG

WS-AGENT-STATE = WS-AGENT-ST
WS-AGENT-DISTRICT = WS-AGENT-DS
WS-AGENT-NUMBER = WS-AGENT-AG

READ ELITELST KEY AGT-KEY STATUS
IF ELITELST:FILE-STATUS = 0
SORT-IND = 'A'
ELSE
SORT-IND = 'B'
END-IF

AGT-ST-DS = WS-AGENT-NUMERIC
AGENT-NBR = WS-AGENT-NUMBER

OUTREC = INREC
*PUT CM200OUT FROM CM200IN
PUT CM200OUT

END


Here what I am doing is ....I will read the input record...The agent numbe r in the input record will be compared against agent file ... if its there then i will populate the sort indicator with A or B . then writeit to ouput file.



THis is what all I m doing..but there is a lot of difference between input and ouput generated.

Thnx,

Vin12pr
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Sep 06, 2007 5:41 pm    Post subject:
Reply with quote

Looks good to me....
I'm a bit confused by this:
WS-AGENT-STATE = WS-AGENT-ST
2 N to 2 N
WS-AGENT-DISTRICT = WS-AGENT-DS
2 N to 2 N
WS-AGENT-NUMBER = WS-AGENT-AG
2 N to 2 N
.
.
.
AGT-ST-DS = WS-AGENT-NUMERIC
Why move what was WS-AGENT-ST & WS-AGENT-DS to AGT-ST-DS?
AGENT-NBR = WS-AGENT-NUMBER
Why move what was WS-AGENT-AG to AGENT-NBR?
Back to top
View user's profile Send private message
vin12pr
Warnings : 1

New User


Joined: 14 Jun 2006
Posts: 56

PostPosted: Thu Sep 06, 2007 6:48 pm    Post subject: Reply to: Easytrive File manipulation
Reply with quote

Is somethign happening during the PUT statment ???bcoz the output data is getting a whole lot of junk.

Kindly advise



Thanks,
Vin12pr
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Sep 06, 2007 10:31 pm    Post subject:
Reply with quote

Hello,

The problem is most likely not the PUT.

Quote:
output data is getting a whole lot of junk.

Please post some of the "junk" (in hex) as well as the input that was in process at the time.

When we see what youj have, we may be able to offer suggestions.
Back to top
View user's profile Send private message
rohitsir

New User


Joined: 21 Aug 2007
Posts: 32
Location: USA

PostPosted: Fri Sep 07, 2007 2:09 am    Post subject:
Reply with quote

Hi,

I did face this problem once. I don't know the exact reason but this is wut i did to get rid of it:

Dump your input file values to working storage fields. Do wutever modification you have to do with your working storage variables and not with file variables. Write the output file from working storage variables.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Fri Sep 07, 2007 10:31 am    Post subject:
Reply with quote

Hi vin12pr,


Put display befor putting to o/p file & let us know the result
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


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