Get answers.  Share knowledge.  Collaborate with peers.




How to use SETLL and READE to solve this program

phil code given by ravula will half justify of condition.
i have to satisfy the C=’y’ as well as write the latest records. which i mentioned as *.



View Discussion   |  April 19, 2013  4:54 PM
AS/400, Physical File
discussed by:
rpglecodingusingas400
115 pts.

How to use SETLL and READE to solve this program

100 Ist record (grp 1)
101 2nd record(grp2)
101 3rd record(grp2)
101 4th record(grp2)
102 …
102 …
103 ..
104 8th record(grp5)

Suppose I have to traverse the whole pf having data as above.
I need to traverse each set of key perform some action specifically n then traverse further set of
Key. According to my knowledge of setll and reade commands. I will do like this…
Suppose key=101
Setll key filea
If %equal
Dow not %eof
Reade key filea
………
………
Condition;
Enddo
Write fileb
Endif

In this way I can traverse the one group , but how do I change the key to point the another set of keys.
As i told u i am new to rpg..
might be answering to the above question can solve my previous problem…



View Discussion   |  April 19, 2013  4:49 PM
AS/400, Physical File
discussed by:
rpglecodingusingas400
115 pts.

Connecting multiple devices

Is this a homework question?
If not, can you show us what you have done so far and explaining exactly what problem you are experiencing?



View Discussion   |  April 19, 2013  4:48 PM
Connecting Multiple Devices
discussed by:
CharlieBrowne
32,785 pts.

Connecting multiple devices

Is this a homework question?
If not, can you show us what you have done so far and explaining exactly what problem you are experiencing?



View Discussion   |  April 19, 2013  4:46 PM
Connecting Multiple Devices
discussed by:
CharlieBrowne
32,785 pts.

How to use SETLL and READE to solve this program

“ravula i already applied the same code before”

Ravula’s code followed my logic and met your spec.
It wrote the records to file B
only for rows with C if VAL=’Y*’

The command c write format2 writes the records

print the latest records — PRINT?
you said write them to the file B.
Do you want to PRINT them to a spool file
or Write them to a file
or both.

Phil



View Discussion   |  April 19, 2013  4:34 PM
AS/400, Physical File
discussed by:
philpl1jb
44,070 pts.

Connecting multiple devices

A classroom has a teacher computer, smartboard, projector, video splitter, audio amplification system for the teacher, dvd player, and an AppleTV. All of the video components can be displayed using one or more of the video inputs on the projector. All of the audio components play through the audio amplification systems speakers.Please draw a diagram showing how you would interconnect the components and what cables you would use to interconnect them. If you can come up with a solution that makes the video splitter unnecessary, then feel free to not include it.



View Discussion   |  April 19, 2013  4:17 PM
Connecting Multiple Devices
discussed by:
charlienguyen2013
30 pts.

Date conversion

… In the discrete conversion each step could be monitored separately so that we would know which date was invalid…
that’s true philpl1jb, if it was important to know which one was in error, I would have to either determine it in the monitor or do a dump(a) to get a listing of them all or something



View Discussion   |  April 19, 2013  3:36 PM
AS/400, AS/400 Fields
discussed by:
BigKat
7,175 pts.

Message subfile

Please ignore that sndpgmmsg D-spec. Left over from various experimenting and not used in current version.



View Discussion   |  April 19, 2013  3:13 PM
AS/400, MSGF, QMHSNDPM
discussed by:
aceofdelts
1,565 pts.

Message subfile

Tom – This is basically the first pgm here to use this technique for a msg subfile. I grabbed the parm info from something that calls the api but doesn’t seem fully functional. Since it sometimes works, I assumed the parms are OK.
Here’s the detail on it …
Parm fields –
D msgId s 7A
D msgLoc s 20A inz(‘SHMSGF *LIBL ‘)
D msgType s 10A inz(‘*DIAG’)
D msgKey s 4A inz(‘ ‘)
D msgErr s 4B 0 inz(0)
D msgrmv s 10A inz(‘*ALL’)
D msgData s 256A inz(‘General Error’)
D msgDlngth s 10i 0 inz(0)
D msgCStk s 10a inz(‘*’)
D msgCStkcnt s 10i 0 inz(0)
D sndpgmmsg pr extpgm(‘QMHSNDPM’)

api call –
C MSFSnd Begsr

C Eval msgDlngth = %len(%trim(msgdata))
c Call ‘QMHSNDPM’
c Parm msgId
c Parm msgLoc
c Parm msgData
c Parm msgDlngth
c Parm msgType
c Parm msgCStk
c Parm msgCStkcnt
c Parm msgKey
c Parm msgErr

