|
MCPressOnline tools -- EDTDTAARA http://www.mcpressonline.com/mc?50@xxxxxxxxxxxxxxxxxxxxxx@.214a29ef/0 Best regards, Vengoal Jeffrey Young ??:
To change a character data area that contains some packed data, input the new value in HEX using the Value(X'nn') format. "Raby, Steve (GE Advanced Materials, consultant)" <steve.raby@xxxxxx> wrote: I would be very interested DenisTIASteve -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Denis Robitaille Sent: 26 July 2005 15:40 To: rpg400-l@xxxxxxxxxxxx Subject: RE: CHGDTAARA packed field We have a lot of data area like this: Caracter data area with several subfield containing different kind of information. What we did to overcome the kind of problem presented here is the following: - create an external DS (a physical file) that defines the structure of the data area - create a utility program that uses this external DS to provide a facility to update the data area this way, we have no issue with packed, zone, caracter... We also never make mistake like using the wrong offset for a subfield. If some are interested, I can post the source of this utility. It is made of: 1 command, 1 CLP, 1 RPG and a message file Denis Robitaille Directeur services technique TI 819 363 6130 SUPPORT Jour (EST) Daytime : 819-363-6134 En-dehors des heures (EST) After hour : 819-363-6158 Network Status : 819-363-6157steve.raby@xxxxxx 2005-07-26 09:13:57 >>>Hello Chaps, Nope that didn't work, this is what the live one looks like,Value Offset *...+....1....+....2....+....3....+....4....+....5 0 'AMBISPRD 9902U34274AMB N J ?J32101 ' 50 ' éh Scholing . . . . . . . . . . . . . . . . . V' 100 'oertaal. . . . . . . VO2max. . . . . . . . . . . .' 150 ' . . . . . . .111 N ' 200 ' ' 250 ' ' 300 ' ' 350 ' ' 400 ' 'and this is the test after that change,Value Offset *...+....1....+....2....+....3....+....4....+....5 0 'AMBISLNP 9902SUP01 N J00000000100 & ' 50 ' (1) . . . . . . . . . (2) . . . . . . . . . (' 100 '3) . . . . . . . . . (4) . . . . . . . . . (5) . .' 150 ' . . . . . . .111 N ' 200 ' ' 250 ' ' 300 ' ' 350 ' ' 400 ' 'The field starts in position 33, I cannot change the data area as it is part of a package so I just need that little bit changed. Steve -----Original Message-----From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Jonathan MasonSent: 26 July 2005 14:32 To: 'RPG programming on the AS400 / iSeries' Subject: RE: CHGDTAARA packed field Hi Steve I was going to say the same thing as Paul, but he beat me to it :-) All the bestJonathan www.astradyne-uk.com-----Original Message-----From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Paul TuohySent: 26 July 2005 13:23 To: RPG programming on the AS400 / iSeries Subject: Re: CHGDTAARA packed field Hi Steve, get the boot ready :-) The data area is a character data area so the VALUE needs to be a character field. Try - PGM DCL VAR(&NUM) TYPE(*DEC) LEN(9 0) + VALUE(1) DCL VAR(&NUMCHAR) TYPE(*CHAR) LEN(9) CHGVAR &NUMCHAR &NUM CHGDTAARA DTAARA(AMBISDATA (33 9)) VALUE(&NUMCHAR) ENDPGM HTH Paul ----- Original Message ----- From: "Raby, Steve (GE Advanced Materials, consultant)"To: "RPG programming on the AS400 / iSeries" Sent: Tuesday, July 26, 2005 12:59 PMSubject: RE: CHGDTAARA packed fieldHello Jonathan I just want to change the value to one, I tried just CHGDTAARA from acommand line, then I put it in a CL,PGM DCL VAR(&NUM) TYPE(*DEC) LEN(9 0) + VALUE(1) CHGDTAARA DTAARA(AMBISDATA (33 9)) VALUE(&NUM) ENDPGM And I get this, Message ID . . . . . . : CPA0701 Date sent . . . . . . : 05/07/26 Time sent . . . . . . :13:54:06Message . . . . : CPF1019 received by CHGDTAARA at 500. (C D I R) Cause . . . . . : Control language (CL) program CHGDTAARA inlibraryAMBISLNP detected an error at statement number 500. Message textfor CPF1019is: VALUE parameter not correct. Recovery . . . : This inquiry message can be avoided by changingthethe dump looks like; 5722SS1 V5R2M0 020719 CL ProgramDumpJob name . . . . . . . . : SWRDV027D1 User name . . . . . . . . :SUPPORTProgram name . . . . . . : CHGDTAARA Library . . . . . . . . . :AMBISLNPMessages Message MessageFromTime ID Sev Type TextProgram135406 00 CMD 500 - CHGDTAARADTAA QCADRVRA(AMBISDATA (339)) VALUE(1) 135406 CPF1019 40 ESC VALUE parameter notcor QWCCCHVCrect. 135406 CPF9999 40 ESC Function check.CPF1019 QMHUNMSGunmonitored byCHGDTAARA at statement500, instruction X'000F'. Variables Variable Type Length ValueValu*...+....1....+....2....+ * .&NUM *DEC 9 0 1 Do I need to put it into Hex or something? I am probably going to kickmyself when I find out what I am doing wrong aren't I?Steve -----Original Message-----From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Jonathan MasonSent: 26 July 2005 13:48 To: 'RPG programming on the AS400 / iSeries' Subject: RE: CHGDTAARA packed field Hi Steve What error messages are you getting? How are you trying to change it? Can you provide code samples? All the best Jonathanwww.astradyne-uk.com-----Original Message-----From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Raby, Steve (GEAdvanced Materials, consultant) Sent: 26 July 2005 11:55 To: RPG programming on the AS400 / iSeries Subject: CHGDTAARA packed field Hello All, I have a data area with a 9,0 packed field in that I am trying to change, just a one off. I just keep getting error messages, how do I change that? TIA Steve -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing listTo post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archivesat http://archive.midrange.com/rpg400-l. -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailinglistTo post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archivesat http://archive.midrange.com/rpg400-l. -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailinglistTo post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archivesat http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.