C Endsr

The message file is standard. The screen setup is exactly what I’ve used many times (elsewhere).

Bruce – I’ll send you the whole thing via email.



View Discussion   |  April 19, 2013  3:09 PM
AS/400, MSGF, QMHSNDPM
discussed by:
aceofdelts
1,565 pts.

Data storage

What type of data are you looking to store and retrieve and for how long? Why not use cache, is there a reason? What language are you using? You may be able to use global variables, cookies or other means. A little more info on what you are trying to do would help in coming up with a solution.



View Discussion   |  April 19, 2013  3:07 PM
Data storage, Storage
discussed by:
ToddN2000
3,890 pts.

How to use SETLL and READE to solve this program

i am not a student , i am it professional.. as400 and rpg is new to me..thats why facing such kind of problem.



View Discussion   |  April 19, 2013  3:06 PM
AS/400, Physical File
discussed by:
rpglecodingusingas400
115 pts.

How to use SETLL and READE to solve this program

ravula and phil thanks..
ravula i already applied the same code before… it wont solve my problem..because i have to print the latest records means the record which i hv marked as *.



View Discussion   |  April 19, 2013  3:06 PM
AS/400, Physical File
discussed by:
rpglecodingusingas400
115 pts.

SQL creating an unwanted duplicate of file

The library was not specified in the update. The file shows it was created by the user that ran the update query, and as far as we can tell from the job log, it was right around the time that he was running the update that the file was created. It was run in the STRSQL interface, and no one else was running a query on the file, but the other users may have been running applications using various records (he did not have an exclusive lock on it)
We haven’t been able to repeat it, but that doesn’t exactly give us a “warm fuzzy”:(



View Discussion   |  April 19, 2013  3:04 PM
DB2, SQL statement
discussed by:
BigKat
7,175 pts.

How to use SETLL and READE to solve this program

thanks everyone.. but i tired a lot, thats learning assigment ur rite… but i am unable do so..
i ll send u my code i tired than please correct it whether i am rite or wrong while using setll and reade.



View Discussion   |  April 19, 2013  3:02 PM
AS/400, Physical File
discussed by:
rpglecodingusingas400
115 pts.

SQL creating an unwanted duplicate of file

Did the file to be updated by the SQL statement have the library “qualified”? I’d like to know so I can try a few tests myself.. Scary problem if it can be replicated.
Any chance somebody else was running the same update at the same time? I know you checked the file for a create date/time, how about the user ?



View Discussion   |  April 19, 2013  2:50 PM
DB2, SQL statement
discussed by:
ToddN2000
3,890 pts.

Show error message to user after a CPYF command ended in error in CL program

To start with, how are the parameters specified? Through a DSPF, passed parameters or hard coded? If you have a DSPF just add an error message field to the DSPF an then MONMSG and send that to your ” CPY ERROR MESSAGE”.
If there is no user interface, how do you envision displaying an error message? Lastly, as Tom mentioned is this a “source” file or a data file ??



View Discussion   |  April 19, 2013  2:38 PM
AS/400, CL Program
discussed by:
ToddN2000
3,890 pts.

XP client eventually loses network connection

An idea hit me … what if it’s not ‘dropping off’ but the DNS TTL expires? I’m certainly no expert on DNS, but maybe the problem is that – since it’s not logged into the domain, could the DNS record on the server(s) expire? This gave me the start of the thought process: http://support.microsoft.com/kb/318803



View Discussion   |  April 19, 2013  2:11 PM
Network, Windows XP 32 bit
discussed by:
Mike68847
65 pts.

How to use SETLL and READE to solve this program

ravula
That’s very impressive but it was a homework problem ..we try to help people learn, not do homework for them! There is no learning in copying.
Phil



View Discussion   |  April 19, 2013  1:43 PM
AS/400, Physical File
discussed by:
philpl1jb
44,070 pts.

How to use SETLL and READE to solve this program

============IPF01
A R FORMAT1
A NUM 3S 0
A SIGN 1S 0
A VAL 3A
A K VAL

===========IPF02
A R FORMAT2
A NUM2 3S 0
A SIGN2 1S 0
A VAL2 3A
A K VAL2

here these are the files which i used , data which you have given i have inserted into ipf01 and after executing the program , it inserts the data you wish into ipf02



View Discussion   |  April 19, 2013  1:31 PM
AS/400, Physical File
discussed by:
ravula
365 pts.

How to use SETLL and READE to solve this program

hello please try the above code it moay works for you.

thanks,
satya



View Discussion   |  April 19, 2013  1:27 PM
AS/400, Physical File
discussed by:
ravula
365 pts.